eslint-plugin-react-x 1.23.1-beta.2 → 1.23.1-beta.6

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
@@ -42,7 +42,7 @@ var ts__default = /*#__PURE__*/_interopDefault(ts);
42
42
 
43
43
  // package.json
44
44
  var name = "eslint-plugin-react-x";
45
- var version = "1.23.1-beta.2";
45
+ var version = "1.23.1-beta.6";
46
46
  var createRule = shared.createRuleForPlugin("x");
47
47
 
48
48
  // src/rules/avoid-shorthand-boolean.ts
@@ -2179,11 +2179,11 @@ var no_unstable_context_value_default = createRule({
2179
2179
  eff.O.bind("valueExpression", ({ value }) => value?.type === types.AST_NODE_TYPES.JSXExpressionContainer ? eff.O.some(value.expression) : eff.O.none()),
2180
2180
  eff.O.bind("construction", ({ valueExpression }) => {
2181
2181
  const initialScope = context.sourceCode.getScope(valueExpression);
2182
- return eff.O.some(VAR__namespace.inspectConstruction(valueExpression, initialScope));
2182
+ return eff.O.some(VAR__namespace.getValueConstruction(valueExpression, initialScope));
2183
2183
  })
2184
2184
  );
2185
2185
  for (const { construction, function: [_, fNode] } of eff.O.toArray(constructionEntry)) {
2186
- if (construction._tag === "None") continue;
2186
+ if (construction.kind === "None") continue;
2187
2187
  if (core.isReactHookCall(construction.node)) continue;
2188
2188
  constructions.set(fNode, [
2189
2189
  ...constructions.get(fNode) ?? [],
@@ -2195,9 +2195,9 @@ var no_unstable_context_value_default = createRule({
2195
2195
  const components = ctx.getAllComponents(node).values();
2196
2196
  for (const { node: component } of components) {
2197
2197
  for (const construction of constructions.get(component) ?? []) {
2198
- if (construction._tag === "None") continue;
2199
- const { node: constructionNode, _tag } = construction;
2200
- const messageId = _tag.startsWith("Function") ? "noUnstableContextValueWithFunction" : "noUnstableContextValueWithIdentifier";
2198
+ if (construction.kind === "None") continue;
2199
+ const { kind, node: constructionNode } = construction;
2200
+ const messageId = kind.startsWith("Function") ? "noUnstableContextValueWithFunction" : "noUnstableContextValueWithIdentifier";
2201
2201
  context.report({
2202
2202
  messageId,
2203
2203
  node: constructionNode,
@@ -2248,12 +2248,12 @@ var no_unstable_default_props_default = createRule({
2248
2248
  const { value } = prop;
2249
2249
  const { right } = value;
2250
2250
  const initialScope = context.sourceCode.getScope(value);
2251
- const construction = VAR__namespace.inspectConstruction(
2251
+ const construction = VAR__namespace.getValueConstruction(
2252
2252
  value,
2253
2253
  initialScope,
2254
- VAR__namespace.ConstructionHint.StrictCallExpression
2254
+ VAR__namespace.ValueConstructionHint.StrictCallExpression
2255
2255
  );
2256
- if (construction._tag === "None") continue;
2256
+ if (construction.kind === "None") continue;
2257
2257
  if (core.isReactHookCall(construction.node)) continue;
2258
2258
  const forbiddenType = AST11__namespace.toReadableNodeType(right);
2259
2259
  context.report({
package/dist/index.mjs CHANGED
@@ -15,7 +15,7 @@ import { getTypeImmutability, isUnknown, isImmutable, isReadonlyShallow, isReado
15
15
 
16
16
  // package.json
17
17
  var name = "eslint-plugin-react-x";
18
- var version = "1.23.1-beta.2";
18
+ var version = "1.23.1-beta.6";
19
19
  var createRule = createRuleForPlugin("x");
20
20
 
21
21
  // src/rules/avoid-shorthand-boolean.ts
@@ -2152,11 +2152,11 @@ var no_unstable_context_value_default = createRule({
2152
2152
  O.bind("valueExpression", ({ value }) => value?.type === AST_NODE_TYPES.JSXExpressionContainer ? O.some(value.expression) : O.none()),
2153
2153
  O.bind("construction", ({ valueExpression }) => {
2154
2154
  const initialScope = context.sourceCode.getScope(valueExpression);
2155
- return O.some(VAR.inspectConstruction(valueExpression, initialScope));
2155
+ return O.some(VAR.getValueConstruction(valueExpression, initialScope));
2156
2156
  })
2157
2157
  );
2158
2158
  for (const { construction, function: [_, fNode] } of O.toArray(constructionEntry)) {
2159
- if (construction._tag === "None") continue;
2159
+ if (construction.kind === "None") continue;
2160
2160
  if (isReactHookCall(construction.node)) continue;
2161
2161
  constructions.set(fNode, [
2162
2162
  ...constructions.get(fNode) ?? [],
@@ -2168,9 +2168,9 @@ var no_unstable_context_value_default = createRule({
2168
2168
  const components = ctx.getAllComponents(node).values();
2169
2169
  for (const { node: component } of components) {
2170
2170
  for (const construction of constructions.get(component) ?? []) {
2171
- if (construction._tag === "None") continue;
2172
- const { node: constructionNode, _tag } = construction;
2173
- const messageId = _tag.startsWith("Function") ? "noUnstableContextValueWithFunction" : "noUnstableContextValueWithIdentifier";
2171
+ if (construction.kind === "None") continue;
2172
+ const { kind, node: constructionNode } = construction;
2173
+ const messageId = kind.startsWith("Function") ? "noUnstableContextValueWithFunction" : "noUnstableContextValueWithIdentifier";
2174
2174
  context.report({
2175
2175
  messageId,
2176
2176
  node: constructionNode,
@@ -2221,12 +2221,12 @@ var no_unstable_default_props_default = createRule({
2221
2221
  const { value } = prop;
2222
2222
  const { right } = value;
2223
2223
  const initialScope = context.sourceCode.getScope(value);
2224
- const construction = VAR.inspectConstruction(
2224
+ const construction = VAR.getValueConstruction(
2225
2225
  value,
2226
2226
  initialScope,
2227
- VAR.ConstructionHint.StrictCallExpression
2227
+ VAR.ValueConstructionHint.StrictCallExpression
2228
2228
  );
2229
- if (construction._tag === "None") continue;
2229
+ if (construction.kind === "None") continue;
2230
2230
  if (isReactHookCall(construction.node)) continue;
2231
2231
  const forbiddenType = AST11.toReadableNodeType(right);
2232
2232
  context.report({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-react-x",
3
- "version": "1.23.1-beta.2",
3
+ "version": "1.23.1-beta.6",
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",
@@ -45,17 +45,17 @@
45
45
  "@typescript-eslint/types": "^8.19.0",
46
46
  "@typescript-eslint/utils": "^8.19.0",
47
47
  "compare-versions": "^6.1.1",
48
- "is-immutable-type": "^5.0.0",
48
+ "is-immutable-type": "^5.0.1",
49
49
  "string-ts": "^2.2.0",
50
50
  "ts-api-utils": "^2.0.0",
51
51
  "ts-pattern": "^5.6.0",
52
- "@eslint-react/ast": "1.23.1-beta.2",
53
- "@eslint-react/core": "1.23.1-beta.2",
54
- "@eslint-react/eff": "1.23.1-beta.2",
55
- "@eslint-react/jsx": "1.23.1-beta.2",
56
- "@eslint-react/shared": "1.23.1-beta.2",
57
- "@eslint-react/types": "1.23.1-beta.2",
58
- "@eslint-react/var": "1.23.1-beta.2"
52
+ "@eslint-react/ast": "1.23.1-beta.6",
53
+ "@eslint-react/core": "1.23.1-beta.6",
54
+ "@eslint-react/eff": "1.23.1-beta.6",
55
+ "@eslint-react/jsx": "1.23.1-beta.6",
56
+ "@eslint-react/shared": "1.23.1-beta.6",
57
+ "@eslint-react/var": "1.23.1-beta.6",
58
+ "@eslint-react/types": "1.23.1-beta.6"
59
59
  },
60
60
  "devDependencies": {
61
61
  "@types/react": "^19.0.2",