-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Description
Before You File a Documentation Request Please Confirm You Have Done The Following...
- I have looked for existing open or closed documentation requests that match my proposal.
- I have read the FAQ and my problem is not listed.
Suggested Changes
Several rules suffer from the limitation that their reports and suggestions are based on type information, which may be incorrect because:
-
A project doesn't have strict TS types (e.g.
anys, invalid type assertions, unsafe generics), doesn't use"strict": true, etc -
Even in a pristinely typesafe codebase, one runs into Trade-offs in Control Flow Analysis microsoft/TypeScript#9998
-
noUncheckedIndexedAccess-type issues
Right now, https://typescript-eslint.io/rules/no-unnecessary-condition/#limitations has discussion of this, but some other rules that can be affected by this (particular with respect to nullishness) include:
- no-unnecessary-boolean-literal-compare
- strict-boolean-expressions
- (recently added) no-useless-default-assignment
It might be useful to have a common explainer that they all can point to?
Affected URL(s)
https://typescript-eslint.io/troubleshooting/faqs/typescript#limitations-of-analysis-involving-types
Or maybe a blog post?
Additional Info
No response