Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[no-unsafe-call] Triggered on arguments with any type #1825

Closed
gebsh opened this issue Mar 30, 2020 · 1 comment · Fixed by #1826
Closed

[no-unsafe-call] Triggered on arguments with any type #1825

gebsh opened this issue Mar 30, 2020 · 1 comment · Fixed by #1826
Labels
bug Something isn't working has pr there is a PR raised to close this package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin

Comments

@gebsh
Copy link
Contributor

gebsh commented Mar 30, 2020

Repro

{
  "rules": {
    "@typescript-eslint/no-unsafe-call": "error"
  }
}
let foo: any = 23;
let bar: number = 23;

String(foo); // ERROR: Unsafe call of an any typed value
String(bar); // Works fine

Expected Result
Pass the test since foo is not called but passed as an argument.

Actual Result
An error Unsafe call of an any typed value is reported.

Additional Info
This works fine when I downgrade @typescript-eslint/eslint-plugin to 2.25.0.

Versions

package version
@typescript-eslint/eslint-plugin 2.26.0
@typescript-eslint/parser 2.26.0
TypeScript 3.8.3
ESLint 6.8.0
node 13.12.0
npm 6.14.4
@gebsh gebsh added package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin triage Waiting for maintainers to take a look labels Mar 30, 2020
@bradzacher bradzacher added bug Something isn't working has pr there is a PR raised to close this and removed triage Waiting for maintainers to take a look labels Mar 30, 2020
@bradzacher
Copy link
Member

Oops, this is a regression accidentally introduced in #1800

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working has pr there is a PR raised to close this package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants