ESLint flat config only

Rule

Lint configuration lives in eslint.config.js using the flat config format. Do not create .eslintrc, .eslintrc.json, .eslintrc.cjs or an eslintConfig key in package.json. Tool configs are protected paths; agents never edit them.

Do

import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';
 
export default tseslint.config(
  eslint.configs.recommended,
  ...tseslint.configs.recommended,
  { ignores: ['dist/'] }
);

Don’t

{
  "root": true,
  "parser": "@typescript-eslint/parser",
  "extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"]
}

Rationale

ESLint 9 looks only for flat config by default and exits with an error when none exists, so a repo with only .eslintrc.json fails the lint step. ESLint 10 removes the legacy format entirely.