eslint-plugin-react-x 5.5.3-next.0 → 5.5.3-next.2

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.
Files changed (2) hide show
  1. package/dist/index.js +20 -20
  2. package/package.json +14 -17
package/dist/index.js CHANGED
@@ -142,7 +142,7 @@ const rules$6 = {
142
142
  //#endregion
143
143
  //#region package.json
144
144
  var name$6 = "eslint-plugin-react-x";
145
- var version = "5.5.3-next.0";
145
+ var version = "5.5.3-next.2";
146
146
 
147
147
  //#endregion
148
148
  //#region src/utils/create-rule.ts
@@ -1326,8 +1326,8 @@ function create$47(context) {
1326
1326
  }
1327
1327
  /**
1328
1328
  * Check if `name` appears anywhere inside a parameter pattern.
1329
- * @param pattern
1330
- * @param name
1329
+ * @param pattern - The parameter pattern to search in.
1330
+ * @param name - The identifier name to look for.
1331
1331
  */
1332
1332
  function identifierExistsInPattern(pattern, name) {
1333
1333
  switch (pattern.type) {
@@ -4003,9 +4003,9 @@ var purity_default = createRule({
4003
4003
  * Follows simple assignment chains like `const M = Math` or `const w = window`.
4004
4004
  * Returns `null` if the identifier is locally defined (parameter, import, function declaration, etc.)
4005
4005
  * or resolves to a non-builtin source.
4006
- * @param context
4007
- * @param node
4008
- * @param visited
4006
+ * @param context - The rule context.
4007
+ * @param node - The identifier node to resolve.
4008
+ * @param visited - A set of already visited identifier names to prevent infinite loops.
4009
4009
  */
4010
4010
  function resolveBuiltinObjectName(context, node, visited = /* @__PURE__ */ new Set()) {
4011
4011
  if (visited.has(node.name)) return null;
@@ -6967,27 +6967,27 @@ function findVariableForIdentifier(context, identifier) {
6967
6967
  }
6968
6968
  function getDynamicComponentSource(context, variable, isInsideRender, seen = /* @__PURE__ */ new Set()) {
6969
6969
  if (seen.has(variable)) return {
6970
- isDynamic: false,
6971
- creationNode: null
6970
+ creationNode: null,
6971
+ isDynamic: false
6972
6972
  };
6973
6973
  seen.add(variable);
6974
6974
  for (const def of variable.defs) {
6975
6975
  const defNode = def.node;
6976
6976
  if (!isInsideRender(defNode)) continue;
6977
6977
  if (defNode.type === AST_NODE_TYPES.FunctionDeclaration) return {
6978
- isDynamic: true,
6979
- creationNode: defNode
6978
+ creationNode: defNode,
6979
+ isDynamic: true
6980
6980
  };
6981
6981
  if (defNode.type === AST_NODE_TYPES.ClassDeclaration) return {
6982
- isDynamic: true,
6983
- creationNode: defNode
6982
+ creationNode: defNode,
6983
+ isDynamic: true
6984
6984
  };
6985
6985
  if (defNode.type === AST_NODE_TYPES.VariableDeclarator) {
6986
6986
  if (defNode.init != null) {
6987
6987
  const source = resolveDynamicValue(context, defNode.init, isInsideRender, seen);
6988
6988
  if (source != null) return {
6989
- isDynamic: true,
6990
- creationNode: source
6989
+ creationNode: source,
6990
+ isDynamic: true
6991
6991
  };
6992
6992
  }
6993
6993
  for (const ref of variable.references) {
@@ -6996,16 +6996,16 @@ function getDynamicComponentSource(context, variable, isInsideRender, seen = /*
6996
6996
  if (id.parent?.type === AST_NODE_TYPES.AssignmentExpression && id.parent.left === id) {
6997
6997
  const source = resolveDynamicValue(context, id.parent.right, isInsideRender, seen);
6998
6998
  if (source != null) return {
6999
- isDynamic: true,
7000
- creationNode: source
6999
+ creationNode: source,
7000
+ isDynamic: true
7001
7001
  };
7002
7002
  }
7003
7003
  }
7004
7004
  }
7005
7005
  }
7006
7006
  return {
7007
- isDynamic: false,
7008
- creationNode: null
7007
+ creationNode: null,
7008
+ isDynamic: false
7009
7009
  };
7010
7010
  }
7011
7011
 
@@ -7198,10 +7198,10 @@ var use_memo_default = createRule({
7198
7198
  type: "problem",
7199
7199
  docs: { description: "Validates that 'useMemo' is called with a callback that returns a value." },
7200
7200
  messages: {
7201
- noParameters: "useMemo() callbacks may not accept parameters.\n\nuseMemo() callbacks are called by React to cache calculations across re-renders. They should not take parameters. Instead, directly reference the props, state, or local variables needed for the computation.",
7201
+ mustReturnAValue: "useMemo() callbacks must return a value.\n\nThis useMemo() callback doesn't return a value. useMemo() is for computing and caching values, not for arbitrary side effects.",
7202
7202
  noAsyncOrGeneratorFunctions: "useMemo() callbacks may not be async or generator functions.\n\nuseMemo() callbacks are called once and must synchronously return a value.",
7203
+ noParameters: "useMemo() callbacks may not accept parameters.\n\nuseMemo() callbacks are called by React to cache calculations across re-renders. They should not take parameters. Instead, directly reference the props, state, or local variables needed for the computation.",
7203
7204
  noReassigningOuterVariables: "useMemo() callbacks may not reassign variables declared outside of the callback.\n\nuseMemo() callbacks must be pure functions and cannot reassign variables defined outside of the callback function.",
7204
- mustReturnAValue: "useMemo() callbacks must return a value.\n\nThis useMemo() callback doesn't return a value. useMemo() is for computing and caching values, not for arbitrary side effects.",
7205
7205
  resultMustBeUsed: "useMemo() result is unused.\n\nThis useMemo() value is unused. useMemo() is for computing and caching values, not for arbitrary side effects."
7206
7206
  },
7207
7207
  schema: []
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-react-x",
3
- "version": "5.5.3-next.0",
3
+ "version": "5.5.3-next.2",
4
4
  "description": "A set of composable ESLint rules for libraries and frameworks that use React as a UI runtime.",
5
5
  "keywords": [
6
6
  "react",
@@ -33,25 +33,24 @@
33
33
  "module": "./dist/index.js",
34
34
  "types": "./dist/index.d.ts",
35
35
  "files": [
36
- "dist",
37
- "./package.json"
36
+ "dist"
38
37
  ],
39
38
  "dependencies": {
40
- "@typescript-eslint/scope-manager": "^8.59.0",
41
- "@typescript-eslint/type-utils": "^8.59.0",
42
- "@typescript-eslint/types": "^8.59.0",
43
- "@typescript-eslint/typescript-estree": "^8.59.0",
44
- "@typescript-eslint/utils": "^8.59.0",
39
+ "@typescript-eslint/scope-manager": "^8.59.1",
40
+ "@typescript-eslint/type-utils": "^8.59.1",
41
+ "@typescript-eslint/types": "^8.59.1",
42
+ "@typescript-eslint/typescript-estree": "^8.59.1",
43
+ "@typescript-eslint/utils": "^8.59.1",
45
44
  "compare-versions": "^6.1.1",
46
45
  "string-ts": "^2.3.1",
47
46
  "ts-api-utils": "^2.5.0",
48
47
  "ts-pattern": "^5.9.0",
49
- "@eslint-react/ast": "5.5.3-next.0",
50
- "@eslint-react/core": "5.5.3-next.0",
51
- "@eslint-react/shared": "5.5.3-next.0",
52
- "@eslint-react/jsx": "5.5.3-next.0",
53
- "@eslint-react/eslint": "5.5.3-next.0",
54
- "@eslint-react/var": "5.5.3-next.0"
48
+ "@eslint-react/ast": "5.5.3-next.2",
49
+ "@eslint-react/jsx": "5.5.3-next.2",
50
+ "@eslint-react/core": "5.5.3-next.2",
51
+ "@eslint-react/eslint": "5.5.3-next.2",
52
+ "@eslint-react/shared": "5.5.3-next.2",
53
+ "@eslint-react/var": "5.5.3-next.2"
55
54
  },
56
55
  "devDependencies": {
57
56
  "@types/react": "^19.2.14",
@@ -63,6 +62,7 @@
63
62
  "tsdown": "^0.21.10",
64
63
  "tsl": "^1.0.30",
65
64
  "tsl-dx": "^0.12.0",
65
+ "typescript": "^6.0.3",
66
66
  "@local/configs": "0.0.0",
67
67
  "@local/eff": "3.0.0-beta.72"
68
68
  },
@@ -73,9 +73,6 @@
73
73
  "engines": {
74
74
  "node": ">=22.0.0"
75
75
  },
76
- "publishConfig": {
77
- "access": "public"
78
- },
79
76
  "inlinedDependencies": {
80
77
  "@local/eff": "workspace:*"
81
78
  },