prefer-nullish-coalescing rule (from typescript-eslint) #5352
Closed
tkafka
started this conversation in
Rule suggestion
Replies: 2 comments 3 replies
-
|
That rule requires type information. Biome isn't able, yet, to inferr types |
Beta Was this translation helpful? Give feedback.
1 reply
-
|
Hi there, checking in if this can be supported in theory with v2. Thanks! |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I used to write code with logical or in places where I actually meant nullish coalescing
??, and it took me some time to realize||is a strong code smell, after I got bitten by an error where||operator replaced0(which was a valid domain value) with a fallback.To my surprise, Biome doesn't yet support
prefer-nullish-coalescingrule from typescript-eslint, and so I would like to request it, and turn it on in my projects.Thank you for considering :).
Beta Was this translation helpful? Give feedback.
All reactions