Bug: Duplicate extends
clause for interface
should be reported
#11077
Labels
accepting prs
Go ahead, send a pull request that resolves this issue
AST
PRs and Issues about the AST structure
bug
Something isn't working
package: typescript-estree
Issues related to @typescript-eslint/typescript-estree
Before You File a Bug Report Please Confirm You Have Done The Following...
Relevant Package
typescript-estree
Playground Link
https://typescript-eslint.io/play/#ts=5.4.3&fileType=.tsx&code=MYGwhgzhAECiCM0DeBfAUKSNYCZno3CmgA1EBTADwBdyA7AE20VTQHo3pNiS8rbGzaP3pM4eVtxgkAzNACWAWwAOIcovrUhrDlyLSALApVqNdLXERLV6zdgnoppAKzCaooddN3x%2BdpycSADZjGzMLBDcBMVw-NHlzcgAnADMwYHJoAE0Kd0FLPwTaVPTMrL48mNzo%2B3xoXUBeDcABHegAFQALeRgIdoB7AFcQBmgAI0yk8mVepNphkYBPaGUwJIhkgBpoEHkAa0ze6nbkiH8FRJKM7LkvW3NtdF0i5LTLrKMb8M8TW4iHU6eLmVXB8fJERPlYjpOACXmUQuCqqFvHdfKggA&eslintrc=N4KABGBEBOCuA2BTAzpAXGYBfEWg&tsconfig=N4KABGBEDGD2C2AHAlgGwKYCcDyiAuysAdgM6QBcYoEEkJemy0eAcgK6qoDCAFutAGsylBm3TgwAXxCSgA&tokens=false
Repro Code
ESLint Config
tsconfig
Expected Result
Parser should report internal error
TS1172: 'extends' clause already seen.
like TS does.https://www.typescriptlang.org/play/?#code/MYGwhgzhAECiCM0DeBfAUKSNYCZno3CmgA1EBTADwBdyA7AE20VTQHo3pNiS8rbGzaP3pM4eVtxgkAzNACWAWwAOIcovrUhrDlyLSALApVqNdLXERLV6zdgnoppAKzCaooddN3x+dpycSADZjGzMLBDcBMVw-NHlzcgAnADMwYHJoAE0Kd0FLPwTaVPTMrL48mNzo+z9dIuS0jOy5L1tzbXR6xJLmrKM28M8TdoiHfwUeprLXQZ9IkXzYnU4G3rKQxarQ7w7fVCA
Actual Result
No errors are reported.
Additional Info
Since duplicate
extends
are reported correctly forclass
, they should be reported forinterface
too?typescript-eslint/packages/typescript-estree/src/convert.ts
Lines 2043 to 2049 in 7f32763
I can send a PR if this is acceptable change.
leaysgur@0a6d4db
Versions
@typescript-eslint/typescript-estree
8.30.1
The text was updated successfully, but these errors were encountered: