This package is a shared configuration file for ESLint. To use this config, follow the installation instructions.
Install the following packages:
eslint
@ivao/eslint-config
npm add --save-dev eslint @ivao/eslint-config
or yarn add -D eslint @ivao/eslint-config
or pnpm add -D eslint @ivao/eslint-config
You must add a eslint.config.(m)js
file to your project to use this config package:
import ivaoConfig from '@ivao/eslint-config';
export default [
...ivaoConfig.configs.base,
...ivaoConfig.configs.prettier,
{
languageOptions: {
parserOptions: {
projectService: {
allowDefaultProject: ['eslint.config.(m)js'],
},
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
tsconfigRootDir: import.meta.dirname,
},
},
},
];
The package provides 5 configuration presets and 2 setups.
The base configuration for all projects.
Enables the prettier plugin.
Enables many React ESLint plugins. Checkout src/react.ts
for more information. Tip: you can always disable some specific rules in your eslint.config.(m)js
file by appending a new block to the export array in which you can overwrite any settings.
Enables rules and plugins for storybook development.
Enables ESLint rules for TailwindCSS.
This rule is not enabled automatically, because at time of writing, the eslint tailwind plugin does not support tailwind v4.
Works for tailwind v3 only!
import ivaoConfig from '@ivao/eslint-config';
import ivaoTaliwindConfig from '@ivao/eslint-config';
export default [
// ...
...ivaoTaliwindConfig,
// ...
];
The setup enables the configs base
, prettier
, react
.
The setup enables the configs base
, react
.