eslint-plugin-neverthrow
v1.1.4
Published
[![npm version](https://img.shields.io/npm/v/eslint-plugin-neverthrow.svg)](https://www.npmjs.com/package/eslint-plugin-neverthrow) [![Downloads/month](https://img.shields.io/npm/dm/eslint-plugin-neverthrow.svg)](http://www.npmtrends.com/eslint-plugin-nev
Downloads
54,380
Maintainers
Readme
eslint-plugin-neverthrow
Installation
Use npm or a compatibility tool to install.
npm install --save-dev eslint eslint-plugin-neverthrow @typescript-eslint/parser
Requirements
- Node.js v8.10.0 or newer versions.
- ESLint v5.16.0 or newer versions.
- @typescript-eslint/parser
Usage
Write your config file such as .eslintrc.js
.
module.exports = {
plugins: ['neverthrow'],
rules: {
'neverthrow/must-use-result': 'error',
},
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2021,
sourceType: 'module',
project: ['./tsconfig.json'],
tsconfigRootDir: __dirname,
},
};
See also Configuring ESLint.
Configs
neverthrow/recommended
... enables the recommended rules.
Rules
Possible Errors
| Rule ID | Description | | | :------------------------------------------------------------ | :----------------------------------------------------------------------------------------- | :-: | | neverthrow/must-use-result | Not handling neverthrow result is a possible error because errors could remain unhandleds. | ⭐️ |
Semantic Versioning Policy
This plugin follows Semantic Versioning and ESLint's Semantic Versioning Policy.
Changelog
Contributing
Welcome your contribution!
See also ESLint Contribution Guide.
Development Tools
npm test
runs tests.npm run update
updates the package version. And it updatessrc/configs/recommended.ts
,lib/index.ts
, andREADME.md
's rule table. See also npm version CLI command.npm run add-rule <RULE_ID>
creates three files to add a new rule.
forked from mysticatea/template-eslint-plugin