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
95%
Does it follow best practices?
Impact
97%
1.25xAverage score across 5 eval scenarios
Passed
No known issues
A JavaScript project has ESLint v9 with neostandard already configured via eslint.config.js. The team now wants to integrate linting into two places: their GitHub Actions CI pipeline and their local developer workflow via git pre-commit hooks. They've had bugs slip through in the past because developers didn't run the linter locally before pushing.
The CI integration should prevent merges when lint fails. The local hook should automatically fix style issues on files being committed, so developers don't have to manually run the linter. The team uses Node.js 20 in production and wants consistency across environments.
Produce the following files:
.github/workflows/ci.yml — a GitHub Actions workflow that runs linting as a required job (use ubuntu-latest)package.json — with any new dependencies and configuration needed for pre-commit hooksSETUP.md explaining how a new developer sets up the pre-commit hooks locallyThe following files are provided as inputs. Extract them before beginning.
=============== FILE: package.json =============== { "name": "my-app", "version": "1.0.0", "type": "module", "scripts": { "build": "node build.js", "test": "node --test", "lint": "eslint .", "lint:fix": "eslint . --fix" }, "devDependencies": { "eslint": "^9.0.0", "neostandard": "^0.12.0" } }
=============== FILE: eslint.config.js =============== import neostandard from 'neostandard'
export default neostandard()
=============== FILE: src/app.js ===============
export function greet(name) {
return Hello, ${name}!
}