Eslint Plugin Async/Await
<img src="https://img.shields.io/npm/v/eslint-plugin-async-await.svg?style=flat-square">
<img src="http://img.shields.io/travis/59naga/eslint-plugin-async-await.svg?style=flat-square">
<img src="https://img.shields.io/appveyor/ci/59naga/eslint-plugin-async-await.svg?style=flat-square">
<img src="https://img.shields.io/codeclimate/github/59naga/eslint-plugin-async-await.svg?style=flat-square">
<img src="https://img.shields.io/codeclimate/coverage/github/59naga/eslint-plugin-async-await.svg?style=flat-square">
<img src="https://img.shields.io/gemnasium/59naga/eslint-plugin-async-await.svg?style=flat-square">
Installation
npm install eslint-plugin-async-await --save
Usage
Via .eslintrc
(Recommended)
.eslintrc{
"plugins": ["async-await"],
"rules": {
"async-await/space-after-async": 2,
"async-await/space-after-await": 2
}
}
Rules
async-await/space-after-async
: disallowasync()=>{}
, fixing toasync ()=>{}
.async-await/space-after-await
: disallowawait(foo)
, fixing toawait (foo)
.
The --fix
option on the command line automatically fixes problems reported by this rule.
Development
Requirement global- NodeJS v5.10.0
- Npm v3.8.3
git clone https://github.com/59naga/eslint-plugin-async-await
cd eslint-plugin-async-await
npm install
npm test