Dรฉtail du package

@qhlab/eslint-plugin

QhlabTeam33MIT1.11.0

๐Ÿงช Eslint plugins for QhLab

@qhlab, @qhlab/eslint-plugin, eslint, eslint-plugin

readme

logo


@qhlab/eslint-plugin

๐Ÿš€ Release The Package โœ… Run Tests

๐Ÿงช Eslint plugins for Qhlab


English | ็ฎ€ไฝ“ไธญๆ–‡

Installation

You'll first need to install ESLint:

yarn add eslint -D

Next, install @qhlab/eslint-plugin:

yarn add @qhlab/eslint-plugin -D

Use in React

Create a .eslintrc.json file in your root dir.

{
  "extends": ["plugin:@qhlab/react"]
}

Use in Vue2

Make sure the version of eslint you are using is latest v7, because some new rules depends on eslint v7 and @vue/cli doesn't support eslint v8 currently.

yarn add eslint@^7 -D

Create a .eslintrc.json file in your root dir.

{
  "extends": ["plugin:@qhlab/vue"]
}

Use in Vue3

Make sure the version of eslint you are using is latest v7, because some new rules depends on eslint v7 and @vue/cli doesn't support eslint v8 currently.

yarn add eslint@^7 -D

Create a .eslintrc.json file in your root dir.

{
  "extends": ["plugin:@qhlab/vue3"]
}

Use in Vanilla JS

You don't need to use plugin:@qhlab/base along with plugin:@qhlab/react or plugin:@qhlab/vue or plugin:@qhlab/vue3, these have already added.

Create a .eslintrc.json file in your root dir.

{
  "extends": ["plugin:@qhlab/base"]
}

Use Prettier rules alone

You don't need to use plugin:@qhlab/prettier along with plugin:@qhlab/react or plugin:@qhlab/vue or plugin:@qhlab/vue3, these have already added.

Create a .eslintrc.json file in your root dir.

{
  "extends": ["...your other rules", "plugin:@qhlab/prettier"]
}

Note: Make sure prettier is the last one so it won't be overriden.

Use with typescript

Typescript config is already built in with base config, so you don't need to worry about that, it will override .ts, .tsx files with typescript config rules.

However, you may need to add parserOptions.project to specify your tsconfig.json file.

In most case, you won't need to do that, because it will automatically locate tsconfig.json file base on your current command line path, but if you aren't execute your command line in the same dir, it won't be found, so in that case you need specify mannually.

For example

{
  "extends": ["plugin:@qhlab/react"],
  "parserOptions": {
    "project": "./tsconfig.json"
  }
}

Config References

config name extends with has customized? rules from
plugin:@qhlab/prettier plugin:prettier/recommended โœ… eslint-plugin-prettier
plugin:@qhlab/base / โœ… eslint official
@typescript-eslint
plugin:@qhlab/react plugin:@qhlab/base
plugin:@qhlab/prettier
โœ… eslint-plugin-react
plugin:@qhlab/vue plugin:@qhlab/base
plugin:vue/recommended
plugin:@qhlab/prettier
no eslint-plugin-vue
plugin:@qhlab/vue3 plugin:@qhlab/base
plugin:vue/recommended
plugin:@qhlab/prettier
no eslint-plugin-vue

License

MIT

โ–‘โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–‘โ–ˆโ–ˆโ•—โ–‘โ–‘โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•—โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–‘โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–‘ โ–ˆโ–ˆโ•”โ•โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•‘โ–‘โ–‘โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•— โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•ฆโ• โ•šโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•— โ–‘โ•šโ•โ–ˆโ–ˆโ•”โ•โ•โ–‘โ–ˆโ–ˆโ•‘โ–‘โ–‘โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•‘โ–‘โ–‘โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•ฆโ• โ–‘โ–‘โ–‘โ•šโ•โ•โ–‘โ–‘โ–‘โ•šโ•โ•โ–‘โ–‘โ•šโ•โ•โ•šโ•โ•โ•โ•โ•โ•โ•โ•šโ•โ•โ–‘โ–‘โ•šโ•โ•โ•šโ•โ•โ•โ•โ•โ•โ–‘

changelog

1.11.0 (2022-07-21)

Features

  • @typescript-eslint/ban-types set '{}' to false (3f65337)

1.10.0 (2022-02-18)

Features

  • add several import plugins (bfaf91b)

Bug Fixes

  • edit commitlint, lintstaged config (e13b62d)

1.9.0 (2022-01-10)

Features

  • no-console allow warn, error (73c385e)

1.8.5 (2021-12-08)

1.8.4 (2021-12-02)

1.8.3 (2021-12-02)

1.8.2 (2021-12-02)

  • update README, add typescript (7153734)

1.8.1 (2021-12-02)

Bug Fixes

  • off consistent-type-exports (adcf5ab)

1.8.0 (2021-12-01)

Features

  • add typescript config (e22ee91)
  • add typescript for startup 20% (2e79be0)

1.7.0 (2021-11-11)

Features

1.6.1 (2021-11-09)

1.6.0 (2021-11-09)

Features

1.5.2 (2021-11-04)

1.5.1 (2021-11-03)

  • update package.json (bdef2c6)
  • update package.json, add files (0ce8d23)

1.5.0 (2021-11-03)

Features

1.4.0 (2021-11-02)

Features

  • optimize vue vue3 configs, replace path.join require.resolve (4787025)

Bug Fixes

  • some rules issue, add env for all config based on (194dd12)

1.3.1 (2021-11-01)

Bug Fixes

  • extends path error, adjust some react rules (956e05c)

1.3.0 (2021-11-01)

Features

  • add vue2 & vue3 configs (f9b737d)

1.2.0 (2021-11-01)

Features

  • add base rules, not finished yet (da110d1)
  • add layout&formatting config (089892f)
  • add react config and update prettier (6000aa7)

1.1.2 (2021-10-21)

Bug Fixes

1.1.1 (2021-10-21)

1.1.0 (2021-10-21)

Features

1.0.4 (2021-10-21)

Bug Fixes

1.0.3 (2021-10-21)

1.0.2 (2021-10-21)

1.0.1 (2021-10-21)

1.0.0 (2021-10-21)

Features

  • add prettier config (b66013a)
  • merge user's prettierrc into our prettier config (2c9a5db)

Bug Fixes