eslint-plugin-react-web-api 1.24.0-beta.1 → 1.24.0-beta.16

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 CHANGED
@@ -3,7 +3,6 @@
3
3
  var AST2 = require('@eslint-react/ast');
4
4
  var core = require('@eslint-react/core');
5
5
  var eff = require('@eslint-react/eff');
6
- var JSX = require('@eslint-react/jsx');
7
6
  var VAR2 = require('@eslint-react/var');
8
7
  var utils = require('@typescript-eslint/utils');
9
8
  var tsPattern = require('ts-pattern');
@@ -29,12 +28,11 @@ function _interopNamespace(e) {
29
28
  }
30
29
 
31
30
  var AST2__namespace = /*#__PURE__*/_interopNamespace(AST2);
32
- var JSX__namespace = /*#__PURE__*/_interopNamespace(JSX);
33
31
  var VAR2__namespace = /*#__PURE__*/_interopNamespace(VAR2);
34
32
 
35
33
  // package.json
36
34
  var name = "eslint-plugin-react-web-api";
37
- var version = "1.24.0-beta.1";
35
+ var version = "1.24.0-beta.16";
38
36
  var createRule = shared.createRuleForPlugin("web-api");
39
37
  function getInstanceID(node, prev) {
40
38
  switch (true) {
@@ -51,7 +49,7 @@ function getInstanceID(node, prev) {
51
49
  }
52
50
  }
53
51
  function getPhaseKindOfFunction(node) {
54
- return tsPattern.match(node).when(core.isSetupFunction, () => "setup").when(core.isCleanupFunction, () => "cleanup").when(core.isComponentDidMountFunction, () => "mount").when(core.isComponentWillUnmountFunction, () => "unmount").otherwise(() => eff._);
52
+ return tsPattern.match(node).when(core.isFunctionOfUseEffectSetup, () => "setup").when(core.isFunctionOfUseEffectCleanup, () => "cleanup").when(core.isFunctionOfComponentDidMount, () => "mount").when(core.isFunctionOfComponentWillUnmount, () => "unmount").otherwise(() => eff._);
55
53
  }
56
54
  function isInstanceIDEqual(a, b, context) {
57
55
  return AST2__namespace.isNodeEqual(a, b) || VAR2__namespace.isNodeValueEqual(a, b, [
@@ -97,7 +95,7 @@ function getSignalValueExpression(node, initialScope) {
97
95
  }
98
96
  function getOptions(node, initialScope) {
99
97
  function findProp(properties, propName) {
100
- return JSX__namespace.findPropInProperties(propName, properties, initialScope);
98
+ return VAR2__namespace.findPropertyInProperties(propName, properties, initialScope);
101
99
  }
102
100
  function getPropValue(prop, filter = (a) => true) {
103
101
  if (prop?.type !== utils.AST_NODE_TYPES.Property) return eff._;
@@ -109,7 +107,7 @@ function getOptions(node, initialScope) {
109
107
  break;
110
108
  }
111
109
  default: {
112
- v = VAR2__namespace.toResolved({ kind: "lazy", node: value, initialScope }).value;
110
+ v = VAR2__namespace.toStaticValue({ kind: "lazy", node: value, initialScope }).value;
113
111
  break;
114
112
  }
115
113
  }
package/dist/index.mjs CHANGED
@@ -1,7 +1,6 @@
1
1
  import * as AST2 from '@eslint-react/ast';
2
- import { ERPhaseRelevance, isSetupFunction, isCleanupFunction, isComponentDidMountFunction, isComponentWillUnmountFunction, isInversePhase } from '@eslint-react/core';
2
+ import { ERPhaseRelevance, isFunctionOfUseEffectSetup, isFunctionOfUseEffectCleanup, isFunctionOfComponentDidMount, isFunctionOfComponentWillUnmount, isInversePhase } from '@eslint-react/core';
3
3
  import { _, or } from '@eslint-react/eff';
4
- import * as JSX from '@eslint-react/jsx';
5
4
  import * as VAR2 from '@eslint-react/var';
6
5
  import { AST_NODE_TYPES } from '@typescript-eslint/utils';
7
6
  import { match, isMatching, P } from 'ts-pattern';
@@ -10,7 +9,7 @@ import { AST_NODE_TYPES as AST_NODE_TYPES$1 } from '@typescript-eslint/types';
10
9
 
11
10
  // package.json
12
11
  var name = "eslint-plugin-react-web-api";
13
- var version = "1.24.0-beta.1";
12
+ var version = "1.24.0-beta.16";
14
13
  var createRule = createRuleForPlugin("web-api");
15
14
  function getInstanceID(node, prev) {
16
15
  switch (true) {
@@ -27,7 +26,7 @@ function getInstanceID(node, prev) {
27
26
  }
28
27
  }
29
28
  function getPhaseKindOfFunction(node) {
30
- return match(node).when(isSetupFunction, () => "setup").when(isCleanupFunction, () => "cleanup").when(isComponentDidMountFunction, () => "mount").when(isComponentWillUnmountFunction, () => "unmount").otherwise(() => _);
29
+ return match(node).when(isFunctionOfUseEffectSetup, () => "setup").when(isFunctionOfUseEffectCleanup, () => "cleanup").when(isFunctionOfComponentDidMount, () => "mount").when(isFunctionOfComponentWillUnmount, () => "unmount").otherwise(() => _);
31
30
  }
32
31
  function isInstanceIDEqual(a, b, context) {
33
32
  return AST2.isNodeEqual(a, b) || VAR2.isNodeValueEqual(a, b, [
@@ -73,7 +72,7 @@ function getSignalValueExpression(node, initialScope) {
73
72
  }
74
73
  function getOptions(node, initialScope) {
75
74
  function findProp(properties, propName) {
76
- return JSX.findPropInProperties(propName, properties, initialScope);
75
+ return VAR2.findPropertyInProperties(propName, properties, initialScope);
77
76
  }
78
77
  function getPropValue(prop, filter = (a) => true) {
79
78
  if (prop?.type !== AST_NODE_TYPES.Property) return _;
@@ -85,7 +84,7 @@ function getOptions(node, initialScope) {
85
84
  break;
86
85
  }
87
86
  default: {
88
- v = VAR2.toResolved({ kind: "lazy", node: value, initialScope }).value;
87
+ v = VAR2.toStaticValue({ kind: "lazy", node: value, initialScope }).value;
89
88
  break;
90
89
  }
91
90
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-react-web-api",
3
- "version": "1.24.0-beta.1",
3
+ "version": "1.24.0-beta.16",
4
4
  "description": "ESLint React's ESLint plugin for interacting with Web APIs",
5
5
  "keywords": [
6
6
  "react",
@@ -41,21 +41,20 @@
41
41
  "./package.json"
42
42
  ],
43
43
  "dependencies": {
44
- "@typescript-eslint/scope-manager": "^8.19.1",
45
- "@typescript-eslint/types": "^8.19.1",
46
- "@typescript-eslint/utils": "^8.19.1",
44
+ "@typescript-eslint/scope-manager": "^8.20.0",
45
+ "@typescript-eslint/types": "^8.20.0",
46
+ "@typescript-eslint/utils": "^8.20.0",
47
47
  "string-ts": "^2.2.0",
48
48
  "ts-pattern": "^5.6.0",
49
- "@eslint-react/ast": "1.24.0-beta.1",
50
- "@eslint-react/core": "1.24.0-beta.1",
51
- "@eslint-react/eff": "1.24.0-beta.1",
52
- "@eslint-react/jsx": "1.24.0-beta.1",
53
- "@eslint-react/shared": "1.24.0-beta.1",
54
- "@eslint-react/types": "1.24.0-beta.1",
55
- "@eslint-react/var": "1.24.0-beta.1"
49
+ "@eslint-react/ast": "1.24.0-beta.16",
50
+ "@eslint-react/core": "1.24.0-beta.16",
51
+ "@eslint-react/eff": "1.24.0-beta.16",
52
+ "@eslint-react/jsx": "1.24.0-beta.16",
53
+ "@eslint-react/shared": "1.24.0-beta.16",
54
+ "@eslint-react/var": "1.24.0-beta.16"
56
55
  },
57
56
  "devDependencies": {
58
- "@types/react": "^19.0.5",
57
+ "@types/react": "^19.0.7",
59
58
  "@types/react-dom": "^19.0.3",
60
59
  "tsup": "^8.3.5",
61
60
  "@workspace/configs": "0.0.0"