-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed
Labels
bugSomething isn't workingSomething isn't workinghas prthere is a PR raised to close thisthere is a PR raised to close thispackage: eslint-pluginIssues related to @typescript-eslint/eslint-pluginIssues related to @typescript-eslint/eslint-plugin
Milestone
Description
- I have tried restarting my IDE and the issue persists.
- I have updated to the latest version of the packages.
- I have read the FAQ and my problem is not listed.
Repro
.eslintrc.js
{
rules: {
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': ['error', {
varsIgnorePattern: '^_',
argsIgnorePattern: '^_',
ignoreRestSiblings: true,
}],
}
}
tsconfig.json
{
"compilerOptions": {
"module": "esnext",
"moduleResolution": "node",
"target": "es5",
"allowJs": true,
"importHelpers": true,
"jsx": "react",
"experimentalDecorators": true,
"isolatedModules": true,
"importsNotUsedAsValues": "error"
}
}
// a.ts
export const foo = 42;
// b.ts
import type { foo } from './a';
export type Bar = typeof foo;
Expected Result
No lint errors
Actual Result
b.ts 1:15 'foo' is defined but never used. Allowed unused vars must match /^_/u. (@typescript-eslint/no-unused-vars)
Additional Info
Versions
package | version |
---|---|
@typescript-eslint/eslint-plugin |
4.0.1 |
@typescript-eslint/parser |
4.0.1 |
TypeScript |
4.0.2 |
ESLint |
7.8.0 |
node |
10.16.3 |
deepsweet, cef62, yamachu, yykamei, pleunv and 16 morepapb
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinghas prthere is a PR raised to close thisthere is a PR raised to close thispackage: eslint-pluginIssues related to @typescript-eslint/eslint-pluginIssues related to @typescript-eslint/eslint-plugin