# eslint-plugin-react-web-api

> ESLint React's ESLint plugin for interacting with Web APIs

Latest version **5.20.3** (published 2026-09-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install eslint-plugin-react-web-api
pnpm add eslint-plugin-react-web-api
yarn add eslint-plugin-react-web-api
bun add eslint-plugin-react-web-api
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; recently updated; high maintenance score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 5.20.3 |
| Published | 2026-09-21 |
| First published | 2024-01-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=22.0.0 |
| Dependencies | 9 |
| Unpacked size | 46.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 587 |
| Author | Rel1cx |
| Maintainers | rel1cx |
| Keywords | react, web-api, eslint, eslint-react, eslint-plugin, eslint-plugin-react-web-api |

## Links

- npm: https://www.npmjs.com/package/eslint-plugin-react-web-api
- Repository: https://github.com/Rel1cx/eslint-react
- Issues: https://github.com/Rel1cx/eslint-react/issues
- npm.io page: https://npm.io/package/eslint-plugin-react-web-api

## Dependencies (9)

- [birecord](https://npm.io/package/birecord.md) ^0.1.2
- [ts-pattern](https://npm.io/package/ts-pattern.md) ^5.9.0
- [@eslint-react/ast](https://npm.io/package/@eslint-react/ast.md) 5.20.3
- [@eslint-react/var](https://npm.io/package/@eslint-react/var.md) 5.20.3
- [@eslint-react/core](https://npm.io/package/@eslint-react/core.md) 5.20.3
- [@eslint-react/eslint](https://npm.io/package/@eslint-react/eslint.md) 5.20.3
- [@eslint-react/shared](https://npm.io/package/@eslint-react/shared.md) 5.20.3
- [@typescript-eslint/types](https://npm.io/package/@typescript-eslint/types.md) ^8.70.0
- [@typescript-eslint/utils](https://npm.io/package/@typescript-eslint/utils.md) ^8.70.0

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 5.20.3 (latest) — 2026-09-21
- 5.12.0-beta.2 (beta) — 2026-07-07
- 5.8.7-next.1 (next) — 2026-05-28
- 4.2.1-rc.1 (rc) — 2026-04-01
- 5.20.2 — 2026-09-20
- 5.20.1 — 2026-09-20
- 5.20.0 — 2026-09-19
- 5.19.1 — 2026-09-14
- 5.19.0 — 2026-09-06
- 5.18.10 — 2026-09-06
- 5.18.9 — 2026-09-06
- 5.18.8 — 2026-09-05
- 5.18.7 — 2026-09-02
- 5.18.6 — 2026-08-13
- 5.18.5 — 2026-08-13
- … 2132 more at https://npm.io/package/eslint-plugin-react-web-api/versions

## README

# eslint-plugin-react-web-api

ESLint React's ESLint plugin for React to interact with Web APIs.

## Install

```sh
# npm
npm install --save-dev eslint-plugin-react-web-api
```

## Setup

```ts
import js from "@eslint/js";
import reactWebApi from "eslint-plugin-react-web-api";
import { defineConfig } from "eslint/config";
import tseslint from "typescript-eslint";

export default defineConfig(
  {
    files: ["**/*.{ts,tsx}"],
    extends: [
      js.configs.recommended,
      tseslint.configs.recommended,
      // Add configs from eslint-plugin-react-web-api
      reactWebApi.configs.recommended,
    ],
    rules: {
      // Put rules you want to override here
      "react-web-api/no-leaked-event-listener": "warn",
    },
  },
);
```

## Rules

<https://eslint-react.xyz/docs/rules#web-api-rules>

## Rules to be implemented

| Rule                                    | Description                                   |
| :-------------------------------------- | :-------------------------------------------- |
| `no-leaked-idle-callback`               | Prevents leaked `requestIdleCallback`         |
| `no-leaked-animation-frame`             | Prevents leaked `requestAnimationFrame`       |
| `no-leaked-event-source`                | Prevents leaked `EventSource`                 |
| `no-leaked-mutation-observer`           | Prevents leaked `MutationObserver`            |
| `no-leaked-performance-observer`        | Prevents leaked `PerformanceObserver`         |
| `no-leaked-websocket`                   | Prevents leaked `WebSocket`                   |
| `no-leaked-broadcast-channel`           | Prevents leaked `BroadcastChannel`            |
| `no-leaked-geolocation`                 | Prevents leaked `Geolocation.watchPosition()` |
| `no-leaked-absolute-orientation-sensor` | Prevents leaked `AbsoluteOrientationSensor`   |
| `no-leaked-relative-accelerometer`      | Prevents leaked `Accelerometer`               |
| `no-leaked-ambient-light-sensor`        | Prevents leaked `AmbientLightSensor`          |
| `no-leaked-gravity-sensor`              | Prevents leaked `GravitySensor`               |
| `no-leaked-gyroscope`                   | Prevents leaked `Gyroscope`                   |
| `no-leaked-linear-acceleration-sensor`  | Prevents leaked `LinearAccelerationSensor`    |
| `no-leaked-magnetometer`                | Prevents leaked `Magnetometer`                |
| `no-leaked-orientation-sensor`          | Prevents leaked `OrientationSensor`           |

---
_Source: https://npm.io/package/eslint-plugin-react-web-api · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
