Narzędzia
tooling/eslint-flat-config
ESLint is configured in eslint.config.* (flat config); .eslintrc files and .eslintignore are migrated, not kept beside it.
umiarkowanaręcznefe-tooling
Dlaczego
ESLint 10 reads only eslint.config.js (or .mjs, .cjs, .ts); an .eslintrc* file or an eslintConfig key in package.json is no longer used, and .eslintignore is not read. A project that upgraded without migrating lints with a config nobody wrote, or not at all, while the old file suggests otherwise. Next.js 16 also removed next lint.
Poprawka
Migrate with npx @eslint/migrate-config .eslintrc.json, move ignore patterns into an ignores entry (or globalIgnores()), delete the old files, and run eslint . from a package script. A TypeScript config file (eslint.config.ts) needs jiti as a dev dependency on Node.
Przykłady
// eslint.config.js
import js from '@eslint/js'
import { defineConfig, globalIgnores } from 'eslint/config'
export default defineConfig([globalIgnores(['dist/']), js.configs.recommended])Źródła
Fakty
- Identyfikator
tooling/eslint-flat-config- Waga
- umiarkowana
- Sprawdzanie
- ręczne ocenia człowiek; raport podaje to jako listę kontrolną
- Dotyczy plików
project- Tylko w projektach z
eslint- Uczy jej skill
fe-toolingBuild, lint and format tooling- Od wersji
- 0.1.0
Przeczytaj w terminalu
npx github:dawidolko/frontend-skills explain tooling/eslint-flat-config