eslint-plugin-react-web-api 2.4.0-beta.12 → 2.4.0-beta.13
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 +3 -3
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DEFAULT_ESLINT_REACT_SETTINGS, WEBSITE_URL, getConfigAdapters } from "@eslint-react/shared";
|
|
2
2
|
import * as AST from "@eslint-react/ast";
|
|
3
|
-
import { ComponentPhaseRelevance, getInstanceId, getPhaseKindOfFunction,
|
|
3
|
+
import { ComponentPhaseRelevance, getInstanceId, getPhaseKindOfFunction, isInitializedFromReactNative, isInstanceIdEqual, isInversePhase } from "@eslint-react/core";
|
|
4
4
|
import { or, unit } from "@eslint-react/eff";
|
|
5
5
|
import { findAssignmentTarget, findProperty, findVariable, getVariableDefinitionNode, isNodeValueEqual } from "@eslint-react/var";
|
|
6
6
|
import { AST_NODE_TYPES, ESLintUtils } from "@typescript-eslint/utils";
|
|
@@ -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.0-beta.
|
|
45
|
+
var version = "2.4.0-beta.13";
|
|
46
46
|
|
|
47
47
|
//#endregion
|
|
48
48
|
//#region src/utils/create-rule.ts
|
|
@@ -178,7 +178,7 @@ function create$3(context) {
|
|
|
178
178
|
if (fKind == null) return;
|
|
179
179
|
if (!ComponentPhaseRelevance.has(fKind)) return;
|
|
180
180
|
match(getCallKind$3(node)).with("addEventListener", (callKind) => {
|
|
181
|
-
if (node.callee.type === AST_NODE_TYPES.MemberExpression && node.callee.object.type === AST_NODE_TYPES.Identifier &&
|
|
181
|
+
if (node.callee.type === AST_NODE_TYPES.MemberExpression && node.callee.object.type === AST_NODE_TYPES.Identifier && isInitializedFromReactNative(node.callee.object.name, context.sourceCode.getScope(node))) return;
|
|
182
182
|
const [type, listener, options] = node.arguments;
|
|
183
183
|
if (type == null || listener == null) return;
|
|
184
184
|
const opts = options == null ? defaultOptions : getOptions(options, context.sourceCode.getScope(options));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-react-web-api",
|
|
3
|
-
"version": "2.4.0-beta.
|
|
3
|
+
"version": "2.4.0-beta.13",
|
|
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.0",
|
|
44
44
|
"string-ts": "^2.3.1",
|
|
45
45
|
"ts-pattern": "^5.9.0",
|
|
46
|
-
"@eslint-react/ast": "2.4.0-beta.
|
|
47
|
-
"@eslint-react/
|
|
48
|
-
"@eslint-react/
|
|
49
|
-
"@eslint-react/var": "2.4.0-beta.
|
|
50
|
-
"@eslint-react/
|
|
46
|
+
"@eslint-react/ast": "2.4.0-beta.13",
|
|
47
|
+
"@eslint-react/core": "2.4.0-beta.13",
|
|
48
|
+
"@eslint-react/eff": "2.4.0-beta.13",
|
|
49
|
+
"@eslint-react/var": "2.4.0-beta.13",
|
|
50
|
+
"@eslint-react/shared": "2.4.0-beta.13"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@types/react": "^19.2.7",
|