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
1
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

  • 1.11.0-beta.10
  • Source
  • npm
  • Socket score

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

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-idle-callbackPrevents leaked requestIdleCallbackโœ”๏ธ๐Ÿšง
no-leaked-animation-framePrevents leaked requestAnimationFrameโœ”๏ธ๐Ÿšง
no-leaked-event-sourcePrevents leaked EventSourceโœ”๏ธ๐Ÿšง
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 20 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