Skip to content
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

no-unused-vars should consider default values in aliased destructuring. #1414

Open
vicary opened this issue Feb 7, 2025 · 0 comments
Open
Labels
bug Something isn't working

Comments

@vicary
Copy link

vicary commented Feb 7, 2025

Lint Name

no-unused-vars

Code Snippet

const { foo, bar: baz = foo } = { foo: 1 }; 

Expected Result

No lint errors

Actual Result

foo is marked as unused variable.

Additional Info

The alias : baz seems to mask the relation of bar = foo.

Version

deno 2.1.9 (stable, release, aarch64-apple-darwin)
v8 13.0.245.12-rusty
typescript 5.6.2

@vicary vicary added the bug Something isn't working label Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant