eslint-plugin-react-x 1.27.0 → 1.27.1-beta.1

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
@@ -137,7 +137,7 @@ var settings3 = {
137
137
 
138
138
  // package.json
139
139
  var name4 = "eslint-plugin-react-x";
140
- var version = "1.27.0";
140
+ var version = "1.27.1-beta.1";
141
141
  var createRule = shared.createRuleForPlugin("x");
142
142
 
143
143
  // src/utils/get-associated-tokens.ts
@@ -1795,27 +1795,27 @@ var no_missing_context_display_name_default = createRule({
1795
1795
  name: RULE_NAME29,
1796
1796
  create(context) {
1797
1797
  if (!context.sourceCode.text.includes("createContext")) return {};
1798
- const contexts = /* @__PURE__ */ new Set();
1799
- const displayNameAssignments = /* @__PURE__ */ new Set();
1798
+ const createCalls = [];
1799
+ const displayNameAssignments = [];
1800
1800
  return {
1801
1801
  CallExpression(node) {
1802
1802
  if (!core.isCreateContextCall(node, context)) return;
1803
- contexts.add(node);
1803
+ createCalls.push(node);
1804
1804
  },
1805
1805
  [core.DISPLAY_NAME_ASSIGNMENT_SELECTOR](node) {
1806
- displayNameAssignments.add(node);
1806
+ displayNameAssignments.push(node);
1807
1807
  },
1808
1808
  "Program:exit"() {
1809
- for (const ctx of contexts) {
1810
- const id = VAR__namespace.getVariableId(ctx);
1809
+ for (const call of createCalls) {
1810
+ const id = VAR__namespace.getVariableId(call);
1811
1811
  if (id == null) {
1812
1812
  context.report({
1813
1813
  messageId: "noMissingContextDisplayName",
1814
- node: ctx
1814
+ node: call
1815
1815
  });
1816
1816
  continue;
1817
1817
  }
1818
- const hasDisplayNameAssignment = [...displayNameAssignments].some((node) => {
1818
+ const hasDisplayNameAssignment = displayNameAssignments.some((node) => {
1819
1819
  const left = node.left;
1820
1820
  if (left.type !== types.AST_NODE_TYPES.MemberExpression) return false;
1821
1821
  const object = left.object;
@@ -1827,7 +1827,7 @@ var no_missing_context_display_name_default = createRule({
1827
1827
  if (!hasDisplayNameAssignment) {
1828
1828
  context.report({
1829
1829
  messageId: "noMissingContextDisplayName",
1830
- node: ctx
1830
+ node: call
1831
1831
  });
1832
1832
  }
1833
1833
  }
package/dist/index.mjs CHANGED
@@ -110,7 +110,7 @@ var settings3 = {
110
110
 
111
111
  // package.json
112
112
  var name4 = "eslint-plugin-react-x";
113
- var version = "1.27.0";
113
+ var version = "1.27.1-beta.1";
114
114
  var createRule = createRuleForPlugin("x");
115
115
 
116
116
  // src/utils/get-associated-tokens.ts
@@ -1768,27 +1768,27 @@ var no_missing_context_display_name_default = createRule({
1768
1768
  name: RULE_NAME29,
1769
1769
  create(context) {
1770
1770
  if (!context.sourceCode.text.includes("createContext")) return {};
1771
- const contexts = /* @__PURE__ */ new Set();
1772
- const displayNameAssignments = /* @__PURE__ */ new Set();
1771
+ const createCalls = [];
1772
+ const displayNameAssignments = [];
1773
1773
  return {
1774
1774
  CallExpression(node) {
1775
1775
  if (!isCreateContextCall(node, context)) return;
1776
- contexts.add(node);
1776
+ createCalls.push(node);
1777
1777
  },
1778
1778
  [DISPLAY_NAME_ASSIGNMENT_SELECTOR](node) {
1779
- displayNameAssignments.add(node);
1779
+ displayNameAssignments.push(node);
1780
1780
  },
1781
1781
  "Program:exit"() {
1782
- for (const ctx of contexts) {
1783
- const id = VAR.getVariableId(ctx);
1782
+ for (const call of createCalls) {
1783
+ const id = VAR.getVariableId(call);
1784
1784
  if (id == null) {
1785
1785
  context.report({
1786
1786
  messageId: "noMissingContextDisplayName",
1787
- node: ctx
1787
+ node: call
1788
1788
  });
1789
1789
  continue;
1790
1790
  }
1791
- const hasDisplayNameAssignment = [...displayNameAssignments].some((node) => {
1791
+ const hasDisplayNameAssignment = displayNameAssignments.some((node) => {
1792
1792
  const left = node.left;
1793
1793
  if (left.type !== AST_NODE_TYPES.MemberExpression) return false;
1794
1794
  const object = left.object;
@@ -1800,7 +1800,7 @@ var no_missing_context_display_name_default = createRule({
1800
1800
  if (!hasDisplayNameAssignment) {
1801
1801
  context.report({
1802
1802
  messageId: "noMissingContextDisplayName",
1803
- node: ctx
1803
+ node: call
1804
1804
  });
1805
1805
  }
1806
1806
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-react-x",
3
- "version": "1.27.0",
3
+ "version": "1.27.1-beta.1",
4
4
  "description": "A set of composable linting rules for libraries and frameworks that use React as a UI runtime.",
5
5
  "keywords": [
6
6
  "react",
@@ -50,12 +50,12 @@
50
50
  "is-immutable-type": "^5.0.1",
51
51
  "string-ts": "^2.2.1",
52
52
  "ts-pattern": "^5.6.2",
53
- "@eslint-react/ast": "1.27.0",
54
- "@eslint-react/eff": "1.27.0",
55
- "@eslint-react/core": "1.27.0",
56
- "@eslint-react/jsx": "1.27.0",
57
- "@eslint-react/shared": "1.27.0",
58
- "@eslint-react/var": "1.27.0"
53
+ "@eslint-react/ast": "1.27.1-beta.1",
54
+ "@eslint-react/core": "1.27.1-beta.1",
55
+ "@eslint-react/jsx": "1.27.1-beta.1",
56
+ "@eslint-react/eff": "1.27.1-beta.1",
57
+ "@eslint-react/var": "1.27.1-beta.1",
58
+ "@eslint-react/shared": "1.27.1-beta.1"
59
59
  },
60
60
  "devDependencies": {
61
61
  "@types/react": "^19.0.10",