Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(deps): bump eslint-plugin-react from 7.34.2 to 7.34.3 #1323

Merged

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Jul 1, 2024

⚠️ Dependabot is rebasing this PR ⚠️

Rebasing might not happen immediately, so don't worry if this takes some time.

Note: if you make any changes to this PR yourself, they will take precedence over the rebase.


Bumps eslint-plugin-react from 7.34.2 to 7.34.3.

Release notes

Sourced from eslint-plugin-react's releases.

v7.34.3

Fixed

  • [prop-types]: null-check rootNode before calling getScope (#3762[] @​crnhrv)
  • [boolean-prop-naming]: avoid a crash with a spread prop (#3733[] @​ljharb)
  • [jsx-boolean-value]: assumeUndefinedIsFalse with never must not allow explicit true value (#3757[] @​6uliver)
  • [no-object-type-as-default-prop]: enable rule for components with many parameters (#3768[] @​JulienR1)
  • [jsx-key]: incorrect behavior for checkKeyMustBeforeSpread with map callbacks (#3769[] @​akulsr0)

#1000: jsx-eslint/eslint-plugin-react#1000 #1002: jsx-eslint/eslint-plugin-react#1002 #1005: jsx-eslint/eslint-plugin-react#1005 #100: jsx-eslint/eslint-plugin-react#100 #1010: jsx-eslint/eslint-plugin-react#1010 #1013: jsx-eslint/eslint-plugin-react#1013 #1022: jsx-eslint/eslint-plugin-react#1022 #1029: jsx-eslint/eslint-plugin-react#1029 #102: jsx-eslint/eslint-plugin-react#102 #1034: jsx-eslint/eslint-plugin-react#1034 #1038: jsx-eslint/eslint-plugin-react#1038 #1041: jsx-eslint/eslint-plugin-react#1041 #1043: jsx-eslint/eslint-plugin-react#1043 #1046: jsx-eslint/eslint-plugin-react#1046 #1047: jsx-eslint/eslint-plugin-react#1047 #1050: jsx-eslint/eslint-plugin-react#1050 #1053: jsx-eslint/eslint-plugin-react#1053 #1057: jsx-eslint/eslint-plugin-react#1057 #105: jsx-eslint/eslint-plugin-react#105 #1061: jsx-eslint/eslint-plugin-react#1061 #1062: jsx-eslint/eslint-plugin-react#1062 #1070: jsx-eslint/eslint-plugin-react#1070 #1071: jsx-eslint/eslint-plugin-react#1071 #1073: jsx-eslint/eslint-plugin-react#1073 #1076: jsx-eslint/eslint-plugin-react#1076 #1079: jsx-eslint/eslint-plugin-react#1079 #1088: jsx-eslint/eslint-plugin-react#1088 #1098: jsx-eslint/eslint-plugin-react#1098 #1101: jsx-eslint/eslint-plugin-react#1101 #1103: jsx-eslint/eslint-plugin-react#1103 #110: jsx-eslint/eslint-plugin-react#110 #1116: jsx-eslint/eslint-plugin-react#1116 #1117: jsx-eslint/eslint-plugin-react#1117 #1119: jsx-eslint/eslint-plugin-react#1119 #1121: jsx-eslint/eslint-plugin-react#1121 #1122: jsx-eslint/eslint-plugin-react#1122 #1123: jsx-eslint/eslint-plugin-react#1123 #1130: jsx-eslint/eslint-plugin-react#1130 #1131: jsx-eslint/eslint-plugin-react#1131 #1132: jsx-eslint/eslint-plugin-react#1132 #1134: jsx-eslint/eslint-plugin-react#1134

... (truncated)

Changelog

Sourced from eslint-plugin-react's changelog.

7.34.3 - 2024.06.18

Fixed

  • [prop-types]: null-check rootNode before calling getScope (#3762[] @​crnhrv)
  • [boolean-prop-naming]: avoid a crash with a spread prop (#3733[] @​ljharb)
  • [jsx-boolean-value]: assumeUndefinedIsFalse with never must not allow explicit true value (#3757[] @​6uliver)
  • [no-object-type-as-default-prop]: enable rule for components with many parameters (#3768[] @​JulienR1)
  • [jsx-key]: incorrect behavior for checkKeyMustBeforeSpread with map callbacks (#3769[] @​akulsr0)

#3769: jsx-eslint/eslint-plugin-react#3769 #3768: jsx-eslint/eslint-plugin-react#3768 #3762: jsx-eslint/eslint-plugin-react#3762 #3757: jsx-eslint/eslint-plugin-react#3757 #3733: jsx-eslint/eslint-plugin-react#3733

Commits
  • cef8123 Update CHANGELOG and bump version
  • eb56061 [Deps] update array.prototype.tosorted
  • 7d16666 [Dev Deps] update @babel/core, @babel/eslint-parser, `@babel/plugin-synta...
  • 6dc7803 [Fix] jsx-key: incorrect behavior for checkKeyMustBeforeSpread with map cal...
  • 393bfa2 [Fix] no-object-type-as-default-prop: enable rule for components with many ...
  • a944aa5 [Fix] jsx-boolean-value: assumeUndefinedIsFalse with never must not all...
  • a79beb3 [Fix] boolean-prop-naming: avoid a crash with a spread prop
  • e27ef81 [Fix] prop-types: null-check rootNode before calling getScope
  • See full diff in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) from 7.34.2 to 7.34.3.
- [Release notes](https://github.com/jsx-eslint/eslint-plugin-react/releases)
- [Changelog](https://github.com/jsx-eslint/eslint-plugin-react/blob/master/CHANGELOG.md)
- [Commits](jsx-eslint/eslint-plugin-react@v7.34.2...v7.34.3)

---
updated-dependencies:
- dependency-name: eslint-plugin-react
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code labels Jul 1, 2024
@github-actions github-actions bot enabled auto-merge (squash) July 1, 2024 03:13
Copy link
Contributor

github-actions bot commented Jul 1, 2024

Diff between eslint-plugin-react 7.34.2 and 7.34.3
diff --git a/lib/rules/boolean-prop-naming.js b/lib/rules/boolean-prop-naming.js
index v7.34.2..v7.34.3 100644
--- a/lib/rules/boolean-prop-naming.js
+++ b/lib/rules/boolean-prop-naming.js
@@ -400,5 +400,5 @@
 
             if (propType) {
-              [].concat(propType).forEach((prop) => {
+              [].concat(propType).filter(Boolean).forEach((prop) => {
                 validatePropNaming(
                   component.node,
diff --git a/lib/rules/jsx-boolean-value.js b/lib/rules/jsx-boolean-value.js
index v7.34.2..v7.34.3 100644
--- a/lib/rules/jsx-boolean-value.js
+++ b/lib/rules/jsx-boolean-value.js
@@ -133,5 +133,4 @@
         if (
           isNever(configuration, exceptions, propName)
-          && !configObject.assumeUndefinedIsFalse
           && value
           && value.type === 'JSXExpressionContainer'
diff --git a/lib/rules/jsx-key.js b/lib/rules/jsx-key.js
index v7.34.2..v7.34.3 100644
--- a/lib/rules/jsx-key.js
+++ b/lib/rules/jsx-key.js
@@ -74,9 +74,29 @@
     const fragmentPragma = pragmaUtil.getFragmentFromContext(context);
 
+    function isKeyAfterSpread(attributes) {
+      let hasFoundSpread = false;
+      return attributes.some((attribute) => {
+        if (attribute.type === 'JSXSpreadAttribute') {
+          hasFoundSpread = true;
+          return false;
+        }
+        if (attribute.type !== 'JSXAttribute') {
+          return false;
+        }
+        return hasFoundSpread && propName(attribute) === 'key';
+      });
+    }
+
     function checkIteratorElement(node) {
-      if (node.type === 'JSXElement' && !hasProp(node.openingElement.attributes, 'key')) {
-        report(context, messages.missingIterKey, 'missingIterKey', {
-          node,
-        });
+      if (node.type === 'JSXElement') {
+        if (!hasProp(node.openingElement.attributes, 'key')) {
+          report(context, messages.missingIterKey, 'missingIterKey', { node });
+        } else {
+          const attrs = node.openingElement.attributes;
+
+          if (checkKeyMustBeforeSpread && isKeyAfterSpread(attrs)) {
+            report(context, messages.keyBeforeSpread, 'keyBeforeSpread', { node });
+          }
+        }
       } else if (checkFragmentShorthand && node.type === 'JSXFragment') {
         report(context, messages.missingIterKeyUsePrag, 'missingIterKeyUsePrag', {
@@ -116,18 +136,4 @@
     }
 
-    function isKeyAfterSpread(attributes) {
-      let hasFoundSpread = false;
-      return attributes.some((attribute) => {
-        if (attribute.type === 'JSXSpreadAttribute') {
-          hasFoundSpread = true;
-          return false;
-        }
-        if (attribute.type !== 'JSXAttribute') {
-          return false;
-        }
-        return hasFoundSpread && propName(attribute) === 'key';
-      });
-    }
-
     /**
      * Checks if the given node is a function expression or arrow function,
diff --git a/lib/rules/no-object-type-as-default-prop.js b/lib/rules/no-object-type-as-default-prop.js
index v7.34.2..v7.34.3 100644
--- a/lib/rules/no-object-type-as-default-prop.js
+++ b/lib/rules/no-object-type-as-default-prop.js
@@ -31,5 +31,5 @@
   return (
     params != null
-    && params.length === 1
+    && params.length >= 1
     && params[0].type === 'ObjectPattern'
   );
diff --git a/lib/util/propTypes.js b/lib/util/propTypes.js
index v7.34.2..v7.34.3 100644
--- a/lib/util/propTypes.js
+++ b/lib/util/propTypes.js
@@ -373,5 +373,6 @@
   function resolveValueForIdentifierNode(node, rootNode, callback) {
     if (
-      node
+      rootNode
+      && node
       && node.type === 'Identifier'
     ) {
diff --git a/package.json b/package.json
index v7.34.2..v7.34.3 100644
--- a/package.json
+++ b/package.json
@@ -1,5 +1,5 @@
 {
   "name": "eslint-plugin-react",
-  "version": "7.34.2",
+  "version": "7.34.3",
   "author": "Yannick Croissant <yannick.croissant+npm@gmail.com>",
   "description": "React specific linting rules for ESLint",
@@ -30,5 +30,5 @@
     "array.prototype.flatmap": "^1.3.2",
     "array.prototype.toreversed": "^1.1.2",
-    "array.prototype.tosorted": "^1.1.3",
+    "array.prototype.tosorted": "^1.1.4",
     "doctrine": "^2.1.0",
     "es-iterator-helpers": "^1.0.19",
@@ -46,10 +46,10 @@
   },
   "devDependencies": {
-    "@babel/core": "^7.24.6",
-    "@babel/eslint-parser": "^7.24.6",
-    "@babel/plugin-syntax-decorators": "^7.24.6",
-    "@babel/plugin-syntax-do-expressions": "^7.24.6",
-    "@babel/plugin-syntax-function-bind": "^7.24.6",
-    "@babel/preset-react": "^7.24.6",
+    "@babel/core": "^7.24.7",
+    "@babel/eslint-parser": "^7.24.7",
+    "@babel/plugin-syntax-decorators": "^7.24.7",
+    "@babel/plugin-syntax-do-expressions": "^7.24.7",
+    "@babel/plugin-syntax-function-bind": "^7.24.7",
+    "@babel/preset-react": "^7.24.7",
     "@types/eslint": "=7.2.10",
     "@types/estree": "0.0.52",
@@ -60,9 +60,9 @@
     "eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8",
     "eslint-config-airbnb-base": "^15.0.0",
-    "eslint-doc-generator": "^1.7.0",
+    "eslint-doc-generator": "^1.7.1",
     "eslint-plugin-eslint-plugin": "^2.3.0 || ^3.5.3 || ^4.0.1 || ^5.0.5",
     "eslint-plugin-import": "^2.29.1",
     "eslint-remote-tester": "^3.0.1",
-    "eslint-remote-tester-repositories": "^1.0.1",
+    "eslint-remote-tester-repositories": "^2.0.0",
     "eslint-scope": "^3.7.3",
     "espree": "^3.5.4",
Size Files
801.4 KB → 801.6 KB (+227 B 🟡) 138 → 138 (±0 🟢)
Command details
npm diff --diff=eslint-plugin-react@7.34.2 --diff=eslint-plugin-react@7.34.3 --diff-unified=2

See also the npm diff document.

Reported by ybiquitous/npm-diff-action@v1.6.0 (Node.js 22.3.0 and npm 10.8.1)

@github-actions github-actions bot merged commit 220d8b8 into main Jul 1, 2024
7 checks passed
@github-actions github-actions bot deleted the dependabot/npm_and_yarn/eslint-plugin-react-7.34.3 branch July 1, 2024 03:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants