-
-
Notifications
You must be signed in to change notification settings - Fork 471
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
linter: unsafe fixer in no-useless-spread
#6618
Comments
I need more details. Is the bottom one the original case? And did you mean the spread to cover the |
For all cases where n>0, |
yeah we should disable fixer or suggest a fix of |
I mentioned this on the Discord - I used to use this method to initialize a new array and so this was in my codebase. I've since switched to |
Originally posted by @sindresorhus in sindresorhus/eslint-plugin-unicorn#2480 (comment) |
Interesting. I suppose I disagree – regardless of whether it's an antipattern, it's valid code. But OK, so, this appears to reveal an unrelated issue: I have not enabled any unicorn linters, or I'm testing a migration from ESLint to oxlint. I don't use |
This may be because it is recommended and enabled by default in oxlint. |
Oh interesting, so rather than having a |
I especially think that if this rule is on by default it should not make unsafe fixes. |
closes #6618 --------- Co-authored-by: Boshen <[email protected]>
What version of Oxlint are you using?
0.9.10
What happened?
This change has side effects and is unsafe.
The text was updated successfully, but these errors were encountered: