Skip to content

Commit

Permalink
Upgraded eslint-plugin-react
Browse files Browse the repository at this point in the history
 - from 7.28.0 to 7.29.4
 - added `iframe-missing-sandbox` rule
 - added `{warnOnDuplicates: true}` to 'jsx-key` rule
  • Loading branch information
burtek committed Mar 27, 2022
1 parent fb0f530 commit a15cc9e
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 25 deletions.
16 changes: 8 additions & 8 deletions eslint-config-react.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@ module.exports = {
rules: {
'react/button-has-type': 'warn',
'react/display-name': 'error',
// needs eslint-plugin-react above 7.28.0
// see https://github.com/yannickcr/eslint-plugin-react/blob/master/CHANGELOG.md
// 'react/hook-use-state': 'error',
'react/hook-use-state': 'error',
'react/no-access-state-in-setstate': 'error',
'react/no-array-index-key': 'error',
'react/no-children-prop': 'error',
Expand Down Expand Up @@ -85,6 +83,7 @@ module.exports = {
{
files: ['*.jsx', '*.tsx'],
rules: {
'react/iframe-missing-sandbox': 'error',
'react/jsx-boolean-value': 'error',
'react/jsx-child-element-spacing': 'error',
'react/jsx-closing-bracket-location': ['error', 'tag-aligned'],
Expand Down Expand Up @@ -113,12 +112,13 @@ module.exports = {
'react/jsx-indent-props': 'error',
'react/jsx-key': ['error', {
'checkFragmentShorthand': true,
'checkKeyMustBeforeSpread': true
'checkKeyMustBeforeSpread': true,
'warnOnDuplicates': true
}],
'react/jsx-max-props-per-line': ["error", {
"maximum": {
"single": 2,
"multi": 1
'react/jsx-max-props-per-line': ['error', {
'maximum': {
'single': 2,
'multi': 1
}
}],
'react/jsx-no-bind': ['warn', {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"eslint-plugin-lodash": "^7.4.0",
"eslint-plugin-n": "^15.1.0",
"eslint-plugin-promise": "^6.0.0",
"eslint-plugin-react": "^7.28.0",
"eslint-plugin-react": "^7.29.4",
"eslint-plugin-react-hooks": "^4.3.0",
"eslint-plugin-security-node": "^1.1.1",
"jsonc-eslint-parser": "^2.1.0"
Expand Down
32 changes: 16 additions & 16 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -592,22 +592,22 @@ eslint-plugin-react-hooks@^4.3.0:
resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.3.0.tgz#318dbf312e06fab1c835a4abef00121751ac1172"
integrity sha512-XslZy0LnMn+84NEG9jSGR6eGqaZB3133L8xewQo3fQagbQuGt7a63gf+P1NGKZavEYEC3UXaWEAA/AqDkuN6xA==

eslint-plugin-react@^7.28.0:
version "7.28.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.28.0.tgz#8f3ff450677571a659ce76efc6d80b6a525adbdf"
integrity sha512-IOlFIRHzWfEQQKcAD4iyYDndHwTQiCMcJVJjxempf203jnNLUnW34AXLrV33+nEXoifJE2ZEGmcjKPL8957eSw==
eslint-plugin-react@^7.29.4:
version "7.29.4"
resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.29.4.tgz#4717de5227f55f3801a5fd51a16a4fa22b5914d2"
integrity sha512-CVCXajliVh509PcZYRFyu/BoUEz452+jtQJq2b3Bae4v3xBUWPLCmtmBM+ZinG4MzwmxJgJ2M5rMqhqLVn7MtQ==
dependencies:
array-includes "^3.1.4"
array.prototype.flatmap "^1.2.5"
doctrine "^2.1.0"
estraverse "^5.3.0"
jsx-ast-utils "^2.4.1 || ^3.0.0"
minimatch "^3.0.4"
minimatch "^3.1.2"
object.entries "^1.1.5"
object.fromentries "^2.0.5"
object.hasown "^1.1.0"
object.values "^1.1.5"
prop-types "^15.7.2"
prop-types "^15.8.1"
resolve "^2.0.0-next.3"
semver "^6.3.0"
string.prototype.matchall "^4.0.6"
Expand Down Expand Up @@ -1185,10 +1185,10 @@ micromatch@^4.0.4:
braces "^3.0.1"
picomatch "^2.2.3"

minimatch@^3.0.4:
version "3.0.4"
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==
minimatch@^3.0.4, minimatch@^3.1.2:
version "3.1.2"
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b"
integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==
dependencies:
brace-expansion "^1.1.7"

Expand Down Expand Up @@ -1369,14 +1369,14 @@ prelude-ls@^1.2.1:
resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396"
integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==

prop-types@^15.7.2:
version "15.7.2"
resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.7.2.tgz#52c41e75b8c87e72b9d9360e0206b99dcbffa6c5"
integrity sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==
prop-types@^15.8.1:
version "15.8.1"
resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5"
integrity sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==
dependencies:
loose-envify "^1.4.0"
object-assign "^4.1.1"
react-is "^16.8.1"
react-is "^16.13.1"

punycode@^2.1.0:
version "2.1.1"
Expand All @@ -1388,7 +1388,7 @@ queue-microtask@^1.2.2:
resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243"
integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==

react-is@^16.8.1:
react-is@^16.13.1:
version "16.13.1"
resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4"
integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==
Expand Down

0 comments on commit a15cc9e

Please sign in to comment.