-
-
Notifications
You must be signed in to change notification settings - Fork 559
linter: bunch of small auto-fix missing #10477
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
Comments
Thank you for such a useful issue to help us improve! |
Just a heads up (since you mentioned youre using |
I think this is fair to have it as dangerous fix. Something is weird tho, I went to the rules doc and it is tagged as auto-fixable (safe) and I checked the rule source it seem to have a fix implemented but with |
@Hideman42 I'll take a look at this. I think it is only safely auto fixable in some cases. But we could provide it as a dangerous fix in all cases. |
- Related to #10477 This allows the `eqeqeq` rule to always be fixable if dangerous fixes are allowed, but will apply the safe fix if the circumstances apply.
I added another usefull small auto-fix to the list, the eslint-plugin-react(exhaustive-deps) to add needed dependencies to the array. |
What version of Oxlint are you using?
0.16.5
What command did you run?
oxlint --fix --fix-suggestions --quiet
What happened?
Missing lot of quick auto-fixes:
Number.parseFloat
instead of the globalparseFloat
=> Same for parseInt, isNaN feat(linter): implement fixer for unicorn/prefer-number-properties #10693Number.
beforeparseFloat
, 10
in the code asNumber.parseInt(str, 10)
...
) over Array.from()Array.from(store.getItems())
with[...store.getItems()]
feat(linter): add fixer to unicorn/prefer-spread #10691store.getItems()?.concat(anotherItem) ?? [anotherItem]
with[...store.getItems() ?? [], anotherItem]
// More complex<div id={'my-div'} />
with<div id="my-div" />
async
// Maybe a dangerous fixjsx/no-useless-fragment
#10800<></>
withnull
<>{something}</>
withsomething
==
to===
The text was updated successfully, but these errors were encountered: