Skip to main content

@antithrow/eslint-plugin

ESLint plugin with type-aware rules for enforcing correct Result and ResultAsync usage.

Installation

npm install -D @antithrow/eslint-plugin

Setup

Add the recommended config to your ESLint flat config. The plugin requires type-aware linting via typescript-eslint:

// eslint.config.ts
import antithrow from "@antithrow/eslint-plugin";
import tseslint from "typescript-eslint";

export default tseslint.config(...tseslint.configs.recommended, antithrow.configs.recommended);
note

All three rules require type information. Make sure your ESLint config includes typescript-eslint's parser with project or projectService options configured. See typescript-eslint's docs for setup instructions.

The recommended config enables all rules with these severities:

RuleSeverity
no-unused-resulterror
no-unsafe-unwrapwarn
no-throwing-callwarn