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

Adding another Disable Rule Comment through VSCode's Quick FIx options causes the rules to be re-enabled #1248

Closed
asingh04 opened this issue May 6, 2021 · 4 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug help wanted Issues identified as good community contribution opportunities

Comments

@asingh04
Copy link
Contributor

asingh04 commented May 6, 2021

Problem Statement
If a disable rule comment has already present for a particular line, and when we add another disable rule comment through vscode's quick-fix option, a separate new comment is added below the previous one. This causes the previous rule to be re-enabled for the concerned line.
image

Similar behaviour happens when eslint.codeAction.disableRuleComment.location has been set to sameLine. The new disable rule comment is appended to the existing disable rule comment present.
image

Expected Behaviour
If there is any preexisting disable rule comment for any particular line and another rule is being disabled for that same line, instead of creating or appending the comment, only the rule should be appended to the existing disable rule comment, separated by comma(s). Like this:
image

The same behavior is observed when disabling multiple rules for entire files as well, but it doesn't cause any rule to be re-enabled

I would like to work on the fix for this too.

@asingh04 asingh04 changed the title Adding Disable Rule Comment Adding another Disable Rule Comment through VSCode's Quick FIx options causes the rules to be re-enabled May 6, 2021
@dbaeumer
Copy link
Member

Good catch.

@dbaeumer dbaeumer added the help wanted Issues identified as good community contribution opportunities label May 10, 2021
@dbaeumer dbaeumer added this to the On Deck milestone May 10, 2021
@dbaeumer dbaeumer added the bug Issue identified by VS Code Team member as probable bug label May 10, 2021
@asingh04
Copy link
Contributor Author

Can you assign it to me? I have started working on it

@asingh04
Copy link
Contributor Author

Created a Pull request with the changes #1261

@dbaeumer
Copy link
Member

dbaeumer commented Dec 6, 2022

This got fixed a long time ago.

@dbaeumer dbaeumer closed this as completed Dec 6, 2022
@dbaeumer dbaeumer removed this from the On Deck milestone Dec 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug help wanted Issues identified as good community contribution opportunities
Projects
None yet
Development

No branches or pull requests

2 participants