Configures ESLint v9 flat config and neostandard for JavaScript and TypeScript projects, including migrating from legacy `.eslintrc*` files or the `standard` package. Use when you need to set up or fix linting with `eslint.config.js` or `eslint.config.mjs`, troubleshoot lint errors, configure neostandard rules, migrate from `.eslintrc` to flat config, or integrate linting into CI pipelines and pre-commit hooks.
96
96%
Does it follow best practices?
Impact
Pending
No eval scenarios have been run
Passed
No known issues
npm run lintUse lint-staged (or equivalent) to lint only changed files before commit.
{
"lint-staged": {
"*.{js,mjs,cjs,ts,mts,cts}": [
"eslint --fix"
]
}
}When using neostandard, keep pre-commit execution on eslint --fix because ESLint is the actual runner.
editor.codeActionsOnSave for explicit, predictable auto-fixesExample workspace settings:
{
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
},
"eslint.validate": ["javascript", "typescript"]
}