Repository navigation
Conversation
✅ Deploy Preview for docs-rometools canceled.Built without sensitive environment variables
|
feat: make value of bindings_by_name vector feat: export exportable declration fix: export order refactor: restore bindings change test: update snapshot chore: add comment chore: fix test
interface had the same name
| ### Formatter | ||
| ### Linter | ||
|
|
||
| - Fix an issue that [`noUnusedVariables`](https://docs.rome.tools/lint/rules/nounusedvariables/) rule did not correctly detect exports when a variable and an `interface` had the same name [#4468](https://github.com/rome/tools/pull/4468) |
There was a problem hiding this comment.
You should add the #### Other changes heading
| } | ||
|
|
||
| #[derive(Debug)] | ||
| struct DeclaredBinding { |
There was a problem hiding this comment.
Could you add a brief documentation of the struct, please?
There was a problem hiding this comment.
I simply renamed DeclaredBinding to BindingInfo. And I added some comment to it but the confusion is might be resolved by naming.
| name.clone(), | ||
| DeclaredBinding { | ||
| text_range: declaration_range, | ||
| syntax_kind: *parent_syntax_kind, |
There was a problem hiding this comment.
The name syntax_kind is a bit misleading because I thought we were saving the syntax kind of the node, but instead, we are passing the parent syntax kind. Should we change the name and document it a bit why we save the parent syntax kind?
There was a problem hiding this comment.
Right. I also updated the property name from syntax_kind to declaration_kind. I think this change can resolve why the property is needed. How do you feel about it?
Summary
Closes #4353
Test Plan
cargo test -p rome_js_analyze -- no_unused_variablesChangelog
Documentation
[ ] The PR requires documentation[ ] I will create a new PR to update the documentation