[!Important] This package contains a set of rules for the new eslint flat config (v9+).
-
base -
eslint
-
imports -
eslint-plugin-import
andeslint-plugin-simple-import-sort
-
typescript -
typescript-eslint
(checks'**/*.{ts,tsx,mts,cts}'
) -
react -
eslint-plugin-react
andeslint-plugin-react-hooks
(checks'**/*.{js,jsx,mjs,cjs,ts,tsx}'
)
- Install the correct versions of each package, which are listed by the command:
npm i --save-dev eslint typescript eslint-config-wizardry
- Add import to your
eslint.config.js
/ any of available config formats
// eslint.config.js
import wizardryConfig from 'eslint-config-wizardry';
const config = [
...wizardryConfig,
{
// your config
}
];
export default config;
- Add scripts to your package.json (optional)
{
"scripts": {
"lint": "eslint .",
"lint:fix": "eslint . --fix"
}
}