My shared ESLint configs.
The configurations can be mixed, e.g. React
+ TypeScript
.
For all configurations, install the following package:
npm install --save-dev @darekkay/eslint-config
You may require additional packages, depending on your environment:
# Babel
npm install --save-dev @babel/core @babel/preset-env @babel/preset-react @babel/eslint-parser
# TypeScript
npm install --save-dev typescript
Those configurations are ready-to-use:
@darekkay/eslint-config/react
: Config for React projects.@darekkay/eslint-config/nodejs
: Config for Node (non-browser) projects.@darekkay/eslint-config/typescript
: Config for TypeScript projects.
Each plugin config can be imported individually:
@darekkay/eslint-config/base
: Native ESlint rules.@darekkay/eslint-config/plugins/import
: Rules for eslint-plugin-import.@darekkay/eslint-config/plugins/jest
: Rules for eslint-plugin-jest.@darekkay/eslint-config/plugins/jest-dom
: Rules for eslint-plugin-jest-dom.@darekkay/eslint-config/plugins/node
: Rules for eslint-plugin-node.@darekkay/eslint-config/plugins/react
: Rules for eslint-plugin-react, eslint-plugin-react-hooks, eslint-plugin-jsx-a11y.@darekkay/eslint-config/plugins/testing-library
: Rules for eslint-plugin-testing-library.@darekkay/eslint-config/plugins/typescript-static
: Rules for @typescript-eslint/eslint-plugin that do not require type information (= faster to run).@darekkay/eslint-config/plugins/typescript-types
: Rules for @typescript-eslint/eslint-plugin that require type information (= slower to run).@darekkay/eslint-config/plugins/unicorn
: Rules for eslint-plugin-unicorn.
ESLint warnings can and often will be easily ignored. That's why this config treats all ESLint violations as errors.
There are some more useful ESLint plugins that are not (yet) part of this project.
- Awesome ESLint
- Shareable ESLint configs
- Support having plugins as dependencies in shareable config
- ESLint plugin/config explanation
This project and its contents are open source under the MIT license.