ESLint plugin enforcing that neverthrow Result types are handled. Current stable version is 1.1.4, released November 2021. It provides a single rule `must-use-result` that flags unhandled `Result` values from the neverthrow library. The plugin is TypeScript‑first, requires `@typescript-eslint/parser`, and relies on type information to detect unhandled results. Unlike manual lint rules, it integrates with ESLint's type‑aware analysis. No updates since 2021; the plugin is stable and low‑maintenance.
npm install eslint-plugin-neverthrowVerified import paths — ran on the pinned version, not inferred.
Shows ESLint configuration to enforce handling neverthrow Result types and an example that triggers the rule.
Add 'parser: '@typescript-eslint/parser'' and 'parserOptions.project' pointing to your tsconfig.json.
For async functions, manually handle the result or use a helper like .unwrapOr() within the async context.
Update to v1.1.2 or later if using ESLint 8. If on an older version, still upgrade to avoid shared type issues.
Verify the plugin meets your needs; consider supplementing with manual checks or other plugins.
npm install --save-dev @typescript-eslint/parser
npm install --save-dev eslint-plugin-neverthrow
Ensure plugins: ['neverthrow'] is present in config and rule is 'neverthrow/must-use-result' (lowercase).