Skip to content

xianshenglu/eslint-config

Repository files navigation

@xianshenglu/eslint-config

ESLint config

Usage

For Javascript project

npm install --save-dev @xianshenglu/eslint-config [email protected]

Then, add eslint-config to the extends array in your .eslintrc.js file. If you want it to override other configs, you would need to put it last.

{
  "extends": [
    "some-other-config-you-use",
    "@xianshenglu/eslint-config/javascript"
  ]
}

For Javascript-Vue project

npm install --save-dev @xianshenglu/eslint-config [email protected] [email protected]

Then, add eslint-config to the extends array in your .eslintrc.js file. If you want it to override other configs, you would need to put it last.

{
  "extends": [
    "some-other-config-you-use",
    "@xianshenglu/eslint-config/javascript-vue"
  ]
}

For Javascript-React project [Untested]

npm install --save-dev @xianshenglu/eslint-config [email protected] eslint-plugin-jsx-a11y@^6.3.0 eslint-plugin-react@^7.20.0 eslint-plugin-react-hooks@^4.1.2

Then, add eslint-config to the extends array in your .eslintrc.js file. If you want it to override other configs, you would need to put it last.

{
  "extends": [
    "some-other-config-you-use",
    "@xianshenglu/eslint-config/javascript-react"
  ]
}

For Typescript project [Untested]

npm install --save-dev @xianshenglu/eslint-config [email protected] @typescript-eslint/[email protected]

Then, add eslint-config to the extends array in your .eslintrc.js file. If you want it to override other configs, you would need to put it last.

{
  "extends": [
    "some-other-config-you-use",
    "@xianshenglu/eslint-config/typescript"
  ]
}

For Typescript-Vue project [Untested]

npm install --save-dev @xianshenglu/eslint-config [email protected] [email protected] @typescript-eslint/[email protected]

Then, add eslint-config to the extends array in your .eslintrc.js file. If you want it to override other configs, you would need to put it last.

{
  "extends": [
    "some-other-config-you-use",
    "@xianshenglu/eslint-config/typescript-vue"
  ]
}

For Typescript-React project [Untested]

npm install --save-dev @xianshenglu/eslint-config [email protected] eslint-plugin-jsx-a11y@^6.3.0 eslint-plugin-react@^7.20.0 eslint-plugin-react-hooks@^4.1.2 @typescript-eslint/[email protected]

Then, add eslint-config to the extends array in your .eslintrc.js file. If you want it to override other configs, you would need to put it last.

{
  "extends": [
    "some-other-config-you-use",
    "@xianshenglu/eslint-config/typescript-react"
  ]
}

Compatibility

  • @xianshenglu/eslint-config-vue 0.1.0 can be migrated to @xianshenglu/eslint-config and use the @xianshenglu/eslint-config/javascript-vue config.
  • @xianshenglu/eslint-config-vue 0.2.0 can be migrated to @xianshenglu/eslint-config. They are equal except that the default config of @xianshenglu/eslint-config-vue has to be migrated to @xianshenglu/eslint-config/javascript-vue.

About

Personal ESLint rules

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published