René's ESLint configuration.
pnpm add -D eslint @rkulik/eslint-config
Once installed, create an eslint.config.js
in your project root:
import rkulik from '@rkulik/eslint-config';
// eslint-disable-next-line import/no-default-export
export default rkulik();
Add a script to your package.json
that runs ESLint:
{
"scripts": {
"lint": "eslint . -c eslint.config.js"
}
}
By default, rkulik
includes or excludes multiple configurations based on locally installed packages. However, you can configure which configurations should be included or excluded as needed:
// eslint.config.js
import rkulik from '@rkulik/eslint-config';
export default rkulik({ imports: false });
As a second parameter, rkulik
accepts custom configuration overrides, allowing you to modify or extend the default settings:
// eslint.config.js
import rkulik from '@rkulik/eslint-config';
// eslint-disable-next-line import/no-default-export
export default rkulik({}, { ignores: ['**/some-directory'] });
This package also exports all available configurations and utilities. These exports allow you to create your own customized configurations:
// eslint.config.js
import { configs, utils } from '@rkulik/eslint-config';
// eslint-disable-next-line import/no-default-export
export default utils.combineConfigs(
configs.destructuring,
configs.ignores,
configs.imports,
configs.javascript,
configs.preferArrow,
configs.prettier,
configs.react,
configs.tailwindcss,
configs.typescript,
);
Distributed under the MIT License, Copyright © 2024-PRESENT René Kulik