New:Socket for Asana Is Now Available.Learn more
Get Started

eslint-plugin-react-web-api

Package Overview
Dependencies
Maintainers
1
Versions
2142
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-react-web-api

ESLint React's ESLint plugin for interacting with Web APIs

Source
npmnpm
Version
5.18.7
Version published
Weekly downloads
1M
-50.68%
Maintainers
1
Weekly downloads
 
Created
Source

eslint-plugin-react-web-api

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

Install

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

Setup

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

RuleDescription
no-leaked-idle-callbackPrevents leaked requestIdleCallback
no-leaked-animation-framePrevents leaked requestAnimationFrame
no-leaked-event-sourcePrevents leaked EventSource
no-leaked-mutation-observerPrevents leaked MutationObserver
no-leaked-performance-observerPrevents leaked PerformanceObserver
no-leaked-websocketPrevents leaked WebSocket
no-leaked-broadcast-channelPrevents leaked BroadcastChannel
no-leaked-geolocationPrevents leaked Geolocation.watchPosition()
no-leaked-absolute-orientation-sensorPrevents leaked AbsoluteOrientationSensor
no-leaked-relative-accelerometerPrevents leaked Accelerometer
no-leaked-ambient-light-sensorPrevents leaked AmbientLightSensor
no-leaked-gravity-sensorPrevents leaked GravitySensor
no-leaked-gyroscopePrevents leaked Gyroscope
no-leaked-linear-acceleration-sensorPrevents leaked LinearAccelerationSensor
no-leaked-magnetometerPrevents leaked Magnetometer
no-leaked-orientation-sensorPrevents leaked OrientationSensor

Keywords

react

FAQs

Package last updated on 02 Sep 2026

Related posts