@antithrow/eslint-plugin
v1.2.1
Published
ESLint plugin for antithrow Result types
Maintainers
Readme
Installation
bun add -d @antithrow/eslint-pluginThis plugin requires typed linting to be configured.
Usage
Add the recommended config to your eslint.config.ts:
import antithrow from "@antithrow/eslint-plugin";
export default [
// ... your other configs
antithrow.configs.recommended,
];Or configure rules individually:
import antithrow from "@antithrow/eslint-plugin";
export default [
{
plugins: {
"@antithrow": antithrow,
},
rules: {
"@antithrow/no-throwing-call": "warn",
"@antithrow/no-unsafe-unwrap": "warn",
"@antithrow/no-unused-result": "error",
},
},
];Rules
| Rule | Description | Recommended |
| ------------------------------------------------------ | --------------------------------------------------------------------------- | ----------- |
| no-throwing-call | Disallow calls to throwing built-in APIs with @antithrow/std replacements | warn |
| no-unsafe-unwrap | Disallow unwrap/expect APIs on antithrow Result values | warn |
| no-unused-result | Require Result and ResultAsync values to be used | error |
