Consider nullish coalescing in code path analyzer #13237
Labels
accepted
There is consensus among the team that this change meets the criteria for inclusion
archived due to age
This issue has been archived; please open a new issue for any further discussion
core
Relates to ESLint's core APIs and features
enhancement
This change enhances an existing feature of ESLint
new syntax
This issue is related to new syntax that has reached stage 4
We use the code path analyzer for
react-plugin-react-hooks/rules-of-hooks
.Currently, it understands
foo || useHook()
is a conditional function call, but it doesn't understand that for nullish coalescingfoo ?? useHook()
. We have some bugs creeping into the codebase because of that missing coverage.Now that
??
is Stage 4, would it be possible to teach the code path analyzer to handle it?The last relevant change I know of was #10476, but that just made it so that the code does not crash altogether. We're happy to lend a hand with a fix (although someone who knows the codebase might be able to do that better than me).
The text was updated successfully, but these errors were encountered: