@tophat/eslint-config v9.0.0
@tophat/eslint-config
:shark: Top Hat's shareable eslint configuration
Usage
The default config includes the following:
- A set of base eslint rules for all JavaScript projects
- Rules for React apps
- Rules for Jest tests
- Rules for web apps
Extend the default config by first installing all the required dependencies:
yarn add --dev \
@tophat/eslint-config \
eslint \
prettier \
eslint-config-prettier \
eslint-plugin-prettier \
eslint-plugin-react \
eslint-plugin-react-hooks \
eslint-plugin-jsx-a11y \
eslint-plugin-jest \
eslint-plugin-import
or
npm install --save-dev # etc ...
Then update your eslint config (for example, .eslintrc.js):
module.exports = {
extends: '@tophat'
}
Picking and choosing certain configs
You can extend each of the configs separately by specifying them in your eslint config:
module.exports = {
extends: [
// Pick and choose from the following list of configs
'@tophat/eslint-config/base',
'@tophat/eslint-config/react',
'@tophat/eslint-config/jest',
'@tophat/eslint-config/web',
]
}
Peer dependencies per config
Each config requires certain peer dependencies:
- base: eslint, prettier, eslint-config-prettier, eslint-plugin-import, eslint-plugin-prettier
- react: eslint-plugin-react, eslint-plugin-react-hooks, eslint-plugin-jsx-a11y
- jest: eslint-plugin-jest
- web: (none)
You only have to install the dependencies for the configs which you are using.
Upgrading this package
See the CHANGELOG.
Making changes to this package
See the CONTRIBUTING guide.
10 months ago
10 months ago
8 months ago
7 months ago
8 months ago
7 months ago
7 months ago
7 months ago
10 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago