You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

eslint-plugin-react-web-api

Package Overview
Dependencies
Maintainers
1
Versions
968
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.16.0-next.2
Source
npmnpm
Version published
Weekly downloads
304K
-0.08%
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

// @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-timeout": "error",
        "react-web-api/no-leaked-interval": "error",
        "react-web-api/no-leaked-event-listener": "error",
        "react-web-api/no-leaked-resize-observer": "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

eslint

FAQs

Package last updated on 31 Oct 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