-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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-duplicates
false positive and autofix creates a syntax error
#2114
Comments
@NickHeiner that's an old version, can you try on the latest? |
Ha! Blazing fast response. I literally was doing that. 😄 |
Thanks, that's definitely a bug. Although I assume your OP example code is partially edited - can you provide the exact code that's failing, no "foo" or "bar"? |
🤦 lol, if I was going to edit the input, I should have edited the output as well. I've updated the OP to be unedited. Sorry for the churn. |
no-duplicates
autofix creates a syntax errorno-duplicates
false positive and autofix creates a syntax error
looks like in TypeScript, |
Yes, I think an |
@NickHeiner yes but in this case it's two |
Right. Also, I found what the right edit should be, and updated the OP to reflect it. |
While |
Heh, fair. I'm happy to have |
I think you can manually fix it to that - the lint rule wouldn't complain - so no option would be needed. eslint rules don't tend to have options that solely govern autofix behavior. |
If someone has time for review, #2149 should fix this. It's not exactly the solution proposed here, but is hopefully good enough 🙏 |
From:
To:
The proper autocorrect is:
On version
2.20.0
(edit: and2.23.4
)Another bug:
From:
To:
This gives TS error:
The text was updated successfully, but these errors were encountered: