This ESLint plugin is a fork of the excellent [eslint-plugin-neverthrow](https://github.com/mdbetancourt/eslint-plugin-neverthrow) package by @mdbetancourt
npm install @tunnel/eslint-plugin-neverthrowThis ESLint plugin is a fork of the excellent eslint-plugin-neverthrow package by @mdbetancourt
Install @tunnel/eslint-plugin-neverthrow using your favorite package manager:
``shell`
npm install --save-dev eslint-plugin-neverthrow
- Node.js LTS
- ESLint (v8 or higher)
- @typescript-eslint/parser (v6 or higher)
Add @tunnel/neverthrow to the plugins section of your ESLint config file:
`js
// .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.
- @tunnel/neverthrow/recommended` ... enables the recommended rules.
| Rule ID | Description | |
| :------------------------------------------------------------ | :----------------------------------------------------------------------------------------- | :-: |
| @tunnel/neverthrow/must-use-result | Not handling neverthrow result is a possible error because errors could remain unhandled. | ⭐️ |