Closed
Description
Before You File a Proposal Please Confirm You Have Done The Following...
- I have searched for related issues and found none that match my proposal.
- I have searched the current rule list and found no rules that match my proposal.
- I have read the FAQ and my problem is not listed.
My proposal is suitable for this project
- I believe my proposal would be useful to the broader TypeScript community (meaning it is not a niche proposal).
Link to the rule's documentation
https://typescript-eslint.io/rules/prefer-nullish-coalescing
Description
In #6487, @omril1 added a new ignorePrimitives
option. Which is great! It lets us configure individually whether bigint
s, boolean
s, number
s, and/or string
s, are ignored by the rule.
As a convenience, it'd be nice to allow the option to be set as just the shorthand true
- to set all of them as true
.
"@typescript-eslint/prefer-nullish-coalescing": ["error", {
ignorePrimitives: true,
}]
Fail
n/a (no change)
Pass
n/a (no change)
Additional Info
The label here is slightly inaccurate - it's not a new rule option, it's an augmentation to an existing option.