eslint-plugin-react-web-api 1.24.0-beta.3 → 1.24.0-beta.8

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,7 @@
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');
6
+ require('@eslint-react/jsx');
7
7
  var VAR2 = require('@eslint-react/var');
8
8
  var utils = require('@typescript-eslint/utils');
9
9
  var tsPattern = require('ts-pattern');
@@ -29,12 +29,11 @@ function _interopNamespace(e) {
29
29
  }
30
30
 
31
31
  var AST2__namespace = /*#__PURE__*/_interopNamespace(AST2);
32
- var JSX__namespace = /*#__PURE__*/_interopNamespace(JSX);
33
32
  var VAR2__namespace = /*#__PURE__*/_interopNamespace(VAR2);
34
33
 
35
34
  // package.json
36
35
  var name = "eslint-plugin-react-web-api";
37
- var version = "1.24.0-beta.3";
36
+ var version = "1.24.0-beta.8";
38
37
  var createRule = shared.createRuleForPlugin("web-api");
39
38
  function getInstanceID(node, prev) {
40
39
  switch (true) {
@@ -51,7 +50,7 @@ function getInstanceID(node, prev) {
51
50
  }
52
51
  }
53
52
  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._);
53
+ return tsPattern.match(node).when(core.isFunctionOfUseEffectSetup, () => "setup").when(core.isFunctionOfUseEffectCleanup, () => "cleanup").when(core.isFunctionOfComponentDidMount, () => "mount").when(core.isFunctionOfComponentWillUnmount, () => "unmount").otherwise(() => eff._);
55
54
  }
56
55
  function isInstanceIDEqual(a, b, context) {
57
56
  return AST2__namespace.isNodeEqual(a, b) || VAR2__namespace.isNodeValueEqual(a, b, [
@@ -97,7 +96,7 @@ function getSignalValueExpression(node, initialScope) {
97
96
  }
98
97
  function getOptions(node, initialScope) {
99
98
  function findProp(properties, propName) {
100
- return JSX__namespace.findPropInProperties(propName, properties, initialScope);
99
+ return VAR2__namespace.findPropertyInProperties(propName, properties, initialScope);
101
100
  }
102
101
  function getPropValue(prop, filter = (a) => true) {
103
102
  if (prop?.type !== utils.AST_NODE_TYPES.Property) return eff._;
package/dist/index.mjs CHANGED
@@ -1,7 +1,7 @@
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';
4
+ import '@eslint-react/jsx';
5
5
  import * as VAR2 from '@eslint-react/var';
6
6
  import { AST_NODE_TYPES } from '@typescript-eslint/utils';
7
7
  import { match, isMatching, P } from 'ts-pattern';
@@ -10,7 +10,7 @@ import { AST_NODE_TYPES as AST_NODE_TYPES$1 } from '@typescript-eslint/types';
10
10
 
11
11
  // package.json
12
12
  var name = "eslint-plugin-react-web-api";
13
- var version = "1.24.0-beta.3";
13
+ var version = "1.24.0-beta.8";
14
14
  var createRule = createRuleForPlugin("web-api");
15
15
  function getInstanceID(node, prev) {
16
16
  switch (true) {
@@ -27,7 +27,7 @@ function getInstanceID(node, prev) {
27
27
  }
28
28
  }
29
29
  function getPhaseKindOfFunction(node) {
30
- return match(node).when(isSetupFunction, () => "setup").when(isCleanupFunction, () => "cleanup").when(isComponentDidMountFunction, () => "mount").when(isComponentWillUnmountFunction, () => "unmount").otherwise(() => _);
30
+ return match(node).when(isFunctionOfUseEffectSetup, () => "setup").when(isFunctionOfUseEffectCleanup, () => "cleanup").when(isFunctionOfComponentDidMount, () => "mount").when(isFunctionOfComponentWillUnmount, () => "unmount").otherwise(() => _);
31
31
  }
32
32
  function isInstanceIDEqual(a, b, context) {
33
33
  return AST2.isNodeEqual(a, b) || VAR2.isNodeValueEqual(a, b, [
@@ -73,7 +73,7 @@ function getSignalValueExpression(node, initialScope) {
73
73
  }
74
74
  function getOptions(node, initialScope) {
75
75
  function findProp(properties, propName) {
76
- return JSX.findPropInProperties(propName, properties, initialScope);
76
+ return VAR2.findPropertyInProperties(propName, properties, initialScope);
77
77
  }
78
78
  function getPropValue(prop, filter = (a) => true) {
79
79
  if (prop?.type !== AST_NODE_TYPES.Property) return _;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-react-web-api",
3
- "version": "1.24.0-beta.3",
3
+ "version": "1.24.0-beta.8",
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/core": "1.24.0-beta.3",
50
- "@eslint-react/eff": "1.24.0-beta.3",
51
- "@eslint-react/types": "1.24.0-beta.3",
52
- "@eslint-react/jsx": "1.24.0-beta.3",
53
- "@eslint-react/shared": "1.24.0-beta.3",
54
- "@eslint-react/var": "1.24.0-beta.3",
55
- "@eslint-react/ast": "1.24.0-beta.3"
49
+ "@eslint-react/ast": "1.24.0-beta.8",
50
+ "@eslint-react/eff": "1.24.0-beta.8",
51
+ "@eslint-react/jsx": "1.24.0-beta.8",
52
+ "@eslint-react/shared": "1.24.0-beta.8",
53
+ "@eslint-react/core": "1.24.0-beta.8",
54
+ "@eslint-react/var": "1.24.0-beta.8"
56
55
  },
57
56
  "devDependencies": {
58
- "@types/react": "^19.0.6",
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"