eslint-plugin-react-jsx 5.27.4 → 5.28.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.
Files changed (2) hide show
  1. package/dist/index.js +2 -2
  2. package/package.json +7 -7
package/dist/index.js CHANGED
@@ -20,7 +20,7 @@ var __exportAll = (all, no_symbols) => {
20
20
  //#endregion
21
21
  //#region package.json
22
22
  var name$2 = "eslint-plugin-react-jsx";
23
- var version = "5.27.4";
23
+ var version = "5.28.1";
24
24
  //#endregion
25
25
  //#region src/utils/create-rule.ts
26
26
  function getDocsUrl(ruleName) {
@@ -492,7 +492,7 @@ function isContentUseless(node, options) {
492
492
  function isSafeToFix(node) {
493
493
  if (node.type === AST_NODE_TYPES.JSXElement && node.openingElement.attributes.some((attr) => attr.type === AST_NODE_TYPES.JSXSpreadAttribute)) return false;
494
494
  if (Check.isJSXElementOrFragment(node.parent)) return isHostElement(node.parent);
495
- if (node.children.length === 0) return false;
495
+ if (!node.children.some((child) => Check.isJSXElementOrFragment(child))) return false;
496
496
  return node.children.every((child) => {
497
497
  if (Check.isJSXElementOrFragment(child)) return true;
498
498
  return child.type === AST_NODE_TYPES.JSXText && isWhitespaceText(child);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-react-jsx",
3
- "version": "5.27.4",
3
+ "version": "5.28.1",
4
4
  "description": "ESLint React's ESLint plugin for React Flavored JSX rules.",
5
5
  "keywords": [
6
6
  "react",
@@ -37,11 +37,11 @@
37
37
  "dist"
38
38
  ],
39
39
  "dependencies": {
40
- "@eslint-react/ast": "5.27.4",
41
- "@eslint-react/core": "5.27.4",
42
- "@eslint-react/eslint": "5.27.4",
43
- "@eslint-react/jsx": "5.27.4",
44
- "@eslint-react/shared": "5.27.4",
40
+ "@eslint-react/ast": "5.28.1",
41
+ "@eslint-react/core": "5.28.1",
42
+ "@eslint-react/eslint": "5.28.1",
43
+ "@eslint-react/jsx": "5.28.1",
44
+ "@eslint-react/shared": "5.28.1",
45
45
  "@typescript-eslint/types": "^8.71.2",
46
46
  "@typescript-eslint/utils": "^8.71.2"
47
47
  },
@@ -54,7 +54,7 @@
54
54
  "@types/react": "^19.3.0",
55
55
  "@types/react-dom": "^19.3.0",
56
56
  "dedent": "^1.7.2",
57
- "eslint": "^10.12.0",
57
+ "eslint": "^10.13.0",
58
58
  "tsdown": "^0.23.1",
59
59
  "typescript": "6.0.3"
60
60
  },