What version of Oxlint are you using?
1.58.0
What command did you run?
oxlint -c .oxlintrc.json
What does your .oxlintrc.json (or oxlint.config.ts) config file look like?
What happened?
having this in a test.ts file:
const a = 2 as const;
if (a !== a) {
console.log("This will never be logged");
}
should trigger the oxc/const-comparisons for the if, because a is always identical to itself, but oxlint finished without errors.
What version of Oxlint are you using?
1.58.0
What command did you run?
oxlint -c .oxlintrc.jsonWhat does your
.oxlintrc.json(oroxlint.config.ts) config file look like?{ "$schema": "./node_modules/oxlint/configuration_schema.json", "categories": { "correctness": "error" }, "rules": { "oxc/const-comparisons": "error", }, "ignorePatterns": ["node_modules/**"], }What happened?
having this in a
test.tsfile:should trigger the
oxc/const-comparisonsfor theif, becauseais always identical to itself, butoxlintfinished without errors.