-
-
Notifications
You must be signed in to change notification settings - Fork 644
feat(biome_js_analyze): allow specifying stable object keys in useExhaustiveDependencies
configuration
#6398
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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! |
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
setMyState
function: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: