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.
Playground Link
does not work
Repro Code
import{Component}from'@angular/core'@Component({selector:'app-root',template:'',})exportclassAppComponent{}
ESLint Config
{"root":true,"overrides":[// ....{"files":["*.ts"],"parser":"@typescript-eslint/parser","plugins":["tsdoc","@typescript-eslint"],"extends":["plugin:@typescript-eslint/recommended","plugin:@typescript-eslint/recommended-requiring-type-checking","plugin:@typescript-eslint/strict"],"parserOptions":{"project":["tsconfig.lint.json"]},"rules":{"tsdoc/syntax":"error"}},{"files":["src/**/*.ts"],"env":{"node":false,"browser":true},"extends":["plugin:compat/recommended","plugin:@angular-eslint/recommended","plugin:@angular-eslint/template/process-inline-templates"],"parserOptions":{"project":["tsconfig.lint.json"]},"rules":{"no-alert":"error","no-debugger":"error","no-console":"error","@angular-eslint/component-class-suffix":["error",{"suffixes":["Page","Component"]}],"@typescript-eslint/explicit-module-boundary-types":["off",{"allowHigherOrderFunctions":true}]}},{"files":["*.js","*.mjs","*.ts","*.mts","*.html"],"extends":["prettier"]}]}
tsconfig
{"$schema":"http://json.schemastore.org/tsconfig","compileOnSave":false,"compilerOptions": {"baseUrl":".","outDir":"./dist/out-tsc","strict":true,"noImplicitAny":true,"noImplicitReturns":true,"noImplicitThis":true,"noImplicitOverride":true,// "noPropertyAccessFromIndexSignature": true,"noFallthroughCasesInSwitch":true,"forceConsistentCasingInFileNames":true,"strictPropertyInitialization":true,"strictNullChecks":true,"esModuleInterop":true,"downlevelIteration":true,"sourceMap":true,"declaration":false,"experimentalDecorators":true,"resolveJsonModule":true,"skipLibCheck":true,"moduleResolution":"node","importHelpers":true,"target":"ES2020","module":"ESNext","lib": ["ESNext","DOM"] },"angularCompilerOptions": {"fullTemplateTypeCheck":true,"enableI18nLegacyMessageIdFormat":false,"strictInjectionParameters":true,"strictInputAccessModifiers":true,"strictTemplates":true }}
Expected Result
Recognise imported "Component" as "experimentalDecorators".
Actual Result
'Component' is defined but never used.eslint@typescript-eslint/no-unused-vars
Additional Info
No response
Versions
package | version |
---|---|
@typescript-eslint/eslint-plugin | ^5.36.0 |
@typescript-eslint/parser | ^5.36.0 |
TypeScript | <4.8.0 |
ESLint | ^8.23.0 |
node | 17 |