Skip to content

Commit c171b3b

Browse files
authored
feat(lint): add ignoreIfStatements option to useNullishCoalescing (#10822)
1 parent 5c07dc4 commit c171b3b

11 files changed

Lines changed: 1390 additions & 7 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@biomejs/biome": patch
3+
---
4+
5+
Added the option `ignoreIfStatements` to [useNullishCoalescing](https://biomejs.dev/linter/rules/use-nullish-coalescing/). Biome now flags `if` statements that only assign to a nullish variable (such as `if (!a) { a = b }`) and can rewrite them to `??=`. When enabled, Biome ignores those `if` statements.

0 commit comments

Comments
 (0)