1.0.1 • Published 7 years ago
eslint-plugin-promise-catch v1.0.1
eslint-plugin-promise-catch
eslint plugin to sanitize catch promise block
Installation
You'll first need to install ESLint:
$ npm i eslint --save-devNext, install eslint-plugin-promise-catch:
$ npm install eslint-plugin-promise-catch --save-devNote: If you installed ESLint globally (using the -g flag) then you must also install eslint-plugin-promise-catch globally.
Usage
Add promise-catch to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:
{
"plugins": [
"promise-catch"
]
}Then configure the rules you want to use under the rules section.
{
"rules": {
"promise-catch/throw-or-log": [2, {
"customLoggers": true
// allow any CallExpression to be a logging function
}]
}
}