A collection of optionated in-house linting rules.
ESLint configuration is provided in the eslint.config.js
, aka. "Flat Config" format.
yarn add -D @atmina/linting
# or
pnpm add -D @atmina/linting
yarn linting
# or
pnpm linting
This will set up the necessary dependencies and configurations for you.
In VS Code, use these workspace settings:
{
"eslint.experimental.useFlatConfig": true,
"eslint.workingDirectories": [
// In a monorepo, specify linted packages here
"frontend"
],
// Optional
"editor.codeActionsOnSave": {
"source.fixAll": true
}
}
In WebStorm, go to Settings and enable ESLint (Select "Automatic ESLint Configuration"). If desired, enable "Run eslint --fix on Save".
When working on linting
, it may be useful to test its effects in a different project. To do so, link your local copy
of linting
in the other project's package.json (works with pnpm and yarn). This may require restarting your IDE once
after setting up the link.
{
"devDependencies": {
"@atmina/linting": "link:local/path/to/linting"
}
}