0.0.11 • Published 2 years ago
@tunnel/eslint-plugin-neverthrow v0.0.11
@tunnel/eslint-plugin-neverthrow
This ESLint plugin is a fork of the excellent eslint-plugin-neverthrow package by @mdbetancourt
Installation
Install @tunnel/eslint-plugin-neverthrow using your favorite package manager:
npm install --save-dev eslint-plugin-neverthrowRequirements
- Node.js LTS
- ESLint (v8 or higher)
- @typescript-eslint/parser (v6 or higher)
Usage
Add @tunnel/neverthrow to the plugins section of your ESLint config file:
// .eslintrc.cjs
module.exports = {
plugins: ['@tunnel/neverthrow'],
rules: {
'@tunnel/neverthrow/must-use-result': 'error',
},
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2021,
sourceType: 'module',
project: ['./tsconfig.json'],
tsconfigRootDir: __dirname,
},
};See also Configuring ESLint.
Configs
@tunnel/neverthrow/recommended... enables the recommended rules.
Rules
Possible Errors
| Rule ID | Description | |
|---|---|---|
| @tunnel/neverthrow/must-use-result | Not handling neverthrow result is a possible error because errors could remain unhandled. | ⭐️ |