A hand-crafted ESLint configuration set.
As the minimal setup, you can install 📦 @axross/eslint-config
along with ESLint:
npm i -D @axross/eslint-config eslint
And create/update eslint.config.cjs as the following:
/* global __dirname:readonly */
module.exports = [
...require("./src/config.cjs")({ tsconfigRootDir: __dirname }),
];
For further better setups, please see Recommended Setup section.
This config detects the installed plugins in your project and automatically opts in the respective configurations. Currently this config supports the following plugins:
@eslint/js
typescript-eslint
eslint-plugin-unicorn
eslint-plugin-compat
-
eslint-plugin-import
- When you're using TypeScript, you need to install
typescript-eslint
andeslint-import-resolver-typescript
as well
- When you're using TypeScript, you need to install
@stylistic/eslint-plugin
eslint-plugin-perfectionist
eslint-plugin-react
eslint-plugin-react-hooks
eslint-plugin-jsx-a11y
-
eslint-plugin-next
(normally comes withnext
) @react-native/eslint-plugin
eslint-plugin-jest
eslint-plugin-jest-dom
eslint-plugin-jest-formatting
eslint-plugin-testing-library
eslint-plugin-storybook
eslint-plugin-tailwindcss
eslint-config-prettier
npm i -D \
@axross/eslint-config \
eslint \
@eslint/js \
typescript-eslint \
eslint-plugin-unicorn \
eslint-plugin-compat \
eslint-plugin-import \
eslint-plugin-perfectionist \
eslint-plugin-react \
eslint-plugin-react-hooks \
eslint-plugin-jsx-a11y \
eslint-plugin-next \
eslint-plugin-jest \
eslint-plugin-jest-dom \
eslint-plugin-jest-formatting \
eslint-plugin-testing-library \
eslint-plugin-storybook
npm i -D \
@axross/eslint-config \
eslint \
@eslint/js \
typescript-eslint \
eslint-plugin-unicorn \
eslint-plugin-compat \
eslint-plugin-import \
eslint-plugin-perfectionist \
eslint-plugin-react \
eslint-plugin-react-hooks \
eslint-plugin-jsx-a11y \
@react-native/eslint-plugin