Skip to content

Commit 13de4b5

Browse files
committed
fix(plugin-eslint): consider defaultOptions to ensure rule slugs from runner match
1 parent 03f5e61 commit 13de4b5

14 files changed

+157
-116
lines changed

packages/plugin-eslint/src/lib/__snapshots__/eslint-plugin.integration.test.ts.snap

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ exports[`eslintPlugin > should initialize ESLint plugin for React application 1`
66
{
77
"description": "ESLint rule **no-cond-assign**.",
88
"docsUrl": "https://eslint.org/docs/latest/rules/no-cond-assign",
9-
"slug": "no-cond-assign",
9+
"slug": "no-cond-assign-4da1eac06e945b1a",
1010
"title": "Disallow assignment operators in conditional expressions",
1111
},
1212
{
@@ -24,31 +24,31 @@ exports[`eslintPlugin > should initialize ESLint plugin for React application 1`
2424
{
2525
"description": "ESLint rule **no-invalid-regexp**.",
2626
"docsUrl": "https://eslint.org/docs/latest/rules/no-invalid-regexp",
27-
"slug": "no-invalid-regexp",
27+
"slug": "no-invalid-regexp-9b874a94de5d65c6",
2828
"title": "Disallow invalid regular expression strings in \`RegExp\` constructors",
2929
},
3030
{
3131
"description": "ESLint rule **no-undef**.",
3232
"docsUrl": "https://eslint.org/docs/latest/rules/no-undef",
33-
"slug": "no-undef",
33+
"slug": "no-undef-1c0a571cbd314966",
3434
"title": "Disallow the use of undeclared variables unless mentioned in \`/*global */\` comments",
3535
},
3636
{
3737
"description": "ESLint rule **no-unreachable-loop**.",
3838
"docsUrl": "https://eslint.org/docs/latest/rules/no-unreachable-loop",
39-
"slug": "no-unreachable-loop",
39+
"slug": "no-unreachable-loop-6bd5152d46f5cba7",
4040
"title": "Disallow loops with a body that allows only one iteration",
4141
},
4242
{
4343
"description": "ESLint rule **no-unsafe-negation**.",
4444
"docsUrl": "https://eslint.org/docs/latest/rules/no-unsafe-negation",
45-
"slug": "no-unsafe-negation",
45+
"slug": "no-unsafe-negation-1c3a548d96c1e95f",
4646
"title": "Disallow negating the left operand of relational operators",
4747
},
4848
{
4949
"description": "ESLint rule **no-unsafe-optional-chaining**.",
5050
"docsUrl": "https://eslint.org/docs/latest/rules/no-unsafe-optional-chaining",
51-
"slug": "no-unsafe-optional-chaining",
51+
"slug": "no-unsafe-optional-chaining-0724d742fbe97cb2",
5252
"title": "Disallow use of optional chaining in contexts where the \`undefined\` value is not allowed",
5353
},
5454
{
@@ -60,31 +60,31 @@ exports[`eslintPlugin > should initialize ESLint plugin for React application 1`
6060
{
6161
"description": "ESLint rule **use-isnan**.",
6262
"docsUrl": "https://eslint.org/docs/latest/rules/use-isnan",
63-
"slug": "use-isnan",
63+
"slug": "use-isnan-20b8ba68b5cc1ea7",
6464
"title": "Require calls to \`isNaN()\` when checking for \`NaN\`",
6565
},
6666
{
6767
"description": "ESLint rule **valid-typeof**.",
6868
"docsUrl": "https://eslint.org/docs/latest/rules/valid-typeof",
69-
"slug": "valid-typeof",
69+
"slug": "valid-typeof-19926c783be07085",
7070
"title": "Enforce comparing \`typeof\` expressions against valid strings",
7171
},
7272
{
7373
"description": "ESLint rule **arrow-body-style**.",
7474
"docsUrl": "https://eslint.org/docs/latest/rules/arrow-body-style",
75-
"slug": "arrow-body-style",
75+
"slug": "arrow-body-style-61b676e8783b0a34",
7676
"title": "Require braces around arrow function bodies",
7777
},
7878
{
7979
"description": "ESLint rule **camelcase**.",
8080
"docsUrl": "https://eslint.org/docs/latest/rules/camelcase",
81-
"slug": "camelcase",
81+
"slug": "camelcase-3568b92e56d6fcb0",
8282
"title": "Enforce camelcase naming convention",
8383
},
8484
{
8585
"description": "ESLint rule **curly**.",
8686
"docsUrl": "https://eslint.org/docs/latest/rules/curly",
87-
"slug": "curly",
87+
"slug": "curly-da196f7d88e0421b",
8888
"title": "Enforce consistent brace style for all control statements",
8989
},
9090
{
@@ -108,7 +108,7 @@ exports[`eslintPlugin > should initialize ESLint plugin for React application 1`
108108
{
109109
"description": "ESLint rule **no-shadow**.",
110110
"docsUrl": "https://eslint.org/docs/latest/rules/no-shadow",
111-
"slug": "no-shadow",
111+
"slug": "no-shadow-b9e07f46bb0b5444",
112112
"title": "Disallow variable declarations from shadowing variables declared in the outer scope",
113113
},
114114
{
@@ -126,13 +126,13 @@ exports[`eslintPlugin > should initialize ESLint plugin for React application 1`
126126
{
127127
"description": "ESLint rule **prefer-arrow-callback**.",
128128
"docsUrl": "https://eslint.org/docs/latest/rules/prefer-arrow-callback",
129-
"slug": "prefer-arrow-callback",
129+
"slug": "prefer-arrow-callback-81999cc2a4967394",
130130
"title": "Require using arrow functions for callbacks",
131131
},
132132
{
133133
"description": "ESLint rule **prefer-const**.",
134134
"docsUrl": "https://eslint.org/docs/latest/rules/prefer-const",
135-
"slug": "prefer-const",
135+
"slug": "prefer-const-519d0b1dc698e7d6",
136136
"title": "Require \`const\` declarations for variables that are never reassigned after declared",
137137
},
138138
{
@@ -144,7 +144,7 @@ exports[`eslintPlugin > should initialize ESLint plugin for React application 1`
144144
{
145145
"description": "ESLint rule **yoda**.",
146146
"docsUrl": "https://eslint.org/docs/latest/rules/yoda",
147-
"slug": "yoda",
147+
"slug": "yoda-e0d68df5f54f65ab",
148148
"title": "Require or disallow "Yoda" conditions",
149149
},
150150
{
@@ -197,7 +197,7 @@ exports[`eslintPlugin > should initialize ESLint plugin for React application 1`
197197
"description": "Code that either will cause an error or may cause confusing behavior. Developers should consider this a high priority to resolve.",
198198
"refs": [
199199
{
200-
"slug": "no-cond-assign",
200+
"slug": "no-cond-assign-4da1eac06e945b1a",
201201
"weight": 1,
202202
},
203203
{
@@ -209,35 +209,35 @@ exports[`eslintPlugin > should initialize ESLint plugin for React application 1`
209209
"weight": 1,
210210
},
211211
{
212-
"slug": "no-invalid-regexp",
212+
"slug": "no-invalid-regexp-9b874a94de5d65c6",
213213
"weight": 1,
214214
},
215215
{
216-
"slug": "no-undef",
216+
"slug": "no-undef-1c0a571cbd314966",
217217
"weight": 1,
218218
},
219219
{
220-
"slug": "no-unreachable-loop",
220+
"slug": "no-unreachable-loop-6bd5152d46f5cba7",
221221
"weight": 1,
222222
},
223223
{
224-
"slug": "no-unsafe-negation",
224+
"slug": "no-unsafe-negation-1c3a548d96c1e95f",
225225
"weight": 1,
226226
},
227227
{
228-
"slug": "no-unsafe-optional-chaining",
228+
"slug": "no-unsafe-optional-chaining-0724d742fbe97cb2",
229229
"weight": 1,
230230
},
231231
{
232232
"slug": "no-unused-vars",
233233
"weight": 1,
234234
},
235235
{
236-
"slug": "use-isnan",
236+
"slug": "use-isnan-20b8ba68b5cc1ea7",
237237
"weight": 1,
238238
},
239239
{
240-
"slug": "valid-typeof",
240+
"slug": "valid-typeof-19926c783be07085",
241241
"weight": 1,
242242
},
243243
{
@@ -252,15 +252,15 @@ exports[`eslintPlugin > should initialize ESLint plugin for React application 1`
252252
"description": "Something that could be done in a better way but no errors will occur if the code isn't changed.",
253253
"refs": [
254254
{
255-
"slug": "arrow-body-style",
255+
"slug": "arrow-body-style-61b676e8783b0a34",
256256
"weight": 1,
257257
},
258258
{
259-
"slug": "camelcase",
259+
"slug": "camelcase-3568b92e56d6fcb0",
260260
"weight": 1,
261261
},
262262
{
263-
"slug": "curly",
263+
"slug": "curly-da196f7d88e0421b",
264264
"weight": 1,
265265
},
266266
{
@@ -276,7 +276,7 @@ exports[`eslintPlugin > should initialize ESLint plugin for React application 1`
276276
"weight": 1,
277277
},
278278
{
279-
"slug": "no-shadow",
279+
"slug": "no-shadow-b9e07f46bb0b5444",
280280
"weight": 1,
281281
},
282282
{
@@ -288,19 +288,19 @@ exports[`eslintPlugin > should initialize ESLint plugin for React application 1`
288288
"weight": 1,
289289
},
290290
{
291-
"slug": "prefer-arrow-callback",
291+
"slug": "prefer-arrow-callback-81999cc2a4967394",
292292
"weight": 1,
293293
},
294294
{
295-
"slug": "prefer-const",
295+
"slug": "prefer-const-519d0b1dc698e7d6",
296296
"weight": 1,
297297
},
298298
{
299299
"slug": "prefer-object-spread",
300300
"weight": 1,
301301
},
302302
{
303-
"slug": "yoda",
303+
"slug": "yoda-e0d68df5f54f65ab",
304304
"weight": 1,
305305
},
306306
{

packages/plugin-eslint/src/lib/__snapshots__/runner.integration.test.ts.snap

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ exports[`executeRunner > should execute ESLint and create audit results for Reac
88
},
99
"displayValue": "passed",
1010
"score": 1,
11-
"slug": "no-cond-assign",
11+
"slug": "no-cond-assign-4da1eac06e945b1a",
1212
"value": 0,
1313
},
1414
{
@@ -35,7 +35,7 @@ exports[`executeRunner > should execute ESLint and create audit results for Reac
3535
},
3636
"displayValue": "passed",
3737
"score": 1,
38-
"slug": "no-invalid-regexp",
38+
"slug": "no-invalid-regexp-9b874a94de5d65c6",
3939
"value": 0,
4040
},
4141
{
@@ -44,7 +44,7 @@ exports[`executeRunner > should execute ESLint and create audit results for Reac
4444
},
4545
"displayValue": "passed",
4646
"score": 1,
47-
"slug": "no-undef",
47+
"slug": "no-undef-1c0a571cbd314966",
4848
"value": 0,
4949
},
5050
{
@@ -53,7 +53,7 @@ exports[`executeRunner > should execute ESLint and create audit results for Reac
5353
},
5454
"displayValue": "passed",
5555
"score": 1,
56-
"slug": "no-unreachable-loop",
56+
"slug": "no-unreachable-loop-6bd5152d46f5cba7",
5757
"value": 0,
5858
},
5959
{
@@ -62,7 +62,7 @@ exports[`executeRunner > should execute ESLint and create audit results for Reac
6262
},
6363
"displayValue": "passed",
6464
"score": 1,
65-
"slug": "no-unsafe-negation",
65+
"slug": "no-unsafe-negation-1c3a548d96c1e95f",
6666
"value": 0,
6767
},
6868
{
@@ -71,7 +71,7 @@ exports[`executeRunner > should execute ESLint and create audit results for Reac
7171
},
7272
"displayValue": "passed",
7373
"score": 1,
74-
"slug": "no-unsafe-optional-chaining",
74+
"slug": "no-unsafe-optional-chaining-0724d742fbe97cb2",
7575
"value": 0,
7676
},
7777
{
@@ -103,7 +103,7 @@ exports[`executeRunner > should execute ESLint and create audit results for Reac
103103
},
104104
"displayValue": "passed",
105105
"score": 1,
106-
"slug": "use-isnan",
106+
"slug": "use-isnan-20b8ba68b5cc1ea7",
107107
"value": 0,
108108
},
109109
{
@@ -112,7 +112,7 @@ exports[`executeRunner > should execute ESLint and create audit results for Reac
112112
},
113113
"displayValue": "passed",
114114
"score": 1,
115-
"slug": "valid-typeof",
115+
"slug": "valid-typeof-19926c783be07085",
116116
"value": 0,
117117
},
118118
{
@@ -135,7 +135,7 @@ exports[`executeRunner > should execute ESLint and create audit results for Reac
135135
},
136136
"displayValue": "1 warning",
137137
"score": 0,
138-
"slug": "arrow-body-style",
138+
"slug": "arrow-body-style-61b676e8783b0a34",
139139
"value": 1,
140140
},
141141
{
@@ -144,7 +144,7 @@ exports[`executeRunner > should execute ESLint and create audit results for Reac
144144
},
145145
"displayValue": "passed",
146146
"score": 1,
147-
"slug": "camelcase",
147+
"slug": "camelcase-3568b92e56d6fcb0",
148148
"value": 0,
149149
},
150150
{
@@ -153,7 +153,7 @@ exports[`executeRunner > should execute ESLint and create audit results for Reac
153153
},
154154
"displayValue": "passed",
155155
"score": 1,
156-
"slug": "curly",
156+
"slug": "curly-da196f7d88e0421b",
157157
"value": 0,
158158
},
159159
{
@@ -257,7 +257,7 @@ exports[`executeRunner > should execute ESLint and create audit results for Reac
257257
},
258258
"displayValue": "3 warnings",
259259
"score": 0,
260-
"slug": "no-shadow",
260+
"slug": "no-shadow-b9e07f46bb0b5444",
261261
"value": 3,
262262
},
263263
{
@@ -324,7 +324,7 @@ exports[`executeRunner > should execute ESLint and create audit results for Reac
324324
},
325325
"displayValue": "passed",
326326
"score": 1,
327-
"slug": "prefer-arrow-callback",
327+
"slug": "prefer-arrow-callback-81999cc2a4967394",
328328
"value": 0,
329329
},
330330
{
@@ -347,7 +347,7 @@ exports[`executeRunner > should execute ESLint and create audit results for Reac
347347
},
348348
"displayValue": "1 warning",
349349
"score": 0,
350-
"slug": "prefer-const",
350+
"slug": "prefer-const-519d0b1dc698e7d6",
351351
"value": 1,
352352
},
353353
{
@@ -365,7 +365,7 @@ exports[`executeRunner > should execute ESLint and create audit results for Reac
365365
},
366366
"displayValue": "passed",
367367
"score": 1,
368-
"slug": "yoda",
368+
"slug": "yoda-e0d68df5f54f65ab",
369369
"value": 0,
370370
},
371371
{

0 commit comments

Comments
 (0)