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 suggests breaking change. #1251

Open
Summertime opened this issue Feb 18, 2024 · 0 comments
Open

no-unused-vars suggests breaking change. #1251

Summertime opened this issue Feb 18, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@Summertime
Copy link

Lint Name

no-unused-vars

Code Snippet

const obj = { unwanted: 1, wanted: 2 };
const { unwanted, ...result } = obj;
console.log(result);

Expected Result

Either no error, or tells me to replace it with unwanted: _unwanted

Actual Result

If this is intentional, prefix it with an underscore like _unwanted

Additional Info

changing it to just _unwanted changes how the program runs

#687 looks potentially similar, but seems to be different enough that this might be best as a different issue.

Version

deno 1.40.5 (release, x86_64-unknown-linux-gnu)
v8 12.1.285.27
typescript 5.3.3

@Summertime Summertime added the bug Something isn't working label Feb 18, 2024
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