🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

eslint-plugin-await-require-catch

Package Overview
Dependencies
Maintainers
2
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-await-require-catch

require add `.catch()` at the end when using function with `await`

1.0.0
latest
Source
npm
Version published
Weekly downloads
0
-100%
Maintainers
2
Weekly downloads
 
Created
Source

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

Keywords

eslint

FAQs

Package last updated on 17 Jan 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts