This package provides ShareChat's .eslintrc as an extensible shared config.
This config contains the most robust rules for ECMAScript 6+. (Peer Dependencies: eslint
, eslint-plugin-import
)
This config contains the most robust rules for React based projects. (Peer Dependencies: eslint
, eslint-plugin-react
)
This config adds additional rules for accessbility (Peer Dependencies: eslint
, eslint-plugin-jsx-a11y
)
This config adds additional rules for react hooks (Peer Dependencies: eslint
, eslint-plugin-react-hooks
)
This config can be used by React projects that work with the new JSX transform from React 17 (Peer Dependencies: eslint
, eslint-plugin-react
)
This config can be used by projects that also use Prettier for code formatting (Peer Dependencies: eslint
, eslint-config-prettier
, prettier
)
-
Depending on the config that you want to use, you will have to install the necessary peer dependencies.
-
Add the required keys in the
extends
key of ESLint config.
Note: All configs are independent of each other, therefore if you want to use multiple configurations, each configurations has to be included separately in the extends
key of ESLint config in your project.
For example, if you want to use the rules for ES6, React and Prettier, the extends
option should look like this
extends: ["sharechat", "sharechat/react", "sharechat/prettier"]
Currently the config doesn't extends rules for Vue, React Native and Svelte.