-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed
Labels
accepting prsGo ahead, send a pull request that resolves this issueGo ahead, send a pull request that resolves this issuebugSomething isn't workingSomething isn't workinglocked due to agePlease open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing.Please open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing.package: eslint-pluginIssues related to @typescript-eslint/eslint-pluginIssues related to @typescript-eslint/eslint-plugin
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
Repro Code
let value: number;
value = spooky;
ESLint Config
module.exports = {
"rules": {
"@typescript-eslint/no-unsafe-assignment": "error"
}
}
tsconfig
No response
Expected Result
Users should be told that the type is an "error" variant of any
. It's confusing to have the same report show up for both a "real" any
and an error in type checking.
Actual Result
The same error as if we'd added a declare const spooky: any;
:
Unsafe assignment of an `any` value.
Additional Info
Although the type's typeToString()
returns "any"
, its intrinsic name is "error"
. See the Types panel of the linked playground.
Error types in type checking are often a symptom of misconfiguration around TypeScript and/or typescript-eslint. Example StackOverflow question around an any
in a lint rule.
Metadata
Metadata
Assignees
Labels
accepting prsGo ahead, send a pull request that resolves this issueGo ahead, send a pull request that resolves this issuebugSomething isn't workingSomething isn't workinglocked due to agePlease open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing.Please open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing.package: eslint-pluginIssues related to @typescript-eslint/eslint-pluginIssues related to @typescript-eslint/eslint-plugin