-
-
Notifications
You must be signed in to change notification settings - Fork 500
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
fix: noInvalidUseBeforeDeclaration
false-positive for param destructuring with default values
#1672
Closed
Closed
Changes from all commits
Commits
Show all changes
39 commits
Select commit
Hold shift + click to select a range
cb1438e
refactor(linter): UseAnchorContent code action
vasucp1207 364f018
refactor(linter): UseAnchorContent code action
vasucp1207 d94d9e1
refactor(linter): UseAnchorContent code action
vasucp1207 5517a6b
Merge branch 'biomejs:main' into main
vasucp1207 0d46365
Merge branch 'biomejs:main' into main
vasucp1207 4d11c7c
Merge branch 'biomejs:main' into main
vasucp1207 aa3d3a5
Merge branch 'biomejs:main' into main
vasucp1207 a39dad7
Merge branch 'biomejs:main' into main
vasucp1207 281c6a2
Merge branch 'biomejs:main' into main
vasucp1207 f3fb5d1
Merge branch 'biomejs:main' into main
vasucp1207 76b3f81
Merge branch 'biomejs:main' into main
vasucp1207 103bc72
Merge branch 'biomejs:main' into main
vasucp1207 63186c9
Merge branch 'biomejs:main' into main
vasucp1207 8138132
Merge branch 'biomejs:main' into main
vasucp1207 f276c68
Merge branch 'biomejs:main' into main
vasucp1207 5e968fc
Merge branch 'biomejs:main' into main
vasucp1207 736d2f1
Merge branch 'biomejs:main' into main
vasucp1207 4d6153a
Merge branch 'biomejs:main' into main
vasucp1207 517cac3
Merge branch 'biomejs:main' into main
vasucp1207 e833968
Merge branch 'biomejs:main' into main
vasucp1207 86ed25f
Merge branch 'biomejs:main' into main
vasucp1207 9c1cf36
Merge branch 'biomejs:main' into main
vasucp1207 31aa757
Merge branch 'biomejs:main' into main
vasucp1207 302a0b4
Merge branch 'biomejs:main' into main
vasucp1207 9d7af14
Merge branch 'biomejs:main' into main
vasucp1207 2787dd4
Merge branch 'biomejs:main' into main
vasucp1207 68d833d
Merge branch 'biomejs:main' into main
vasucp1207 8ea685f
Merge branch 'biomejs:main' into main
vasucp1207 dff5253
Merge branch 'biomejs:main' into main
vasucp1207 15d00db
Merge branch 'biomejs:main' into main
vasucp1207 aeb89a7
Merge branch 'biomejs:main' into main
vasucp1207 bc40a71
Merge branch 'biomejs:main' into main
vasucp1207 c03e955
Merge branch 'biomejs:main' into main
vasucp1207 4cc25c8
Merge branch 'biomejs:main' into main
vasucp1207 15362b8
Merge branch 'biomejs:main' into main
vasucp1207 e016949
Merge branch 'biomejs:main' into main
vasucp1207 a7cad4c
Merge branch 'biomejs:main' into main
vasucp1207 ed89460
ignores param destructuring
vasucp1207 4138f14
ignores param destructuring
vasucp1207 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
The issue with this fix is: it doesn't report used before declaraion such as
{ a = b, b = "111" }
.I wonder if we should rather change the implementation of
biome_js_syntax::binding_ext::AnyJsIdentifierBinding::declaration
and considerJsObjectBindingPatternShorthandProperty
,JsObjectBindingPattern*
andJsArrayBindingPattern*
as declarations. I am not sure of the implication in other part of the codebase. This could solve both #1652 and #1648.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.
Sure, I will look into this after some days, quite busy now.
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.
Are you still interested in investigating this? Otherwise, I can take a look :)
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.
@Conaclos, I get the idea that we have to include
JsObjectBindingPatternShorthandProperty
as declarations but as you mention I found it hard to handle its implication in other parts of codebase, so you take a look on this. I will follow your work.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.
I proposed a fix in #1800