This is a strict configuration for ESLint. It is meant for those who have never found a linter annoying before.
Currently supports ESLint v9 and the flat config only.
- Install dependencies:
npm i --save-dev eslint eslint-config-imperium
- Create
eslint.config.js
(see Example Configuration) - Run your linter:
npm run lint
(ornpx eslint
)
// eslint.config.js
import { auto } from "eslint-config-imperium";
export default [auto, stylistic];
This package is modular and includes several configurations intended to be enabled for certain environments. If you don't know what you need, you should probably use auto
. Otherwise, pick a combination of the above configurations.
auto
- Special configuration in which some of the below configurations are enabledbase
- Base framework and environment agnostic configuration
browser
- Browser environment configurationnode
- Node environment configurationreact
- React configurationtypescript
- TypeScript configurationvitest
- Vitest configuration
perfectionist
- Perfectionist configuration for objects orderprettier
- Prettier configurationstylistic
- Stylistic configuration
You should not enable prettier
and stylistic
at the same time.
This is a list of the currently used ESLint plugins:
@stylistic/eslint-plugin
@typescript-eslint/eslint-plugin
@vitest/eslint-plugin
eslint-plugin-n
eslint-plugin-perfectionist
eslint-plugin-prettier
eslint-plugin-promise
eslint-plugin-react
eslint-plugin-react-hooks
eslint-plugin-regexp
eslint-plugin-unicorn
- Clone the repository:
git clone https://github.com/Delemangi/eslint-config-imperium.git
- Install the dependencies:
npm i
- Build the package:
npm run build
After this, the build output will be placed in the lib
folder. You may use it directly, pack it or whatever you'd like afterwards.
MIT