eslint-plugin-react-web-api 2.4.1-next.4 → 2.4.1-next.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +5 -5
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -42,7 +42,7 @@ const settings = { "react-x": DEFAULT_ESLINT_REACT_SETTINGS };
|
|
|
42
42
|
//#endregion
|
|
43
43
|
//#region package.json
|
|
44
44
|
var name = "eslint-plugin-react-web-api";
|
|
45
|
-
var version = "2.4.1-next.
|
|
45
|
+
var version = "2.4.1-next.5";
|
|
46
46
|
|
|
47
47
|
//#endregion
|
|
48
48
|
//#region src/utils/create-rule.ts
|
|
@@ -121,7 +121,7 @@ function getOptions(node, initialScope) {
|
|
|
121
121
|
var no_leaked_event_listener_default = createRule({
|
|
122
122
|
meta: {
|
|
123
123
|
type: "problem",
|
|
124
|
-
docs: { description: "
|
|
124
|
+
docs: { description: "Enforces that every 'addEventListener' in a component or custom hook has a corresponding 'removeEventListener'." },
|
|
125
125
|
messages: {
|
|
126
126
|
expectedRemoveEventListenerInCleanup: "An 'addEventListener' in '{{effectMethodKind}}' should have a corresponding 'removeEventListener' in its cleanup function.",
|
|
127
127
|
expectedRemoveEventListenerInUnmount: "An 'addEventListener' in 'componentDidMount' should have a corresponding 'removeEventListener' in 'componentWillUnmount' method.",
|
|
@@ -251,7 +251,7 @@ function getCallKind$2(node) {
|
|
|
251
251
|
var no_leaked_interval_default = createRule({
|
|
252
252
|
meta: {
|
|
253
253
|
type: "problem",
|
|
254
|
-
docs: { description: "
|
|
254
|
+
docs: { description: "Enforces that every 'setInterval' in a component or custom hook has a corresponding 'clearInterval'." },
|
|
255
255
|
messages: {
|
|
256
256
|
expectedClearIntervalInCleanup: "A 'setInterval' created in '{{ kind }}' must be cleared with 'clearInterval' in the cleanup function.",
|
|
257
257
|
expectedClearIntervalInUnmount: "A 'setInterval' created in '{{ kind }}' must be cleared with 'clearInterval' in the 'componentWillUnmount' method.",
|
|
@@ -374,7 +374,7 @@ function getFunctionKind(node) {
|
|
|
374
374
|
var no_leaked_resize_observer_default = createRule({
|
|
375
375
|
meta: {
|
|
376
376
|
type: "problem",
|
|
377
|
-
docs: { description: "
|
|
377
|
+
docs: { description: "Enforces that every 'ResizeObserver' created in a component or custom hook has a corresponding 'ResizeObserver.disconnect()'." },
|
|
378
378
|
messages: {
|
|
379
379
|
expectedDisconnectInControlFlow: "Dynamically added 'ResizeObserver.observe' should be cleared all at once using 'ResizeObserver.disconnect' in the cleanup function.",
|
|
380
380
|
expectedDisconnectOrUnobserveInCleanup: "A 'ResizeObserver' instance created in 'useEffect' must be disconnected in the cleanup function.",
|
|
@@ -503,7 +503,7 @@ function getCallKind(node) {
|
|
|
503
503
|
var no_leaked_timeout_default = createRule({
|
|
504
504
|
meta: {
|
|
505
505
|
type: "problem",
|
|
506
|
-
docs: { description: "
|
|
506
|
+
docs: { description: "Enforces that every 'setTimeout' in a component or custom hook has a corresponding 'clearTimeout'." },
|
|
507
507
|
messages: {
|
|
508
508
|
expectedClearTimeoutInCleanup: "A 'setTimeout' created in '{{ kind }}' must be cleared with 'clearTimeout' in the cleanup function.",
|
|
509
509
|
expectedClearTimeoutInUnmount: "A 'setTimeout' created in '{{ kind }}' must be cleared with 'clearTimeout' in the 'componentWillUnmount' method.",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-react-web-api",
|
|
3
|
-
"version": "2.4.1-next.
|
|
3
|
+
"version": "2.4.1-next.5",
|
|
4
4
|
"description": "ESLint React's ESLint plugin for interacting with Web APIs",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -43,11 +43,11 @@
|
|
|
43
43
|
"@typescript-eslint/utils": "^8.50.1",
|
|
44
44
|
"string-ts": "^2.3.1",
|
|
45
45
|
"ts-pattern": "^5.9.0",
|
|
46
|
-
"@eslint-react/ast": "2.4.1-next.
|
|
47
|
-
"@eslint-react/core": "2.4.1-next.
|
|
48
|
-
"@eslint-react/shared": "2.4.1-next.
|
|
49
|
-
"@eslint-react/var": "2.4.1-next.
|
|
50
|
-
"@eslint-react/eff": "2.4.1-next.
|
|
46
|
+
"@eslint-react/ast": "2.4.1-next.5",
|
|
47
|
+
"@eslint-react/core": "2.4.1-next.5",
|
|
48
|
+
"@eslint-react/shared": "2.4.1-next.5",
|
|
49
|
+
"@eslint-react/var": "2.4.1-next.5",
|
|
50
|
+
"@eslint-react/eff": "2.4.1-next.5"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@types/react": "^19.2.7",
|