1.0.0 • Published 3 years ago
eslint-plugin-await-require-catch v1.0.0
eslint-plugin-await-require-catch
要求使用以await为前缀的函数时需要添加链式调用.catch(), 本ESLint插件支持自动代码补齐
Installation
You'll first need to install ESLint:
$ npm i eslint --save-devNext, install eslint-plugin-await-require-catch:
$ npm install eslint-plugin-await-require-catch --save-devNote: If you installed ESLint globally (using the -g flag) then you must also install eslint-plugin-await-require-catch globally.
Usage
Add await-require-catch to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:
{
"plugins": ["await-require-catch"],
}Then configure the rules you want to use under the rules section.
{
"rules": {
"await-require-catch/await-require-catch": 1
}
}