# eslint-plugin-no-async-without-await

> Enforce that async functions use await

Latest version **1.2.0** (published 2016-10-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install eslint-plugin-no-async-without-await
pnpm add eslint-plugin-no-async-without-await
yarn add eslint-plugin-no-async-without-await
bun add eslint-plugin-no-async-without-await
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.0 |
| Published | 2016-10-21 |
| First published | 2016-09-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | Andres Suarez |
| Maintainers | zertosh |
| Keywords | async, async/await, await, eslint, eslint-plugin, eslintplugin |

## Links

- npm: https://www.npmjs.com/package/eslint-plugin-no-async-without-await
- Repository: https://github.com/zertosh/eslint-plugin-no-async-without-await
- Homepage: https://github.com/zertosh/eslint-plugin-no-async-without-await#readme
- Issues: https://github.com/zertosh/eslint-plugin-no-async-without-await/issues
- npm.io page: https://npm.io/package/eslint-plugin-no-async-without-await

## Alternatives

- [eslint-plugin-sonarjs](https://npm.io/package/eslint-plugin-sonarjs.md) — 2.9M weekly downloads
- [eslint-config-expo](https://npm.io/package/eslint-config-expo.md) — 1.5M weekly downloads
- [@matter/protocol](https://npm.io/package/@matter/protocol.md) — 63.5K weekly downloads
- [@eventcatalog/linter](https://npm.io/package/@eventcatalog/linter.md) — 24.8K weekly downloads
- [@inrupt/eslint-config-base](https://npm.io/package/@inrupt/eslint-config-base.md) — 4.5K weekly downloads

## Recent versions

- 1.2.0 (latest) — 2016-10-21
- 1.1.0 — 2016-09-19
- 1.0.0 — 2016-09-18

## README

# eslint-plugin-no-async-without-await

[![Build Status](https://travis-ci.org/zertosh/eslint-plugin-no-async-without-await.svg?branch=master)](https://travis-ci.org/zertosh/eslint-plugin-no-async-without-await)

## Usage

```sh
npm install eslint-plugin-no-async-without-await
```

In your `.eslintrc`:

```json
{
  "plugins": [
    "no-async-without-await"
  ],
  "rules": {
    "no-async-without-await/no-async-without-await": 1
  }
}
```

## Rule Details

Examples of **incorrect** code for this rule:

```js
async function f() {
  return true;
}

class C {
  async m() {
    return 2 + 2;
  }
}
```

Examples of **correct** code for this rule:

```js
async function f() {
  await ;
  return true;
}

class C {
  async m() {
    await someAsyncProcess();
    return 2 + 2;
  }
}

function f() {
  return someAsyncProcess();
}
```

## Options

* `allowThrow`: Allows `throw` to substitute for `await`. It's often convenient for an `async` function simply throw to return a rejected promise.

---
_Source: https://npm.io/package/eslint-plugin-no-async-without-await · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
