Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
Open
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 havesearched for related issues and found none that matched my issue.
- I haveread the FAQ and my problem is not listed.
Relevant Package
typescript-estree
Playground Link
Repro Code
classE1{}classE2{}// class X2 extends E1 extends E2 {} // This is reportedinterfaceY2extendsE1extendsE2{}// This is NOT reported
ESLint Config
tsconfig
Expected Result
Parser should report internal errorTS1172: 'extends' clause already seen.
like TS does.
Actual Result
No errors are reported.
Additional Info
Since duplicateextends
are reported correctly forclass
, they should be reported forinterface
too?
typescript-eslint/packages/typescript-estree/src/convert.ts
Lines 2043 to 2049 in7f32763
if(token===SyntaxKind.ExtendsKeyword){ | |
if(extendsClause){ | |
this.#throwUnlessAllowInvalidAST( | |
heritageClause, | |
"'extends' clause already seen.", | |
); | |
} |
I can send a PR if this is acceptable change.
Versions
package | version |
---|---|
@typescript-eslint/typescript-estree | 8.30.1 |