## Installation
npm install @ornikar/eslint-plugin-neverthrowUse npm or a compatibility tool to install.
``bash`
npm install --save-dev eslint @ornikar/eslint-plugin-neverthrow @typescript-eslint/parser
- Node.js v8.10.0 or newer versions.
- ESLint v5.16.0 or newer versions.
- @typescript-eslint/parser
Write your config file such as .eslintrc.js.
`js`
module.exports = {
plugins: ['@ornikar/neverthrow'],
rules: {
'@ornikar/neverthrow/must-use-result': 'error',
},
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2021,
sourceType: 'module',
project: ['./tsconfig.json'],
tsconfigRootDir: __dirname,
},
};
See also Configuring ESLint.
- @ornikar/neverthrow/recommended ... enables the recommended rules.
| Rule ID | Description | |
| :--------------------------------------------------------------------- | :----------------------------------------------------------------------------------------- | :-: |
| @ornikar/neverthrow/must-use-result | Not handling neverthrow result is a possible error because errors could remain unhandleds. | ⭐️ |
This plugin follows Semantic Versioning and ESLint's Semantic Versioning Policy.
Welcome your contribution!
See also ESLint Contribution Guide.
- npm test runs tests.npm run update
- updates the package version. And it updates src/configs/recommended.ts, lib/index.ts, and README.md's rule table. See also npm version CLI command.npm run add-rule
-
forked from mysticatea/template-eslint-plugin