eslint-plugin-react-jsx 5.2.1-next.3 → 5.2.2-beta.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.
Files changed (2) hide show
  1. package/dist/index.js +8 -8
  2. package/package.json +9 -9
package/dist/index.js CHANGED
@@ -2,8 +2,8 @@ import { DEFAULT_ESLINT_REACT_SETTINGS } from "@eslint-react/shared";
2
2
  import { merge } from "@eslint-react/eslint";
3
3
  import { JsxEmit, findAttribute, getChildren, getElementFullType, getJsxConfig, hasAnyAttribute, hasChildren, isFragmentElement, isHostElement, isWhitespaceText } from "@eslint-react/jsx";
4
4
  import { AST_NODE_TYPES } from "@typescript-eslint/types";
5
- import * as ast from "@eslint-react/ast";
6
5
  import { ESLintUtils } from "@typescript-eslint/utils";
6
+ import { Check, isOneOf } from "@eslint-react/ast";
7
7
 
8
8
  //#region \0rolldown/runtime.js
9
9
  var __defProp = Object.defineProperty;
@@ -24,7 +24,7 @@ var __exportAll = (all, no_symbols) => {
24
24
  //#endregion
25
25
  //#region package.json
26
26
  var name$2 = "eslint-plugin-react-jsx";
27
- var version = "5.2.1-next.3";
27
+ var version = "5.2.2-beta.0";
28
28
 
29
29
  //#endregion
30
30
  //#region src/rules/no-children-prop-with-children/lib.ts
@@ -150,7 +150,7 @@ function getChildrenPropText(context, prop) {
150
150
  const { expression } = value;
151
151
  if (expression.type === AST_NODE_TYPES.JSXEmptyExpression) return null;
152
152
  const exprText = sourceCode.getText(expression);
153
- if (ast.isJSXElementLike(expression)) return exprText;
153
+ if (Check.isJSXLike(expression)) return exprText;
154
154
  return `{${exprText}}`;
155
155
  }
156
156
  return null;
@@ -235,11 +235,11 @@ var no_comment_textnodes_default = createRule({
235
235
  });
236
236
  function create$5(context) {
237
237
  function hasCommentLike(node) {
238
- if (ast.isOneOf([AST_NODE_TYPES.JSXAttribute, AST_NODE_TYPES.JSXExpressionContainer])(node.parent)) return false;
238
+ if (isOneOf([AST_NODE_TYPES.JSXAttribute, AST_NODE_TYPES.JSXExpressionContainer])(node.parent)) return false;
239
239
  return /^\s*\/(?:\/|\*)/mu.test(context.sourceCode.getText(node));
240
240
  }
241
241
  const visitorFunction = (node) => {
242
- if (!ast.isJSXElementLike(node.parent)) return;
242
+ if (!Check.isJSXLike(node.parent)) return;
243
243
  if (!hasCommentLike(node)) return;
244
244
  context.report({
245
245
  messageId: "default",
@@ -366,7 +366,7 @@ function hasLeakedSemicolon(text) {
366
366
  }
367
367
  function create$2(context) {
368
368
  const visitorFunction = (node) => {
369
- if (!ast.isJSXElementLike(node.parent)) return;
369
+ if (!Check.isJSXLike(node.parent)) return;
370
370
  if (!hasLeakedSemicolon(context.sourceCode.getText(node))) return;
371
371
  context.report({
372
372
  messageId: "default",
@@ -487,7 +487,7 @@ function create(context, [option]) {
487
487
  */
488
488
  function isContentUseless(node) {
489
489
  if (node.children.length === 0) return !allowEmptyFragment;
490
- const insideJsx = ast.isJSXElementLike(node.parent);
490
+ const insideJsx = Check.isJSXLike(node.parent);
491
491
  if (!allowExpressions) {
492
492
  if (insideJsx) return true;
493
493
  if (node.children.length === 1) return true;
@@ -506,7 +506,7 @@ function create(context, [option]) {
506
506
  * @param node The fragment node to check.
507
507
  */
508
508
  function isSafeToFix(node) {
509
- if (ast.isJSXElementLike(node.parent)) return isHostElement(node.parent);
509
+ if (Check.isJSXLike(node.parent)) return isHostElement(node.parent);
510
510
  if (node.children.length === 0) return false;
511
511
  return !node.children.some((child) => {
512
512
  if (child.type === AST_NODE_TYPES.JSXExpressionContainer) return true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-react-jsx",
3
- "version": "5.2.1-next.3",
3
+ "version": "5.2.2-beta.0",
4
4
  "description": "ESLint React's ESLint plugin for React Flavored JSX rules.",
5
5
  "keywords": [
6
6
  "react",
@@ -43,20 +43,20 @@
43
43
  "@typescript-eslint/utils": "^8.58.1",
44
44
  "compare-versions": "^6.1.1",
45
45
  "ts-pattern": "^5.9.0",
46
- "@eslint-react/ast": "5.2.1-next.3",
47
- "@eslint-react/core": "5.2.1-next.3",
48
- "@eslint-react/eslint": "5.2.1-next.3",
49
- "@eslint-react/jsx": "5.2.1-next.3",
50
- "@eslint-react/var": "5.2.1-next.3",
51
- "@eslint-react/shared": "5.2.1-next.3"
46
+ "@eslint-react/ast": "5.2.2-beta.0",
47
+ "@eslint-react/core": "5.2.2-beta.0",
48
+ "@eslint-react/eslint": "5.2.2-beta.0",
49
+ "@eslint-react/jsx": "5.2.2-beta.0",
50
+ "@eslint-react/shared": "5.2.2-beta.0",
51
+ "@eslint-react/var": "5.2.2-beta.0"
52
52
  },
53
53
  "devDependencies": {
54
54
  "@types/react": "^19.2.14",
55
55
  "@types/react-dom": "^19.2.3",
56
56
  "eslint": "^10.2.0",
57
57
  "tsdown": "^0.21.7",
58
- "@local/configs": "0.0.0",
59
- "@local/eff": "3.0.0-beta.72"
58
+ "@local/eff": "3.0.0-beta.72",
59
+ "@local/configs": "0.0.0"
60
60
  },
61
61
  "peerDependencies": {
62
62
  "eslint": "^10.2.0",