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
neostandard is a shared ESLint flat config and config generator, not a standalone replacement linter command.
neostandard and eslinteslint.config.js / eslint.config.mjseslint (eslint ., eslint . --fix)npm install --save-dev neostandard eslintGenerate ESM config:
npx neostandard --esm > eslint.config.jsGenerate CommonJS config:
npx neostandard > eslint.config.jsOr author manually (ESM):
import neostandard from 'neostandard'
export default neostandard({
ts: true
}){
"scripts": {
"lint": "eslint .",
"lint:fix": "eslint . --fix"
}
}ts: true — lint *.ts and *.d.tssemi: true — semicolon mode (semistandard-style)noStyle: true — disable style rules (useful with Prettier/dprint)noJsx: true — disable JSX rulesignores, files, filesTs, env, globalsAs of neostandard v1+, eslint-plugin-import-x is no longer bundled.
eslint-plugin-import-x explicitlytsc --noEmit for module/import correctness checksUse .gitignore patterns as ESLint ignores:
import neostandard, { resolveIgnoresFromGitignore } from 'neostandard'
export default neostandard({
ignores: resolveIgnoresFromGitignore()
})For projects moving from standard, keep neostandard as the config source but run lint through eslint.