@dendavidov/eslint-config
v3.0.0
Published
ESLint flat config for TypeScript/Node.js projects, supporting Node.js 24.x.
Readme
@dendavidov/eslint-config
Opinionated ESLint flat config for TypeScript-based Node.js projects.
- ESLint 9+ flat config
- Node.js 24.x required (
engines.node); this repo pins an exact patch in.nvmrc/Dockerfilefor CI - TypeScript, Prettier, Jest, and Security rules out of the box
- Jest globals automatically available in test files
eslint-plugin-importwitheslint-import-resolver-typescript(and node) soimport/no-unresolvedrespectstsconfig.json/ path aliases where configured
Installation
Add a single dev dependency — ESLint is bundled as a normal dependency of @dendavidov/eslint-config, so you do not install eslint, plugins, or parsers yourself; they come in transitively.
pnpm add -D @dendavidov/eslint-config
# or: npm i -D @dendavidov/eslint-configRun the CLI with npx eslint or pnpm exec eslint (or a lint script that calls eslint), which resolves the binary from your install tree. Your project pins one package version; ESLint’s semver is chosen by this config’s dependencies.
Usage
Create eslint.config.js in the root of your project:
CommonJS:
const config = require('@dendavidov/eslint-config');
module.exports = config;ESM:
import config from '@dendavidov/eslint-config';
export default config;Or extend with your own rules:
import config from '@dendavidov/eslint-config';
export default [
...config,
{
rules: {
// Your custom rules
}
}
];Add script to package.json:
{
"scripts": {
"lint": "eslint './src/**/*.{ts,tsx,js,jsx}'"
}
}Node.js Version
This config requires Node.js 24.x (see engines.node on npm). Development of this package uses a pinned patch in .nvmrc (and Dockerfile) so CI and Dependabot stay aligned.
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
