-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed
Labels
bugSomething isn't workingSomething isn't workingpackage: eslint-pluginIssues related to @typescript-eslint/eslint-pluginIssues related to @typescript-eslint/eslint-plugin
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
{
"rules": {
"@typescript-eslint/typedef": [
"error",
{
"arrayDestructuring": true,
"arrowParameter": true,
"memberVariableDeclaration": true,
"objectDestructuring": true,
"parameter": true,
"propertyDeclaration": true,
"variableDeclaration": true
}
]
}
}class ClassName {
public str: string = 'str';
#num: number = 13;
func: () => void = (): void => {
console.log(this.str);
};
}Expected Result
Eslint check passed.
Actual Result
Line 2:
ESLint: Expected str to have a type annotation.(@typescript-eslint/typedef).
Line 3:
ESLint: Expected a type annotation.(@typescript-eslint/typedef).
Line 5:
ESLint: Expected func to have a type annotation.(@typescript-eslint/typedef).
Additional Info
Versions
| package | version |
|---|---|
@typescript-eslint/eslint-plugin |
5.1.0 |
@typescript-eslint/parser |
5.1.0 |
TypeScript |
4.4.4 |
ESLint |
8.0.1 |
node |
16.11.1 |
Shinigami92 and valentjn
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingpackage: eslint-pluginIssues related to @typescript-eslint/eslint-pluginIssues related to @typescript-eslint/eslint-plugin