-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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/no-unsafe-return": "error"
}
}function returnsAnyIntentionally(input: string): any {
return JSON.parse(input);
}Practically, see removeLocationDataAndSourceTypeFromProgramNode internally. https://github.com/typescript-eslint/typescript-eslint/blob/9524424a4bce09dafb7eb0d6c322f07f2a0003da/packages/typescript-estree/tests/ast-alignment/utils.ts
Expected Result
Suppose you have a function that intentionally has a : any return type declared and returns something that is any.
Can we add an option to the rule like allowExplicitAny that prevents a rule complaint if the function has that : any?
Actual Result
This rule still gives a complaint on that, even though the any is intentional.
Versions
| package | version |
|---|---|
@typescript-eslint/eslint-plugin |
4.26.0 |
@typescript-eslint/parser |
4.26.0 |
TypeScript |
4.3.2 |
ESLint |
7.27.0 |
node |
12.16.0 |
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