Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
Closed
Description
Before You File a Proposal Please Confirm You Have Done The Following...
- I havesearched for related issues and found none that match my proposal.
- I have searched thecurrent rule list and found no rules that match my proposal.
- I haveread 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 newignorePrimitives
option. Which is great! It lets us configure individually whetherbigint
s,boolean
s,number
s, and/orstring
s, are ignored by the rule.
As a convenience, it'd be nice to allow the option to be set as just the shorthandtrue
- to set all of them astrue
.
"@typescript-eslint/prefer-nullish-coalescing":["error",{ignorePrimitives:true,}]
Fail
n/a(nochange)
Pass
n/a(nochange)
Additional Info
The label here is slightly inaccurate - it's not a new rule option, it's an augmentation to an existing option.