Closed
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
ast-spec
Playground Link
Repro Code
Looking at the source code, the types are currently defined as follows:
interface ImportAttribute {
parent: TSESTree.ImportDeclaration | TSESTree.ImportExpression;
}
However, I think the correct way to follow ESTree is as follows:
interface ImportAttribute {
- parent: TSESTree.ImportDeclaration | TSESTree.ImportExpression;
+ parent: TSESTree.ImportDeclaration | TSESTree. ExportNamedDeclaration | TSESTree. ExportAllDeclaration;
}
https://github.com/estree/estree/blob/master/es2025.md
What do you think?
ESLint Config
module.exports = {
/* This is not necessary. */
};
tsconfig
Expected Result
I think ImportAttribute#parent
needs to be TSESTree.ImportDeclaration | TSESTree. ExportNamedDeclaration | TSESTree. ExportAllDeclaration
.
Actual Result
Currently, ImportAttribute#parent
is TSESTree.ImportDeclaration | TSESTree.ImportExpression
, but I think this is wrong.
Additional Info
No response
Versions
package | version |
---|---|
@typescript-eslint/eslint-plugin |
8.12.2 |
@typescript-eslint/parser |
8.12.2 |
@typescript-eslint/rule-tester |
8.12.2 |
@typescript-eslint/scope-manager |
8.12.2 |
@typescript-eslint/typescript-estree |
8.12.2 |
@typescript-eslint/type-utils |
8.12.2 |
@typescript-eslint/utils |
8.12.2 |
TypeScript |
5.6.2 |
ESLint |
9.3.0 |
node |
22.4.1 |