eslint-plugin-await-require-catch

1.0.0 • Public • Published

eslint-plugin-await-require-catch

要求使用await为前缀的函数时需要添加链式调用.catch(), 本ESLint插件支持自动代码补齐

Installation npm version npm dm

You'll first need to install ESLint:

$ npm i eslint --save-dev

Next, install eslint-plugin-await-require-catch:

$ npm install eslint-plugin-await-require-catch --save-dev

Note: 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
    }
}

Readme

Keywords

Package Sidebar

Install

npm i eslint-plugin-await-require-catch

Weekly Downloads

1

Version

1.0.0

License

ISC

Unpacked Size

5.61 kB

Total Files

4

Last publish

Collaborators

  • npm
  • 1uokun