Skip to content

Commit 05edbda

Browse files
[SIEM] Add eslint-plugin-react-perf (#55960)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
1 parent 79ecc40 commit 05edbda

File tree

3 files changed

+18
-2
lines changed

3 files changed

+18
-2
lines changed

.eslintrc.js

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -643,6 +643,18 @@ module.exports = {
643643
// '@typescript-eslint/unbound-method': 'error',
644644
},
645645
},
646+
// {
647+
// // will introduced after the other warns are fixed
648+
// // typescript and javascript for front end react performance
649+
// files: ['x-pack/legacy/plugins/siem/public/**/!(*.test).{js,ts,tsx}'],
650+
// plugins: ['react-perf'],
651+
// rules: {
652+
// // 'react-perf/jsx-no-new-object-as-prop': 'error',
653+
// // 'react-perf/jsx-no-new-array-as-prop': 'error',
654+
// // 'react-perf/jsx-no-new-function-as-prop': 'error',
655+
// // 'react/jsx-no-bind': 'error',
656+
// },
657+
// },
646658
{
647659
// typescript and javascript for front and back end
648660
files: ['x-pack/legacy/plugins/siem/**/*.{js,ts,tsx}'],
@@ -747,8 +759,6 @@ module.exports = {
747759
// will introduced after the other warns are fixed
748760
// 'react/sort-comp': 'error',
749761
'react/void-dom-elements-no-children': 'error',
750-
// will introduced after the other warns are fixed
751-
// 'react/jsx-no-bind': 'error',
752762
'react/jsx-no-comment-textnodes': 'error',
753763
'react/jsx-no-literals': 'error',
754764
'react/jsx-no-target-blank': 'error',

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,7 @@
414414
"eslint-plugin-prettier": "^3.1.2",
415415
"eslint-plugin-react": "^7.17.0",
416416
"eslint-plugin-react-hooks": "^2.3.0",
417+
"eslint-plugin-react-perf": "^3.2.3",
417418
"exit-hook": "^2.2.0",
418419
"faker": "1.1.0",
419420
"fetch-mock": "^7.3.9",

yarn.lock

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12591,6 +12591,11 @@ eslint-plugin-react-hooks@^2.3.0:
1259112591
resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-2.3.0.tgz#53e073961f1f5ccf8dd19558036c1fac8c29d99a"
1259212592
integrity sha512-gLKCa52G4ee7uXzdLiorca7JIQZPPXRAQDXV83J4bUEeUuc5pIEyZYAZ45Xnxe5IuupxEqHS+hUhSLIimK1EMw==
1259312593

12594+
eslint-plugin-react-perf@^3.2.3:
12595+
version "3.2.3"
12596+
resolved "https://registry.yarnpkg.com/eslint-plugin-react-perf/-/eslint-plugin-react-perf-3.2.3.tgz#e28d42d3a1f7ec3c8976a94735d8e17e7d652a45"
12597+
integrity sha512-bMiPt7uywwS1Ly25n752NE3Ei0XBZ3igplTkZ8GPJKyZVVUd3cHgzILGeQW2HIeAkzQ9zwk9HM6EcYDipdFk3Q==
12598+
1259412599
eslint-plugin-react@^7.17.0:
1259512600
version "7.17.0"
1259612601
resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.17.0.tgz#a31b3e134b76046abe3cd278e7482bd35a1d12d7"

0 commit comments

Comments
 (0)