What version of Oxlint are you using?
1.55.0
What command did you run?
oxlint -c oxlint.config.ts
What does your .oxlintrc.json (or oxlint.config.ts) config file look like?
import { defineConfig } from 'oxlint';
export default defineConfig({
plugins: ['eslint'],
rules: {
'no-unused-private-class-members': 'error'
},
});
What happened?
no-unused-private-class-members reports a false positive when a private field is only read inside a switch discriminant.
class Example {
#value = 1;
check() {
switch (this.#value) {
case 1:
console.log("one");
break;
default:
console.log("other");
}
}
}
In this case, #value is actually used as the switch discriminant, but the rule still reports it as unused.