eslint-plugin-react-web-api 2.3.12-next.0 → 2.3.12
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 -2
- 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, isInstanceIdEqual, isInversePhase } from "@eslint-react/core";
|
|
3
|
+
import { ComponentPhaseRelevance, getInstanceId, getPhaseKindOfFunction, isInitializedFromSource, 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.3.12
|
|
45
|
+
var version = "2.3.12";
|
|
46
46
|
|
|
47
47
|
//#endregion
|
|
48
48
|
//#region src/utils/create-rule.ts
|
|
@@ -182,6 +182,7 @@ function create$3(context) {
|
|
|
182
182
|
if (fKind == null) return;
|
|
183
183
|
if (!ComponentPhaseRelevance.has(fKind)) return;
|
|
184
184
|
match(getCallKind$3(node)).with("addEventListener", (callKind) => {
|
|
185
|
+
if (node.callee.type === AST_NODE_TYPES.MemberExpression && node.callee.object.type === AST_NODE_TYPES.Identifier && isInitializedFromSource(node.callee.object.name, "react-native", context.sourceCode.getScope(node))) return;
|
|
185
186
|
const [type, listener, options] = node.arguments;
|
|
186
187
|
if (type == null || listener == null) return;
|
|
187
188
|
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.3.12
|
|
3
|
+
"version": "2.3.12",
|
|
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.48.1",
|
|
44
44
|
"string-ts": "^2.3.1",
|
|
45
45
|
"ts-pattern": "^5.9.0",
|
|
46
|
-
"@eslint-react/ast": "2.3.12
|
|
47
|
-
"@eslint-react/
|
|
48
|
-
"@eslint-react/shared": "2.3.12
|
|
49
|
-
"@eslint-react/
|
|
50
|
-
"@eslint-react/
|
|
46
|
+
"@eslint-react/ast": "2.3.12",
|
|
47
|
+
"@eslint-react/core": "2.3.12",
|
|
48
|
+
"@eslint-react/shared": "2.3.12",
|
|
49
|
+
"@eslint-react/eff": "2.3.12",
|
|
50
|
+
"@eslint-react/var": "2.3.12"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@types/react": "^19.2.7",
|