-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Labels
accepting prsGo ahead, send a pull request that resolves this issueGo ahead, send a pull request that resolves this issuebugSomething isn't workingSomething isn't workingpackage: eslint-pluginIssues related to @typescript-eslint/eslint-pluginIssues related to @typescript-eslint/eslint-plugin
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.
Issue Description
The following piece of code has two issues:
import { SomeThing } from './types.js';
const SomeThing = { foo: 'bar' };
export { SomeThing };Firstly, it does not flag that import { SomeThing } from './types.js'; should be import { type SomeThing } from './types.js'; (problem with consistent-type-imports).
Secondly, it does error with "All exports in the declaration are only used as types.", even though the export is very clearly not a type.
This issue manifested itself in v8.43.0. I suspect it is a regression to do with #11457
Reproduction Repository Link
Repro Steps
- clone the repo
npm installnpm run lint
Running npm run lint should error on the should not error on the export. Instead it does the reverse.import in src/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 |
Metadata
Metadata
Assignees
Labels
accepting prsGo ahead, send a pull request that resolves this issueGo ahead, send a pull request that resolves this issuebugSomething isn't workingSomething isn't workingpackage: eslint-pluginIssues related to @typescript-eslint/eslint-pluginIssues related to @typescript-eslint/eslint-plugin