What version of Oxlint are you using?
1.73.0
What command did you run?
oxlint -c .oxclint.json
What does your .oxlintrc.json (or oxlint.config.ts) config file look like?
What happened?
A common pattern is to have write-only (or, less commonly, read-only) use of the useState hook. This rule should allow common "this is intentionally unused" patterns like the underscore prefix. For example, I'd like the code below to not trigger this rule.
const Component2 = () => {
const [_, id] = useState(1);
}
const Component1 = () => {
const [id, _] = useState(1);
}
What version of Oxlint are you using?
1.73.0
What command did you run?
oxlint -c .oxclint.jsonWhat does your
.oxlintrc.json(oroxlint.config.ts) config file look like?{ "categories": { "correctness": "off" }, "plugins": ["react"], "rules": { "react/hook-use-state": "error" } }What happened?
A common pattern is to have write-only (or, less commonly, read-only) use of the
useStatehook. This rule should allow common "this is intentionally unused" patterns like the underscore prefix. For example, I'd like the code below to not trigger this rule.