-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Closed
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
Sigh This is supposed to be a simple reproduction, but the playground cannot treat the current file as a .d.ts file, so I have to provide a repo.
Reproduction Repository Link
Repro Steps
- clone the repo
yarn install- Go to
index.d.ts-> see that theexport {}is flagged - Comment it out, and go to
another-file.d.ts-> see that I'm able to import a non-exported type.
The reason is because .d.ts files with only type exports are still seen as scripts. (microsoft/TypeScript#38592) However, when I'm developing a utility type library, I don't really want to use .ts files that only export types—using .d.ts files makes sure the file only contains typedefs, and do not need to be compiled.
I expect the rule to not report empty exports in a .d.ts file with only type import/exports.
Versions
| package | version |
|---|---|
@typescript-eslint/eslint-plugin |
5.23.0 |
@typescript-eslint/parser |
5.23.0 |
@typescript-eslint/scope-manager |
5.23.0 |
@typescript-eslint/typescript-estree |
5.23.0 |
@typescript-eslint/type-utils |
5.23.0 |
@typescript-eslint/utils |
5.23.0 |
TypeScript |
4.6.4 |
ESLint |
8.15.0 |
node |
18.1.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