Configs: [prefer-nullish-coalescing] change default for ignoreConditionalTests
to true
#8243
Closed
2 tasks done
Labels
accepting prs
Go ahead, send a pull request that resolves this issue
breaking change
This change will require a new major version to be released
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
preset config change
Proposal for an addition, removal, or general change to a preset config
Milestone
Before You File a Proposal Please Confirm You Have Done The Following...
Description
Ref: #7955
IMO most codebases would prefer to avoid nullish coalescing in conditional tests.
Consider the downlevelled output:
There's an extra check there that doesn't do anything.
The logic behind the latter is much harder to grasp exactly, IMO:
vs the former:
It's just A lot simpler to read and understand the non-nullish-coalescing form, IMO.
Impacted Configurations
No response
Additional Info
No response
The text was updated successfully, but these errors were encountered: