-
Notifications
You must be signed in to change notification settings - Fork 0
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
github-actions
merged 1 commit into
main
from
dependabot/npm_and_yarn/eslint-plugin-react-7.34.3
Jul 1, 2024
Merged
build(deps): bump eslint-plugin-react from 7.34.2 to 7.34.3 #1323
github-actions
merged 1 commit into
main
from
dependabot/npm_and_yarn/eslint-plugin-react-7.34.3
Jul 1, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
bot
added
dependencies
Pull requests that update a dependency file
javascript
Pull requests that update Javascript code
labels
Jul 1, 2024
Diff between eslint-plugin-react 7.34.2 and 7.34.3diff --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",
Command detailsnpm diff --diff=eslint-plugin-react@7.34.2 --diff=eslint-plugin-react@7.34.3 --diff-unified=2 See also the Reported by ybiquitous/npm-diff-action@v1.6.0 (Node.js 22.3.0 and npm 10.8.1) |
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
0 participants
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
... (truncated)
Changelog
Sourced from eslint-plugin-react's changelog.
Commits
cef8123
Update CHANGELOG and bump versioneb56061
[Deps] updatearray.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
withnever
must not all...a79beb3
[Fix]boolean-prop-naming
: avoid a crash with a spread prope27ef81
[Fix]prop-types
: null-check rootNode before calling getScopeDependabot 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)