@zireal/oxlint-plugin-result-kit
v0.1.1
Published
Oxlint (syntax-tier) port of must-use-result — a re-export of the shared rule-core rule.
Readme
@zireal/oxlint-plugin-result-kit
The Oxlint port of
@zireal/result-kit's
must-use-result rule — syntax tier. It shares the exact rule brain with the
ESLint plugin,
re-exported verbatim.
Install
pnpm add -D @zireal/oxlint-plugin-result-kitPeer dependency: oxlint. Oxlint JS plugins are alpha as of early 2026.
Usage
Register the plugin in your Oxlint config and enable the rule (see the Oxlint JS-plugins guide for the current wiring):
// .oxlintrc.json
{
"jsPlugins": ["@zireal/oxlint-plugin-result-kit"],
"rules": {
"@zireal/result-kit/must-use-result": "error"
}
}Rules
must-use-result— aResult-returning call whose value is dropped in statement position is flagged. Options:packageName(string, default"@zireal/result-kit").
Capability honesty (read this)
Oxlint cannot give a third-party rule type information, so this is the
syntax tier, not the full rule. It recognises a Result call two ways:
- the callee is imported from
@zireal/result-kit, or - the callee is a locally-declared function whose return-type annotation
textually names
Result.
It cannot see two shapes — a call whose Result return is inferred
(no annotation), or whose return type aliases Result behind another name.
Measured recall is ~82% of dropped Results on a representative corpus; the two
blind spots are unreachable without types.
For full-fidelity, type-aware enforcement (through wrappers, aliases, and unions),
use @zireal/eslint-plugin-result-kit.
License
MIT © Ali Farooq
