Skip to content

Commit 40f61a4

Browse files
committed
feat(plugin-eslint): set "passed" displayValue for ESLint audits
1 parent c8cdca3 commit 40f61a4

File tree

7 files changed

+246
-210
lines changed

7 files changed

+246
-210
lines changed

e2e/cli-e2e/tests/__snapshots__/collect.e2e.test.ts.snap

+37
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@ exports[`CLI collect > should run ESLint plugin and create report.json 1`] = `
199199
"details": {
200200
"issues": [],
201201
},
202+
"displayValue": "passed",
202203
"docsUrl": "https://eslint.org/docs/latest/rules/no-cond-assign",
203204
"score": 1,
204205
"slug": "no-cond-assign",
@@ -210,6 +211,7 @@ exports[`CLI collect > should run ESLint plugin and create report.json 1`] = `
210211
"details": {
211212
"issues": [],
212213
},
214+
"displayValue": "passed",
213215
"docsUrl": "https://eslint.org/docs/latest/rules/no-const-assign",
214216
"score": 1,
215217
"slug": "no-const-assign",
@@ -221,6 +223,7 @@ exports[`CLI collect > should run ESLint plugin and create report.json 1`] = `
221223
"details": {
222224
"issues": [],
223225
},
226+
"displayValue": "passed",
224227
"docsUrl": "https://eslint.org/docs/latest/rules/no-debugger",
225228
"score": 1,
226229
"slug": "no-debugger",
@@ -232,6 +235,7 @@ exports[`CLI collect > should run ESLint plugin and create report.json 1`] = `
232235
"details": {
233236
"issues": [],
234237
},
238+
"displayValue": "passed",
235239
"docsUrl": "https://eslint.org/docs/latest/rules/no-invalid-regexp",
236240
"score": 1,
237241
"slug": "no-invalid-regexp",
@@ -243,6 +247,7 @@ exports[`CLI collect > should run ESLint plugin and create report.json 1`] = `
243247
"details": {
244248
"issues": [],
245249
},
250+
"displayValue": "passed",
246251
"docsUrl": "https://eslint.org/docs/latest/rules/no-undef",
247252
"score": 1,
248253
"slug": "no-undef",
@@ -254,6 +259,7 @@ exports[`CLI collect > should run ESLint plugin and create report.json 1`] = `
254259
"details": {
255260
"issues": [],
256261
},
262+
"displayValue": "passed",
257263
"docsUrl": "https://eslint.org/docs/latest/rules/no-unreachable-loop",
258264
"score": 1,
259265
"slug": "no-unreachable-loop",
@@ -265,6 +271,7 @@ exports[`CLI collect > should run ESLint plugin and create report.json 1`] = `
265271
"details": {
266272
"issues": [],
267273
},
274+
"displayValue": "passed",
268275
"docsUrl": "https://eslint.org/docs/latest/rules/no-unsafe-negation",
269276
"score": 1,
270277
"slug": "no-unsafe-negation",
@@ -276,6 +283,7 @@ exports[`CLI collect > should run ESLint plugin and create report.json 1`] = `
276283
"details": {
277284
"issues": [],
278285
},
286+
"displayValue": "passed",
279287
"docsUrl": "https://eslint.org/docs/latest/rules/no-unsafe-optional-chaining",
280288
"score": 1,
281289
"slug": "no-unsafe-optional-chaining",
@@ -313,6 +321,7 @@ exports[`CLI collect > should run ESLint plugin and create report.json 1`] = `
313321
"details": {
314322
"issues": [],
315323
},
324+
"displayValue": "passed",
316325
"docsUrl": "https://eslint.org/docs/latest/rules/use-isnan",
317326
"score": 1,
318327
"slug": "use-isnan",
@@ -324,6 +333,7 @@ exports[`CLI collect > should run ESLint plugin and create report.json 1`] = `
324333
"details": {
325334
"issues": [],
326335
},
336+
"displayValue": "passed",
327337
"docsUrl": "https://eslint.org/docs/latest/rules/valid-typeof",
328338
"score": 1,
329339
"slug": "valid-typeof",
@@ -361,6 +371,7 @@ exports[`CLI collect > should run ESLint plugin and create report.json 1`] = `
361371
"details": {
362372
"issues": [],
363373
},
374+
"displayValue": "passed",
364375
"docsUrl": "https://eslint.org/docs/latest/rules/camelcase",
365376
"score": 1,
366377
"slug": "camelcase",
@@ -372,6 +383,7 @@ exports[`CLI collect > should run ESLint plugin and create report.json 1`] = `
372383
"details": {
373384
"issues": [],
374385
},
386+
"displayValue": "passed",
375387
"docsUrl": "https://eslint.org/docs/latest/rules/curly",
376388
"score": 1,
377389
"slug": "curly",
@@ -435,6 +447,7 @@ exports[`CLI collect > should run ESLint plugin and create report.json 1`] = `
435447
"details": {
436448
"issues": [],
437449
},
450+
"displayValue": "passed",
438451
"docsUrl": "https://eslint.org/docs/latest/rules/max-lines",
439452
"score": 1,
440453
"slug": "max-lines",
@@ -498,6 +511,7 @@ exports[`CLI collect > should run ESLint plugin and create report.json 1`] = `
498511
"details": {
499512
"issues": [],
500513
},
514+
"displayValue": "passed",
501515
"docsUrl": "https://eslint.org/docs/latest/rules/no-var",
502516
"score": 1,
503517
"slug": "no-var",
@@ -561,6 +575,7 @@ exports[`CLI collect > should run ESLint plugin and create report.json 1`] = `
561575
"details": {
562576
"issues": [],
563577
},
578+
"displayValue": "passed",
564579
"docsUrl": "https://eslint.org/docs/latest/rules/prefer-arrow-callback",
565580
"score": 1,
566581
"slug": "prefer-arrow-callback",
@@ -598,6 +613,7 @@ exports[`CLI collect > should run ESLint plugin and create report.json 1`] = `
598613
"details": {
599614
"issues": [],
600615
},
616+
"displayValue": "passed",
601617
"docsUrl": "https://eslint.org/docs/latest/rules/prefer-object-spread",
602618
"score": 1,
603619
"slug": "prefer-object-spread",
@@ -609,6 +625,7 @@ exports[`CLI collect > should run ESLint plugin and create report.json 1`] = `
609625
"details": {
610626
"issues": [],
611627
},
628+
"displayValue": "passed",
612629
"docsUrl": "https://eslint.org/docs/latest/rules/yoda",
613630
"score": 1,
614631
"slug": "yoda",
@@ -737,6 +754,7 @@ exports[`CLI collect > should run ESLint plugin and create report.json 1`] = `
737754
"details": {
738755
"issues": [],
739756
},
757+
"displayValue": "passed",
740758
"docsUrl": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/react-in-jsx-scope.md",
741759
"score": 1,
742760
"slug": "react-react-in-jsx-scope",
@@ -748,6 +766,7 @@ exports[`CLI collect > should run ESLint plugin and create report.json 1`] = `
748766
"details": {
749767
"issues": [],
750768
},
769+
"displayValue": "passed",
751770
"docsUrl": "https://reactjs.org/docs/hooks-rules.html",
752771
"score": 1,
753772
"slug": "react-hooks-rules-of-hooks",
@@ -798,6 +817,7 @@ exports[`CLI collect > should run ESLint plugin and create report.json 1`] = `
798817
"details": {
799818
"issues": [],
800819
},
820+
"displayValue": "passed",
801821
"docsUrl": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/display-name.md",
802822
"score": 1,
803823
"slug": "react-display-name",
@@ -809,6 +829,7 @@ exports[`CLI collect > should run ESLint plugin and create report.json 1`] = `
809829
"details": {
810830
"issues": [],
811831
},
832+
"displayValue": "passed",
812833
"docsUrl": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-no-comment-textnodes.md",
813834
"score": 1,
814835
"slug": "react-jsx-no-comment-textnodes",
@@ -820,6 +841,7 @@ exports[`CLI collect > should run ESLint plugin and create report.json 1`] = `
820841
"details": {
821842
"issues": [],
822843
},
844+
"displayValue": "passed",
823845
"docsUrl": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-no-duplicate-props.md",
824846
"score": 1,
825847
"slug": "react-jsx-no-duplicate-props",
@@ -831,6 +853,7 @@ exports[`CLI collect > should run ESLint plugin and create report.json 1`] = `
831853
"details": {
832854
"issues": [],
833855
},
856+
"displayValue": "passed",
834857
"docsUrl": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-no-target-blank.md",
835858
"score": 1,
836859
"slug": "react-jsx-no-target-blank",
@@ -842,6 +865,7 @@ exports[`CLI collect > should run ESLint plugin and create report.json 1`] = `
842865
"details": {
843866
"issues": [],
844867
},
868+
"displayValue": "passed",
845869
"docsUrl": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-no-undef.md",
846870
"score": 1,
847871
"slug": "react-jsx-no-undef",
@@ -853,6 +877,7 @@ exports[`CLI collect > should run ESLint plugin and create report.json 1`] = `
853877
"details": {
854878
"issues": [],
855879
},
880+
"displayValue": "passed",
856881
"docsUrl": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-uses-react.md",
857882
"score": 1,
858883
"slug": "react-jsx-uses-react",
@@ -864,6 +889,7 @@ exports[`CLI collect > should run ESLint plugin and create report.json 1`] = `
864889
"details": {
865890
"issues": [],
866891
},
892+
"displayValue": "passed",
867893
"docsUrl": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-uses-vars.md",
868894
"score": 1,
869895
"slug": "react-jsx-uses-vars",
@@ -875,6 +901,7 @@ exports[`CLI collect > should run ESLint plugin and create report.json 1`] = `
875901
"details": {
876902
"issues": [],
877903
},
904+
"displayValue": "passed",
878905
"docsUrl": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-children-prop.md",
879906
"score": 1,
880907
"slug": "react-no-children-prop",
@@ -886,6 +913,7 @@ exports[`CLI collect > should run ESLint plugin and create report.json 1`] = `
886913
"details": {
887914
"issues": [],
888915
},
916+
"displayValue": "passed",
889917
"docsUrl": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-danger-with-children.md",
890918
"score": 1,
891919
"slug": "react-no-danger-with-children",
@@ -897,6 +925,7 @@ exports[`CLI collect > should run ESLint plugin and create report.json 1`] = `
897925
"details": {
898926
"issues": [],
899927
},
928+
"displayValue": "passed",
900929
"docsUrl": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-deprecated.md",
901930
"score": 1,
902931
"slug": "react-no-deprecated",
@@ -908,6 +937,7 @@ exports[`CLI collect > should run ESLint plugin and create report.json 1`] = `
908937
"details": {
909938
"issues": [],
910939
},
940+
"displayValue": "passed",
911941
"docsUrl": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-direct-mutation-state.md",
912942
"score": 1,
913943
"slug": "react-no-direct-mutation-state",
@@ -919,6 +949,7 @@ exports[`CLI collect > should run ESLint plugin and create report.json 1`] = `
919949
"details": {
920950
"issues": [],
921951
},
952+
"displayValue": "passed",
922953
"docsUrl": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-find-dom-node.md",
923954
"score": 1,
924955
"slug": "react-no-find-dom-node",
@@ -930,6 +961,7 @@ exports[`CLI collect > should run ESLint plugin and create report.json 1`] = `
930961
"details": {
931962
"issues": [],
932963
},
964+
"displayValue": "passed",
933965
"docsUrl": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-is-mounted.md",
934966
"score": 1,
935967
"slug": "react-no-is-mounted",
@@ -941,6 +973,7 @@ exports[`CLI collect > should run ESLint plugin and create report.json 1`] = `
941973
"details": {
942974
"issues": [],
943975
},
976+
"displayValue": "passed",
944977
"docsUrl": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-render-return-value.md",
945978
"score": 1,
946979
"slug": "react-no-render-return-value",
@@ -952,6 +985,7 @@ exports[`CLI collect > should run ESLint plugin and create report.json 1`] = `
952985
"details": {
953986
"issues": [],
954987
},
988+
"displayValue": "passed",
955989
"docsUrl": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-string-refs.md",
956990
"score": 1,
957991
"slug": "react-no-string-refs",
@@ -963,6 +997,7 @@ exports[`CLI collect > should run ESLint plugin and create report.json 1`] = `
963997
"details": {
964998
"issues": [],
965999
},
1000+
"displayValue": "passed",
9661001
"docsUrl": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-unescaped-entities.md",
9671002
"score": 1,
9681003
"slug": "react-no-unescaped-entities",
@@ -974,6 +1009,7 @@ exports[`CLI collect > should run ESLint plugin and create report.json 1`] = `
9741009
"details": {
9751010
"issues": [],
9761011
},
1012+
"displayValue": "passed",
9771013
"docsUrl": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-unknown-property.md",
9781014
"score": 1,
9791015
"slug": "react-no-unknown-property",
@@ -985,6 +1021,7 @@ exports[`CLI collect > should run ESLint plugin and create report.json 1`] = `
9851021
"details": {
9861022
"issues": [],
9871023
},
1024+
"displayValue": "passed",
9881025
"docsUrl": "https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/require-render-return.md",
9891026
"score": 1,
9901027
"slug": "react-require-render-return",

0 commit comments

Comments
 (0)