Skip to content

Commit 9562336

Browse files
committed
test: use no-global-assign instead of camelcase in tests
1 parent 8384a38 commit 9562336

File tree

1 file changed

+29
-29
lines changed

1 file changed

+29
-29
lines changed

test/src/rules/no-invalid-config.spec.ts

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -223,12 +223,12 @@ ruleTester.run('InvalidRuleConfig', rule, {
223223
{
224224
files: ['*.tsx'],
225225
rules: {
226-
camelcase: ['error', { allow: ['child_process'] }],
226+
'no-global-assign': ['error', { exceptions: ['MyGlobal'] }],
227227
}
228228
}
229229
],
230230
rules: {
231-
camelcase: ['error', { allow: ['child_process'] }],
231+
'no-global-assign': ['error', { exceptions: ['MyGlobal'] }],
232232
}
233233
};
234234
`
@@ -258,16 +258,16 @@ ruleTester.run('InvalidRuleConfig', rule, {
258258
code: dedent`
259259
module.exports = {
260260
rules: {
261-
[\`camelcase\`]: ['error', { ignore: ['child_process'] }],
261+
[\`no-global-assign\`]: ['error', { allow: ['MyGlobal'] }],
262262
}
263263
};
264264
`,
265265
errors: [
266266
expectedError({
267267
type: ESLintErrorType.InvalidRuleConfig,
268-
ruleId: 'camelcase',
268+
ruleId: 'no-global-assign',
269269
reason:
270-
'\n\tValue {"ignore":["child_process"],"ignoreDestructuring":false,"ignoreImports":false} should NOT have additional properties.',
270+
'\n\tValue {"allow":["MyGlobal"]} should NOT have additional properties.',
271271
path: '',
272272
line: 3,
273273
column: 6
@@ -278,16 +278,16 @@ ruleTester.run('InvalidRuleConfig', rule, {
278278
code: dedent`
279279
module.exports = {
280280
rules: {
281-
camelcase: ['error', { ignore: ['child_process'] }],
281+
'no-global-assign': ['error', { allow: ['MyGlobal'] }],
282282
}
283283
};
284284
`,
285285
errors: [
286286
expectedError({
287287
type: ESLintErrorType.InvalidRuleConfig,
288-
ruleId: 'camelcase',
288+
ruleId: 'no-global-assign',
289289
reason:
290-
'\n\tValue {"ignore":["child_process"],"ignoreDestructuring":false,"ignoreImports":false} should NOT have additional properties.',
290+
'\n\tValue {"allow":["MyGlobal"]} should NOT have additional properties.',
291291
path: '',
292292
line: 3,
293293
column: 5
@@ -304,7 +304,7 @@ ruleTester.run('InvalidRuleConfig', rule, {
304304
{
305305
files: ['*'],
306306
rules: {
307-
camelcase: ['error', { ignore: ['child_process'] }]
307+
'no-global-assign': ['error', { allow: ['MyGlobal'] }],
308308
}
309309
}
310310
]
@@ -315,9 +315,9 @@ ruleTester.run('InvalidRuleConfig', rule, {
315315
errors: [
316316
expectedError({
317317
type: ESLintErrorType.InvalidRuleConfig,
318-
ruleId: 'camelcase',
318+
ruleId: 'no-global-assign',
319319
reason:
320-
'\n\tValue {"ignore":["child_process"],"ignoreDestructuring":false,"ignoreImports":false} should NOT have additional properties.',
320+
'\n\tValue {"allow":["MyGlobal"]} should NOT have additional properties.',
321321
path: '',
322322
line: 9,
323323
column: 13
@@ -331,30 +331,30 @@ ruleTester.run('InvalidRuleConfig', rule, {
331331
{
332332
files: ['*.tsx'],
333333
rules: {
334-
camelcase: ['error', { ignore: ['child_process'] }],
334+
'no-global-assign': ['error', { allow: ['MyGlobal'] }],
335335
}
336336
}
337337
],
338338
rules: {
339-
camelcase: ['error', { ignore: ['child_process'] }],
339+
'no-global-assign': ['error', { allow: ['MyGlobal'] }],
340340
}
341341
};
342342
`,
343343
errors: [
344344
expectedError({
345345
type: ESLintErrorType.InvalidRuleConfig,
346-
ruleId: 'camelcase',
346+
ruleId: 'no-global-assign',
347347
reason:
348-
'\n\tValue {"ignore":["child_process"],"ignoreDestructuring":false,"ignoreImports":false} should NOT have additional properties.',
348+
'\n\tValue {"allow":["MyGlobal"]} should NOT have additional properties.',
349349
path: '',
350350
line: 6,
351351
column: 9
352352
}),
353353
expectedError({
354354
type: ESLintErrorType.InvalidRuleConfig,
355-
ruleId: 'camelcase',
355+
ruleId: 'no-global-assign',
356356
reason:
357-
'\n\tValue {"ignore":["child_process"],"ignoreDestructuring":false,"ignoreImports":false} should NOT have additional properties.',
357+
'\n\tValue {"allow":["MyGlobal"]} should NOT have additional properties.',
358358
path: '#overrides[0]',
359359
line: 11,
360360
column: 5
@@ -368,30 +368,30 @@ ruleTester.run('InvalidRuleConfig', rule, {
368368
{
369369
files: ['*.tsx'],
370370
rules: {
371-
camelcase: ['error', { ignore: ['child_process'] }],
371+
'no-global-assign': ['error', { allow: ['MyGlobal'] }],
372372
}
373373
}
374374
],
375375
rules: {
376-
camelcase: ['error', { allow: ['child_process'] }],
376+
'no-global-assign': ['error', { exceptions: ['MyGlobal'] }],
377377
}
378378
};
379379
`,
380380
errors: [
381381
expectedError({
382382
type: ESLintErrorType.InvalidRuleConfig,
383-
ruleId: 'camelcase',
383+
ruleId: 'no-global-assign',
384384
reason:
385-
'\n\tValue {"ignore":["child_process"],"ignoreDestructuring":false,"ignoreImports":false} should NOT have additional properties.',
385+
'\n\tValue {"allow":["MyGlobal"]} should NOT have additional properties.',
386386
path: '',
387387
line: 6,
388388
column: 9
389389
}),
390390
expectedError({
391391
type: ESLintErrorType.InvalidRuleConfig,
392-
ruleId: 'camelcase',
392+
ruleId: 'no-global-assign',
393393
reason:
394-
'\n\tValue {"ignore":["child_process"],"ignoreDestructuring":false,"ignoreImports":false} should NOT have additional properties.',
394+
'\n\tValue {"allow":["MyGlobal"]} should NOT have additional properties.',
395395
path: '#overrides[0]',
396396
line: 11,
397397
column: 5
@@ -405,30 +405,30 @@ ruleTester.run('InvalidRuleConfig', rule, {
405405
{
406406
files: ['*.tsx'],
407407
rules: {
408-
camelcase: ['error', { allow: ['child_process'] }],
408+
'no-global-assign': ['error', { exceptions: ['MyGlobal'] }],
409409
}
410410
}
411411
],
412412
rules: {
413-
camelcase: ['error', { ignore: ['child_process'] }],
413+
'no-global-assign': ['error', { allow: ['MyGlobal'] }],
414414
}
415415
};
416416
`,
417417
errors: [
418418
expectedError({
419419
type: ESLintErrorType.InvalidRuleConfig,
420-
ruleId: 'camelcase',
420+
ruleId: 'no-global-assign',
421421
reason:
422-
'\n\tValue {"ignore":["child_process"],"ignoreDestructuring":false,"ignoreImports":false} should NOT have additional properties.',
422+
'\n\tValue {"allow":["MyGlobal"]} should NOT have additional properties.',
423423
path: '',
424424
line: 6,
425425
column: 9
426426
}),
427427
expectedError({
428428
type: ESLintErrorType.InvalidRuleConfig,
429-
ruleId: 'camelcase',
429+
ruleId: 'no-global-assign',
430430
reason:
431-
'\n\tValue {"ignore":["child_process"],"ignoreDestructuring":false,"ignoreImports":false} should NOT have additional properties.',
431+
'\n\tValue {"allow":["MyGlobal"]} should NOT have additional properties.',
432432
path: '#overrides[0]',
433433
line: 11,
434434
column: 5

0 commit comments

Comments
 (0)