eslint-plugin-react-x 1.47.5-next.0 → 1.48.2-next.0

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
@@ -141,7 +141,7 @@ var settings3 = {
141
141
 
142
142
  // package.json
143
143
  var name4 = "eslint-plugin-react-x";
144
- var version = "1.47.5-next.0";
144
+ var version = "1.48.2-next.0";
145
145
  var createRule = utils.ESLintUtils.RuleCreator(shared.getDocsUrl("x"));
146
146
 
147
147
  // src/rules/avoid-shorthand-boolean.ts
@@ -502,7 +502,7 @@ function isReactChildrenMethod(name5) {
502
502
  return reactChildrenMethod.some((method) => method === name5);
503
503
  }
504
504
  function isUsingReactChildren(context, node) {
505
- const { importSource = "react" } = shared.unsafeDecodeSettings(context.settings);
505
+ const { importSource = "react" } = shared.coerceSettings(context.settings);
506
506
  const { callee } = node;
507
507
  if (!("property" in callee) || !("object" in callee) || !("name" in callee.property)) {
508
508
  return false;
@@ -1390,7 +1390,7 @@ function create26(context) {
1390
1390
  if (!AST8__namespace.isFunction(iter)) return;
1391
1391
  const arg0 = call?.arguments[0];
1392
1392
  if (call == null || arg0 == null) return;
1393
- if (AST8__namespace.getEcmaExpression(arg0) !== iter) {
1393
+ if (AST8__namespace.getJSExpression(arg0) !== iter) {
1394
1394
  return;
1395
1395
  }
1396
1396
  keyedEntries.set(call, {
@@ -1912,7 +1912,6 @@ function create32(context) {
1912
1912
  }
1913
1913
  const initialScope = context.sourceCode.getScope(node);
1914
1914
  for (const element of elements) {
1915
- if (element?.type !== types.AST_NODE_TYPES.JSXElement) continue;
1916
1915
  if (!ER25__namespace.hasAttribute(context, "key", element.openingElement.attributes, initialScope)) {
1917
1916
  report.send({
1918
1917
  messageId: "missingKey",
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { getDocsUrl, getSettingsFromContext, unsafeDecodeSettings, DEFAULT_ESLINT_REACT_SETTINGS } from '@eslint-react/shared';
1
+ import { getDocsUrl, getSettingsFromContext, coerceSettings, DEFAULT_ESLINT_REACT_SETTINGS } from '@eslint-react/shared';
2
2
  import * as ER25 from '@eslint-react/core';
3
3
  import { ESLintUtils } from '@typescript-eslint/utils';
4
4
  import { JsxConfig, Reporter, Selector } from '@eslint-react/kit';
@@ -114,7 +114,7 @@ var settings3 = {
114
114
 
115
115
  // package.json
116
116
  var name4 = "eslint-plugin-react-x";
117
- var version = "1.47.5-next.0";
117
+ var version = "1.48.2-next.0";
118
118
  var createRule = ESLintUtils.RuleCreator(getDocsUrl("x"));
119
119
 
120
120
  // src/rules/avoid-shorthand-boolean.ts
@@ -475,7 +475,7 @@ function isReactChildrenMethod(name5) {
475
475
  return reactChildrenMethod.some((method) => method === name5);
476
476
  }
477
477
  function isUsingReactChildren(context, node) {
478
- const { importSource = "react" } = unsafeDecodeSettings(context.settings);
478
+ const { importSource = "react" } = coerceSettings(context.settings);
479
479
  const { callee } = node;
480
480
  if (!("property" in callee) || !("object" in callee) || !("name" in callee.property)) {
481
481
  return false;
@@ -1363,7 +1363,7 @@ function create26(context) {
1363
1363
  if (!AST8.isFunction(iter)) return;
1364
1364
  const arg0 = call?.arguments[0];
1365
1365
  if (call == null || arg0 == null) return;
1366
- if (AST8.getEcmaExpression(arg0) !== iter) {
1366
+ if (AST8.getJSExpression(arg0) !== iter) {
1367
1367
  return;
1368
1368
  }
1369
1369
  keyedEntries.set(call, {
@@ -1885,7 +1885,6 @@ function create32(context) {
1885
1885
  }
1886
1886
  const initialScope = context.sourceCode.getScope(node);
1887
1887
  for (const element of elements) {
1888
- if (element?.type !== AST_NODE_TYPES.JSXElement) continue;
1889
1888
  if (!ER25.hasAttribute(context, "key", element.openingElement.attributes, initialScope)) {
1890
1889
  report.send({
1891
1890
  messageId: "missingKey",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-react-x",
3
- "version": "1.47.5-next.0",
3
+ "version": "1.48.2-next.0",
4
4
  "description": "A set of composable ESLint rules for 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.7.0",
53
- "@eslint-react/shared": "1.47.5-next.0",
54
- "@eslint-react/ast": "1.47.5-next.0",
55
- "@eslint-react/var": "1.47.5-next.0",
56
- "@eslint-react/core": "1.47.5-next.0",
57
- "@eslint-react/eff": "1.47.5-next.0",
58
- "@eslint-react/kit": "1.47.5-next.0"
53
+ "@eslint-react/ast": "1.48.2-next.0",
54
+ "@eslint-react/core": "1.48.2-next.0",
55
+ "@eslint-react/shared": "1.48.2-next.0",
56
+ "@eslint-react/var": "1.48.2-next.0",
57
+ "@eslint-react/kit": "1.48.2-next.0",
58
+ "@eslint-react/eff": "1.48.2-next.0"
59
59
  },
60
60
  "devDependencies": {
61
61
  "@types/react": "^19.1.2",