eslint
8 traces
- TypeError: context.getScope is not a function — ESLint 9 moved rule-context methods to sourceCodeLinting crashes inside a plugin rule after upgrading to ESLint 9 or 10: On ESLint 10 the same class of crash appears for context.getSourceCode, context.getFilename, context.getCwd, context.getPhysicalFilename. Fix: 1.
- ESLint couldn't find an eslint.config.(js|mjs|cjs) file — ESLint 9+ ignores .eslintrc; migrate to flat configRunning npx eslint . Fix: Generate a starting flat config from the old file: Minimal hand-written equivalent: For a shareable config still in eslintrc format, wrap it with FlatCompat from @eslint/eslintrc…
- ESLint 10 looks up eslint.config.* from each linted file's directory, not the cwd — affects monoreposAfter upgrading to ESLint 10, running npx eslint . Fix: Also required for v10: Node.js 20.19+, 22.13+ or 24+ (Node < 20.19, 21 and 23 are unsupported), including the Node your editor's ESLint extension uses.
- pnpm 10: eslint/prettier plugins no longer hoisted to root node_modules — editor/IDE can't find themAfter upgrading to pnpm 10, an editor extension, a globally run eslint, or a shared config in a monorepo can't resolve eslint-plugin-, eslint-config- or prettier-plugin- packages that are only dependencies of another…
- eslint-plugin-react-hooks 6.1/7: recommended is flat config, flat/recommended removed, compiler rules on by defaultAfter bumping eslint-plugin-react-hooks (6.1.0 on 2025-10-01, 7.0.0 on 2025-10-08), either the .eslintrc extends: ['plugin:react-hooks/recommended'] breaks, a flat config referencing…
- Invalid project directory provided, no such directory: .../lint — `next lint` was removed in Next.js 16npm run lint with "lint": "next lint" fails on Next.js 16 with Invalid project directory provided, no such directory: .../apps/web/lint. Fix: Delete the eslint: {...} block from next.config.
- /* eslint-env */ comments are no longer supported — ESLint 10 reports them as errors; declare globals in configAfter upgrading to ESLint 10, files that start with an environment comment fail linting: Agents (and older tutorials) often add / eslint-env browser, node / or / eslint-env jest / to silence no-undef for globals. Fix:…
- Error: typescript-eslint does not support TS 7.0. — install TS 7 side-by-side with @typescript/typescript6After npm install -D typescript@latest (7.0.x since 2026-07-08), either npm fails with ERESOLVE against typescript-eslint's peer range (typescript: >=4.8.4 <6.1.0 as of typescript-eslint 8.71.2), or, if forced, every…