
Product
Introducing Socket Fix for Safe, Automated Dependency Upgrades
Automatically fix and test dependency updates with socket fixβa new CLI tool that turns CVE alerts into safe, automated upgrades.
eslint-plugin-react-web-api
Advanced tools
ESLint React's ESLint plugin for interacting with Web APIs
ESLint React's ESLint plugin for React to interact with Web APIs.
# npm
npm install --save-dev eslint-plugin-react-web-api
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",
}
],
},
];
Rule | Description | πΌ | π | |
---|---|---|---|---|
no-leaked-timeout | Prevents leaked setTimeout | βοΈ | ||
no-leaked-interval | Prevents leaked setInterval | βοΈ | ||
no-leaked-idle-callback | Prevents leaked requestIdleCallback | βοΈ | π§ | |
no-leaked-animation-frame | Prevents leaked requestAnimationFrame | βοΈ | π§ | |
no-leaked-event-source | Prevents leaked EventSource | βοΈ | π§ | |
no-leaked-event-listener | Prevents leaked addEventListener | βοΈ | ||
no-leaked-resize-observer | Prevents leaked ResizeObserver | βοΈ | π§ | |
no-leaked-intersection-observer | Prevents leaked IntersectionObserver | βοΈ | π§ | |
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 | βοΈ | π§ |
v1.11.0 (2024-08-20)
eslint-plugin-react-web-api
- A plugin that provides rules for interacting with Web APIs in React applicationsweb-api/no-leaked-timeout
rule to prevent leaked setTimeout
web-api/no-leaked-interval
rule to prevent leaked setInterval
web-api/no-leaked-event-listener
rule to prevent leaked addEventListener
web-api
and web-api-legacy
presets to enable all rules provided by eslint-plugin-react-web-api
react-web-api/no-leaked-event-listener
to recommended
and recommended-legacy
presets@eslint-react/eslint-plugin
package@typescript-eslint
's packages to ^8.2.0
FAQs
ESLint React's ESLint plugin for interacting with Web APIs
The npm package eslint-plugin-react-web-api receives a total of 220,770 weekly downloads. As such, eslint-plugin-react-web-api popularity was classified as popular.
We found that eslint-plugin-react-web-api demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Product
Automatically fix and test dependency updates with socket fixβa new CLI tool that turns CVE alerts into safe, automated upgrades.
Security News
CISA denies CVE funding issues amid backlash over a new CVE foundation formed by board members, raising concerns about transparency and program governance.
Product
Weβre excited to announce a powerful new capability in Socket: historical data and enhanced analytics.