Originally based on airbnb's config.
Fully integrated with prettier.
Leverages project's webpack config (if one's found) in resolving imports.
In addition to the core rules includes:
- eslint-plugin-import
- eslint-plugin-sort-destructure-keys
- no-use-extend-native
- eslint-plugin-react
- eslint-plugin-react-hooks
- eslint-plugin-jsx-a11y
- eslint-plugin-progress
Typescript–friendly via:
- @typescript-eslint integration
- separate entry point for the extended ruleset
Install this package, prettier
and eslint
itself. Don't forget to configure your IDE
npm i eslint prettier @keann/eslint-config --save-dev
Configuration of prettier
is totally up to you. Usually it's run in the IDE by a plugin or extension. However even if you don't do that, errors will be properly shown instead of auto-formatting.
Small chances you wouldn't have the typescript
package installed in such case, but still a reminder: you'll do also need it, installed preferably locally
npm i typescript eslint prettier @keann/eslint-config --save-dev
Choose the respective entry point to inherit from
/* .eslintrc.js */
// main ruleset for the JS-only codebase
module.exports = {
extends: ['@keann'],
};
// or main ruleset + corresponding overrides for the TS (JS+TS) codebase
module.exports = {
extends: ['@keann/typescript'],
};
Wish to have a progress bar while checking a large amount of files at once, but eslint
has no such builtin option? Thankfully there's a custom plugin for that, just extend one more entry point.
module.exports = {
extends: ['@keann', '@keann/progress'],
};