Bug: [no-unsafe-argument] doesn't flag unsafe argument with a type constraint #10415
Open
4 tasks done
Labels
accepting prs
Go ahead, send a pull request that resolves this issue
bug
Something isn't working
package: eslint-plugin
Issues related to @typescript-eslint/eslint-plugin
Uh oh!
There was an error while loading. Please reload this page.
Before You File a Bug Report Please Confirm You Have Done The Following...
Playground Link
https://typescript-eslint.io/play/#ts=4.8.4&fileType=.tsx&code=CYUwxgNghgTiAEYD2A7AzgF3hkmCMAXPABQZEoCuAtgEYgwCU8AvAHzwBuSAlsANwAoUJFgJk6LDkwAmIgB4AKvBAAPHCmBp4lWvVakiCpm049%2BAgQHpL8AGZRuELchhwwGCAE8BUjHmJ48FBaUCieDIJWNmgAFkgUEMB2DhA%2BuBjSAUEhYRECQA&eslintrc=N4KABGBEBOCuA2BTAzpAXGUEKQAIBcBPABxQGNoBLY-AWhXkoDt8B6Jge1tieQEMAZolp9oAc1gBbRC3RRE0aB2iRwYAL4h1QA&tsconfig=N4KABGBEDGD2C2AHAlgGwKYCcDyiAuysAdgM6QBcYoEEkJemy0eAcgK6qoDCAFutAGsylBm3TgwAXxCSgA&tokens=false
Repro Code
ESLint Config
tsconfig
Expected Result
I expect all use-cases to be consistent and report this as an error.
Actual Result
The use-cases with a type constraint doesn't report this as an error.
Additional Info
This seems similar to #10314, and it looks like the fix should be similar.
I'll add that I see similar inconsistencies on
no-unsafe-assignment
andno-unsafe-return
(false positives, in which the rule reports unnecessarily):I'll be happy also to report them (separately or as part of this issue) if this makes sense.
The text was updated successfully, but these errors were encountered: