Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
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.
Issue Description
The following piece of code has two issues:
import{SomeThing}from'./types.js';constSomeThing={foo:'bar'};export{SomeThing};
Firstly, it does not flag thatimport { SomeThing } from './types.js'; should beimport { type SomeThing } from './types.js'; (problem withconsistent-type-imports).
Secondly, it does error with "All exports in the declaration are only used as types.", even though the export is very clearlynot a type.
This issue manifested itself in v8.43.0. I suspect it is a regression to do with#11457
Reproduction Repository Link
https://github.com/simon-abbott/ts-eslint-issue-mre-import-shadowing
Repro Steps
- clone the repo
npm installnpm run lint
Runningnpm run lintshould error on theshould not error on the export. Instead it does the reverse.import insrc/index.ts, and
Versions
| package | version |
|---|---|
@typescript-eslint/eslint-plugin | 8.46.4 |
@typescript-eslint/parser | 8.46.4 |
TypeScript | 5.9.2 |
ESLint | 8.57.1 |
node | 22.19.0 |