@mohalla-tech/eslint-config-sharechat
v1.2.1
Published
ShareChat's ESLint config
Downloads
353
Maintainers
Keywords
Readme
eslint-config-sharechat
This package provides ShareChat's .eslintrc as an extensible shared config.
Configs Available
Base Config
This config contains the most robust rules for ECMAScript 6+. (Peer Dependencies: eslint
, eslint-plugin-import
)
React Config
This config contains the most robust rules for React based projects. (Peer Dependencies: eslint
, eslint-plugin-react
)
React Accessibility Config
This config adds additional rules for accessbility (Peer Dependencies: eslint
, eslint-plugin-jsx-a11y
)
React Hooks Config
This config adds additional rules for react hooks (Peer Dependencies: eslint
, eslint-plugin-react-hooks
)
React JSX Runtime Config
This config can be used by React projects that work with the new JSX transform from React 17 (Peer Dependencies: eslint
, eslint-plugin-react
)
Prettier
This config can be used by projects that also use Prettier for code formatting (Peer Dependencies: eslint
, eslint-config-prettier
, prettier
)
Svelte (v1.2.0 onwards)
From version 1.2.0, Svelte config has also been added.
This config can be used by Svelte based projects. (Peer Dependencies: eslint
, eslint-plugin-svelte3
)
Usage
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: ["@mohalla-tech/eslint-config-sharechat", "@mohalla-tech/eslint-config-sharechat/react", "@mohalla-tech/eslint-config-sharechat/prettier"]
Improving this config
Currently the config doesn't extends rules for Vue, React Native.