@spryteam/eslint-plugin-require-awaiting-returned-promise-inside-try-block
v0.1.1
Published
Promises, returned inside try blocks must be awaited
Downloads
3
Maintainers
Readme
eslint-plugin-require-awaiting-returned-promise-inside-try-block
Promises, returned inside try blocks must be awaited
Installation
You'll first need to install ESLint:
$ npm i eslint --save-dev
Next, install eslint-plugin-require-awaiting-returned-promise-inside-try-block
:
$ npm install eslint-plugin-require-awaiting-returned-promise-inside-try-block --save-dev
Note: If you installed ESLint globally (using the -g
flag) then you must also install eslint-plugin-require-awaiting-returned-promise-inside-try-block
globally.
Usage
Add require-awaiting-returned-promise-inside-try-block
to the plugins section of your .eslintrc
configuration file. You can omit the eslint-plugin-
prefix:
{
"plugins": [
"require-awaiting-returned-promise-inside-try-block"
]
}
Then configure the rules you want to use under the rules section.
{
"rules": {
"require-awaiting-returned-promise-inside-try-block/rule-name": 2
}
}
Supported Rules
- require-await-inside-try