eslint-plugin-react-web-api
Advanced tools
Comparing version 1.26.3-next.6 to 1.26.3-next.7
import * as _typescript_eslint_utils_ts_eslint from '@typescript-eslint/utils/ts-eslint'; | ||
type MessageID$3 = "noLeakedTimeoutInEffect" | "noLeakedTimeoutInLifecycle" | "noLeakedTimeoutNoTimeoutId"; | ||
type MessageID$3 = "expectedClearTimeoutInCleanup" | "expectedClearTimeoutInUnmount" | "expectedTimeoutId"; | ||
type MessageID$2 = "noLeakedResizeObserver" | "noLeakedResizeObserverInControlFlow" | "noLeakedResizeObserverNoFloatingInstance"; | ||
type MessageID$2 = "expectedDisconnectInControlFlow" | "expectedDisconnectOrUnobserveInCleanup" | "unexpectedFloatingInstance"; | ||
type MessageID$1 = "noLeakedIntervalInEffect" | "noLeakedIntervalInLifecycle" | "noLeakedIntervalNoIntervalId"; | ||
type MessageID$1 = "expectedClearIntervalInCleanup" | "expectedClearIntervalInUnmount" | "expectedIntervalId"; | ||
type MessageID = "noLeakedEventListenerInEffect" | "noLeakedEventListenerInLifecycle" | "noLeakedEventListenerOfInlineFunction"; | ||
type MessageID = "expectedRemoveEventListenerInCleanup" | "expectedRemoveEventListenerInUnmount" | "unexpectedInlineFunction"; | ||
@@ -11,0 +11,0 @@ declare const _default: { |
@@ -35,3 +35,3 @@ 'use strict'; | ||
var name = "eslint-plugin-react-web-api"; | ||
var version = "1.26.3-next.6"; | ||
var version = "1.26.3-next.7"; | ||
var createRule = shared.createRuleForPlugin("web-api"); | ||
@@ -152,5 +152,5 @@ function getInstanceID(node, prev) { | ||
messages: { | ||
noLeakedEventListenerInEffect: "An 'addEventListener' in '{{effectMethodKind}}' should have a corresponding 'removeEventListener' in its cleanup function.", | ||
noLeakedEventListenerInLifecycle: "An 'addEventListener' in 'componentDidMount' should have a corresponding 'removeEventListener' in 'componentWillUnmount' method.", | ||
noLeakedEventListenerOfInlineFunction: "A/an '{{eventMethodKind}}' should not have an inline listener function." | ||
expectedRemoveEventListenerInCleanup: "An 'addEventListener' in '{{effectMethodKind}}' should have a corresponding 'removeEventListener' in its cleanup function.", | ||
expectedRemoveEventListenerInUnmount: "An 'addEventListener' in 'componentDidMount' should have a corresponding 'removeEventListener' in 'componentWillUnmount' method.", | ||
unexpectedInlineFunction: "A/an '{{eventMethodKind}}' should not have an inline listener function." | ||
}, | ||
@@ -200,3 +200,3 @@ schema: [] | ||
context.report({ | ||
messageId: "noLeakedEventListenerOfInlineFunction", | ||
messageId: "unexpectedInlineFunction", | ||
node: listener, | ||
@@ -273,3 +273,3 @@ data: { eventMethodKind: callKind } | ||
context.report({ | ||
messageId: "noLeakedEventListenerInEffect", | ||
messageId: "expectedRemoveEventListenerInCleanup", | ||
node: aEntry.node, | ||
@@ -284,3 +284,3 @@ data: { | ||
context.report({ | ||
messageId: "noLeakedEventListenerInLifecycle", | ||
messageId: "expectedRemoveEventListenerInUnmount", | ||
node: aEntry.node | ||
@@ -318,5 +318,5 @@ }); | ||
messages: { | ||
noLeakedIntervalInEffect: "A 'setInterval' created in '{{ kind }}' must be cleared with 'clearInterval' in the cleanup function.", | ||
noLeakedIntervalInLifecycle: "A 'setInterval' created in '{{ kind }}' must be cleared with 'clearInterval' in the 'componentWillUnmount' method.", | ||
noLeakedIntervalNoIntervalId: "A 'setInterval' must be assigned to a variable for proper cleanup." | ||
expectedClearIntervalInCleanup: "A 'setInterval' created in '{{ kind }}' must be cleared with 'clearInterval' in the cleanup function.", | ||
expectedClearIntervalInUnmount: "A 'setInterval' created in '{{ kind }}' must be cleared with 'clearInterval' in the 'componentWillUnmount' method.", | ||
expectedIntervalId: "A 'setInterval' must be assigned to a variable for proper cleanup." | ||
}, | ||
@@ -357,3 +357,3 @@ schema: [] | ||
context.report({ | ||
messageId: "noLeakedIntervalNoIntervalId", | ||
messageId: "expectedIntervalId", | ||
node | ||
@@ -404,3 +404,3 @@ }); | ||
context.report({ | ||
messageId: "noLeakedIntervalInEffect", | ||
messageId: "expectedClearIntervalInCleanup", | ||
node: sEntry.node, | ||
@@ -415,3 +415,3 @@ data: { | ||
context.report({ | ||
messageId: "noLeakedIntervalInLifecycle", | ||
messageId: "expectedClearIntervalInUnmount", | ||
node: sEntry.node, | ||
@@ -471,5 +471,5 @@ data: { | ||
messages: { | ||
noLeakedResizeObserver: "A 'ResizeObserver' instance created in 'useEffect' must be disconnected in the cleanup function.", | ||
noLeakedResizeObserverInControlFlow: "Dynamically added 'ResizeObserver.observe' should be cleared all at once using 'ResizeObserver.disconnect' in the cleanup function.", | ||
noLeakedResizeObserverNoFloatingInstance: "A 'ResizeObserver' instance created in component or custom Hook must be assigned to a variable for proper cleanup." | ||
expectedDisconnectInControlFlow: "Dynamically added 'ResizeObserver.observe' should be cleared all at once using 'ResizeObserver.disconnect' in the cleanup function.", | ||
expectedDisconnectOrUnobserveInCleanup: "A 'ResizeObserver' instance created in 'useEffect' must be disconnected in the cleanup function.", | ||
unexpectedFloatingInstance: "A 'ResizeObserver' instance created in component or custom Hook must be assigned to a variable for proper cleanup." | ||
}, | ||
@@ -556,3 +556,3 @@ schema: [] | ||
context.report({ | ||
messageId: "noLeakedResizeObserverNoFloatingInstance", | ||
messageId: "unexpectedFloatingInstance", | ||
node | ||
@@ -580,3 +580,3 @@ }); | ||
if (hasDynamicallyAdded) { | ||
context.report({ messageId: "noLeakedResizeObserverInControlFlow", node }); | ||
context.report({ messageId: "expectedDisconnectInControlFlow", node }); | ||
continue; | ||
@@ -588,3 +588,3 @@ } | ||
} | ||
context.report({ messageId: "noLeakedResizeObserver", node: oEntry.node }); | ||
context.report({ messageId: "expectedDisconnectOrUnobserveInCleanup", node: oEntry.node }); | ||
} | ||
@@ -619,5 +619,5 @@ } | ||
messages: { | ||
noLeakedTimeoutInEffect: "A 'setTimeout' created in '{{ kind }}' must be cleared with 'clearTimeout' in the cleanup function.", | ||
noLeakedTimeoutInLifecycle: "A 'setTimeout' created in '{{ kind }}' must be cleared with 'clearTimeout' in the 'componentWillUnmount' method.", | ||
noLeakedTimeoutNoTimeoutId: "A 'setTimeout' must be assigned to a variable for proper cleanup." | ||
expectedClearTimeoutInCleanup: "A 'setTimeout' created in '{{ kind }}' must be cleared with 'clearTimeout' in the cleanup function.", | ||
expectedClearTimeoutInUnmount: "A 'setTimeout' created in '{{ kind }}' must be cleared with 'clearTimeout' in the 'componentWillUnmount' method.", | ||
expectedTimeoutId: "A 'setTimeout' must be assigned to a variable for proper cleanup." | ||
}, | ||
@@ -655,3 +655,3 @@ schema: [] | ||
context.report({ | ||
messageId: "noLeakedTimeoutNoTimeoutId", | ||
messageId: "expectedTimeoutId", | ||
node | ||
@@ -695,3 +695,3 @@ }); | ||
context.report({ | ||
messageId: "noLeakedTimeoutInEffect", | ||
messageId: "expectedClearTimeoutInCleanup", | ||
node: sEntry.node, | ||
@@ -706,3 +706,3 @@ data: { | ||
context.report({ | ||
messageId: "noLeakedTimeoutInLifecycle", | ||
messageId: "expectedClearTimeoutInUnmount", | ||
node: sEntry.node, | ||
@@ -709,0 +709,0 @@ data: { |
{ | ||
"name": "eslint-plugin-react-web-api", | ||
"version": "1.26.3-next.6", | ||
"version": "1.26.3-next.7", | ||
"description": "ESLint React's ESLint plugin for interacting with Web APIs", | ||
@@ -51,8 +51,8 @@ "keywords": [ | ||
"ts-pattern": "^5.6.2", | ||
"@eslint-react/ast": "1.26.3-next.6", | ||
"@eslint-react/core": "1.26.3-next.6", | ||
"@eslint-react/jsx": "1.26.3-next.6", | ||
"@eslint-react/eff": "1.26.3-next.6", | ||
"@eslint-react/shared": "1.26.3-next.6", | ||
"@eslint-react/var": "1.26.3-next.6" | ||
"@eslint-react/ast": "1.26.3-next.7", | ||
"@eslint-react/core": "1.26.3-next.7", | ||
"@eslint-react/eff": "1.26.3-next.7", | ||
"@eslint-react/jsx": "1.26.3-next.7", | ||
"@eslint-react/shared": "1.26.3-next.7", | ||
"@eslint-react/var": "1.26.3-next.7" | ||
}, | ||
@@ -59,0 +59,0 @@ "devDependencies": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
57550
+ Added@eslint-react/ast@1.26.3-next.7(transitive)
+ Added@eslint-react/core@1.26.3-next.7(transitive)
+ Added@eslint-react/eff@1.26.3-next.7(transitive)
+ Added@eslint-react/jsx@1.26.3-next.7(transitive)
+ Added@eslint-react/shared@1.26.3-next.7(transitive)
+ Added@eslint-react/var@1.26.3-next.7(transitive)
- Removed@eslint-react/ast@1.26.3-next.6(transitive)
- Removed@eslint-react/core@1.26.3-next.6(transitive)
- Removed@eslint-react/eff@1.26.3-next.6(transitive)
- Removed@eslint-react/jsx@1.26.3-next.6(transitive)
- Removed@eslint-react/shared@1.26.3-next.6(transitive)
- Removed@eslint-react/var@1.26.3-next.6(transitive)