Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
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 havesearched for related issues and found none that matched my issue.
- I haveread 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:
interfaceImportAttribute{parent:TSESTree.ImportDeclaration|TSESTree.ImportExpression;}
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
{"compilerOptions": {// This is not necessary. }}
Expected Result
I thinkImportAttribute#parent
needs to beTSESTree.ImportDeclaration | TSESTree. ExportNamedDeclaration | TSESTree. ExportAllDeclaration
.
Actual Result
Currently,ImportAttribute#parent
isTSESTree.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 |