feat(biome_js_analyze): allow specifying stable object keys in useExhaustiveDependencies configuration#6398
Conversation
a1252bd to
1d0e6aa
Compare
CodSpeed Performance ReportMerging #6398 will degrade performances by 61.17%Comparing Summary
Benchmarks breakdown
|
siketyan
left a comment
There was a problem hiding this comment.
Nice and very clean implementation! I can't believe this is your first time contributing to Biome 🤯 Could you update the outdated snapshots so the failing tests should pass?
ba66358 to
4cfbd58
Compare
|
@siketyan thank you for the kind words! 😄 appreciate all the effort that's gone into the contributing guide! |
4cfbd58 to
37a9631
Compare
🦋 Changeset detectedLatest commit: 7ad42c8 The changes in this PR will be included in the next version bump. This PR includes changesets to release 14 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
@siketyan just pushed a new commit which should hopefully improve perf - let me know what you think! |
arendjr
left a comment
There was a problem hiding this comment.
Very nice work indeed, thank you!
|
I apologise, we had hoped to include this one in the Biome 2.1 release, but overlooked it. Could you please rebase the PR on top of |
656d219 to
0125914
Compare
…haustiveDependencies` configuration
0125914 to
7ad42c8
Compare
|
No worries at all @arendjr - just rebased on |
|
Thank you! |
…haustiveDependencies` configuration (#6398)
Summary
Closes #6386
Currently Biome supports specifying that React hook results are stable when hook returns either a single value or an array. This PR adds support for specifying stable object keys inside a hook return value as well.
For example, this hook returns a stable
setMyStatefunction:but when linting with Biome the following error is generated:
with no ability to specify that this value is stable without suppressing the rule.
This PR adds a new option which allows specifying that such object properties are stable:
Test Plan
Added two tests: