eslint-config-decent
raw JSON → 4.2.37 verified Sat Apr 25 auth: no javascript
A comprehensive ESLint configuration for TypeScript projects, currently at v4.2.37. Released under MIT license, it provides a curated set of linting rules from ESLint, typescript-eslint, unicorn, jsdoc, vitest, security, react, testing-library, and stylistic plugin. It also offers an experimental oxlint mirror (~95% rule coverage) and an Agent Skill for AI assistants. Designed for ESLint flat config (v9+), requires Node >=22.13.0 and TypeScript >=5.5.0. Differentiator: opinionated yet configurable, with first-class oxlint support and an AI skill for enforcing standards.
Common errors
error Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'eslint-config-decent' imported from /path/to/eslint.config.mjs ↓
cause Package not installed or not in node_modules.
fix
Run
npm install -D eslint-config-decent (or yarn/pnpm equivalent). Ensure eslint.config.mjs is in the project root. error TypeError: config is not a function ↓
cause Using default import instead of named import, or CommonJS require().
fix
Use
import { config } from 'eslint-config-decent' (named import). Do NOT use require('eslint-config-decent'). error Parsing error: The 'import.meta.dirname' meta property is only supported when the 'module' option is set to 'es2022' or later, or the 'target' option is set to 'es2022' or later. ↓
cause TypeScript or older Node version does not support import.meta.dirname.
fix
Ensure tsconfig.json sets module to 'es2022' or 'node16', and Node.js version >=22.13.0.
Warnings
breaking v4.x requires ESLint v9 flat config – does NOT work with .eslintrc.* ↓
fix Migrate to eslint.config.js/.mjs flat config format. See https://eslint.org/docs/latest/use/configure/migration-guide
breaking Node.js >=22.13.0 required; older versions will fail to parse ESM features or lack import.meta.dirname ↓
fix Upgrade Node.js to >=22.13.0 (LTS). Use process.cwd() or __dirname workaround if on older Node, but not officially supported.
gotcha tsconfigRootDir must be passed to config(). If omitted, type-aware rules may silently not run or throw errors ↓
fix Always provide tsconfigRootDir (e.g., import.meta.dirname). For complex monorepos, set it to the root of each tsconfig.
deprecated oxlint's 'naming-convention' rule is currently disabled (unrunnable under JS bridge). ↓
fix No action needed; will be restored when oxlint implements it natively. You can manually enable via overrides if needed.
Install
npm install eslint-config-decent yarn add eslint-config-decent pnpm add eslint-config-decent Imports
- config wrong
const config = require('eslint-config-decent')correctimport { config } from 'eslint-config-decent' - oxlintConfig wrong
import { oxlintConfig } from 'eslint-config-decent'correctimport { oxlintConfig } from 'eslint-config-decent/oxlint' - config wrong
export default config({})correctimport { config } from 'eslint-config-decent' export default config({ tsconfigRootDir: import.meta.dirname })
Quickstart
// eslint.config.mjs
import { config } from 'eslint-config-decent';
export default config({
tsconfigRootDir: import.meta.dirname,
});