-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed as not planned
Labels
bugSomething isn't workingSomething isn't workingfix: flat config user errorLike "fix: user error" - but specifically for flat config user errorsLike "fix: user error" - but specifically for flat config user errorsfix: user errorissue was fixed by correcting the configuration / correcting the codeissue was fixed by correcting the configuration / correcting the code
Description
Before You File a Bug Report Please Confirm You Have Done The Following...
- I have tried restarting my IDE and the issue persists.
- I have updated to the latest version of the packages.
- I have searched for related issues and found none that matched my issue.
- I have read the FAQ and my problem is not listed.
Relevant Package
typescript-eslint
Playground Link
No response
Repro Code
I am trying to update my project to the latest version of eslint-plugin-react-hooks and in doing so had to redo my entire eslint.config.js. See config below. I stripped everything out to the minimum to still reproduce the error. When I run the linter, I get the error shown in Actual Result. I've searched for it and can't find another instance of it.
ESLint Config
import { defineConfig } from 'eslint/config';
import tseslint from '@typescript-eslint/eslint-plugin';
export default defineConfig(
{
files: ['**/*.ts', '**/*.tsx', '**/*.js'],
extends: [
tseslint.configs.recommended,
]
}
);tsconfig
Expected Result
I don't have a nested extends, so I would expect the linter to work with my config.
Actual Result
❯ npm run lint
> vite-project@0.0.0 lint
> eslint .
Oops! Something went wrong! :(
ESLint: 9.39.1
TypeError: Nested 'extends' is not allowed.
at processExtends (./node_modules/@eslint/config-helpers/dist/cjs/index.cjs:462:10)
at ./node_modules/@eslint/config-helpers/dist/cjs/index.cjs:504:38
at Array.flatMap (<anonymous>)
at processConfigList (./node_modules/@eslint/config-helpers/dist/cjs/index.cjs:504:20)
at defineConfig (./node_modules/@eslint/config-helpers/dist/cjs/index.cjs:540:9)
at file://./eslint.config.js?mtime=1762380747314:5:16
at ModuleJob.run (node:internal/modules/esm/module_job:371:25)
at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:669:26)
at async dynamicImportConfig (./node_modules/eslint/lib/config/config-loader.js:186:17)
at async loadConfigFile (./node_modules/eslint/lib/config/config-loader.js:276:9)
Additional Info
No response
Versions
| package | version |
|---|---|
TypeScript |
5.9.3 |
ESLint |
9.39.1 |
node |
24.6.0 |
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingfix: flat config user errorLike "fix: user error" - but specifically for flat config user errorsLike "fix: user error" - but specifically for flat config user errorsfix: user errorissue was fixed by correcting the configuration / correcting the codeissue was fixed by correcting the configuration / correcting the code
{ "compilerOptions": { // ... } }