@tunnel/eslint-plugin-neverthrow

0.0.11 • Public • Published

@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-neverthrow

Requirements

  • 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. ⭐️

Package Sidebar

Install

npm i @tunnel/eslint-plugin-neverthrow

Weekly Downloads

0

Version

0.0.11

License

MIT

Unpacked Size

12.3 kB

Total Files

7

Last publish

Collaborators

  • leonsilicon