Default Eslint configuration for my projects.
- Install package and dependencies using your favorite manager
$ pnpm i -D @radoslawgrochowski/eslint-config eslint prettier
- Setup
eslint.config.mjs
:
// @ts-check
import config from "@radoslawgrochowski/eslint-config";
export default [
// add project rules
{ ignores: ["**/.next"] },
...config,
];
- Update
package.json
's scripts:
{
"scripts": {
"lint": "eslint . --report-unused-disable-directives --max-warnings 0",
"lint:fix": "pnpm lint --fix"
}
}
- Setup CI
See this project's lint workflow as an example. Don't forget to set up "Require status checks to pass before merging".