New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

eslint-plugin-react-web-api

Package Overview
Dependencies
Maintainers
0
Versions
442
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 in React

  • 1.11.0-next.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
189K
increased by10.24%
Maintainers
0
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

Add the plugin to your eslint.config.js:

// @ts-check

import js from "@eslint/js";
import reactWebAPI from "eslint-plugin-react-web-api";

export default [
  js.configs.recommended,
  {
    files: ["**/*.{ts,tsx}"],
    plugins: [
      "react-web-api": reactWebAPI,
      rules: {
        // react-web-api recommended rules
        "react-web-api/no-leaked-event-listener": "error",
      }
    ],
  },
];

Rules

RuleDescription💼💭
no-leaked-timeoutPrevents leaked setTimeout✔️🚧
no-leaked-intervalPrevents leaked setInterval✔️🚧
no-leaked-event-listenerPrevents leaked addEventListener✔️
no-leaked-resize-observerPrevents leaked ResizeObserver✔️🚧
no-leaked-intersection-observerPrevents leaked IntersectionObserver✔️🚧
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

FAQs

Package last updated on 18 Aug 2024

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc