Bug: [no-unnecessary-boolean-literal-compare] doesn't flag values of a type parameter with boolean type constraint #10443
Labels
accepting prs
Go ahead, send a pull request that resolves this issue
bug
Something isn't working
locked due to age
Please open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing.
package: eslint-plugin
Issues related to @typescript-eslint/eslint-plugin
Before You File a Bug Report Please Confirm You Have Done The Following...
Playground Link
https://typescript-eslint.io/play/#ts=5.7.2&fileType=.ts&code=PTAEDMEMEsBsGcBQBjA9gO3gF1FgptgIwBcoAFPKgLZ4DCGAJtFtBqQEaqqx6ToCUoALwA%2BUADdU0BsNCUa9dExYZhYgN6JQoaOHLy6jZq3TChQ3ACcArnkHqAvogcBuRIhByAFqmuwZUHAoGNi4BFgATKQAPAAqoHgAHvhK8KCc3LzoIhTUhkrGbKCxgqISUjIWBorKJmqgmtq6%2Bnk1habmFlg2dg1OrohAA&eslintrc=N4KABGBEBOCuA2BTAzpAXGUEKQAIBcBPABxQGNoBLY-AWhXkoDt8B6Jge1tiacTJTIAhtEK0ARhw5IhTWo3yJoQ%2BLTIcAtsRGJ0UJdA7RI4MAF8QZoA&tsconfig=N4KABGBEDGD2C2AHAlgGwKYCcDyiAuysAdgM6QBcYoEEkJemy0eAcgK6qoDCAFutAGsylBm3TgwAXxCSgA&tokens=false
Repro Code
ESLint Config
tsconfig
Expected Result
I expect all use-cases to be consistent and report as errors.
Actual Result
The use-cases with a type constraint doesn't report as an error (even though it should).
Additional Info
This seems similar to #10311, and it looks like the fix should be similar.
Note that this issue is also similar to #10442, and I wasn't sure if I should create one issue for each rule or aggregate them under a single issue. I apologize if this was a bit spammy. I checked existing rules for similar problems after resolving #10311.
The text was updated successfully, but these errors were encountered: