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 have searched for related issues and found none that matched my issue.
- I have read 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: '',
})
export class AppComponent {}
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
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 |