What version of Oxlint are you using?
1.67.0
What command did you run?
oxlint --fix linttest.ts
What does your .oxlintrc.json (or oxlint.config.ts) config file look like?
What happened?
Autofix rewrites x > 0 || x < 0 to x != 0 - but those two conditions are certainly not equivalent. They seem to be equivalent for non-NaN numbers, numeral strings and true, but are not equivalent for undefined and null as well as many other values (objects, arrays, etc)
The docs say that --fix should only apply safe fixes - this does not seem like something that should be regarded as a safe fix
What version of Oxlint are you using?
1.67.0
What command did you run?
oxlint --fix linttest.ts
What does your
.oxlintrc.json(oroxlint.config.ts) config file look like?{ "categories": { "correctness": "allow" }, "rules": { "oxc/double-comparisons": "error" } }What happened?
Autofix rewrites
x > 0 || x < 0tox != 0- but those two conditions are certainly not equivalent. They seem to be equivalent for non-NaNnumbers, numeral strings andtrue, but are not equivalent forundefinedandnullas well as many other values (objects, arrays, etc)The docs say that
--fixshould only apply safe fixes - this does not seem like something that should be regarded as a safe fix