@@ -223,12 +223,12 @@ ruleTester.run('InvalidRuleConfig', rule, {
223
223
{
224
224
files: ['*.tsx'],
225
225
rules: {
226
- camelcase : ['error', { allow : ['child_process '] }],
226
+ 'no-global-assign' : ['error', { exceptions : ['MyGlobal '] }],
227
227
}
228
228
}
229
229
],
230
230
rules: {
231
- camelcase : ['error', { allow : ['child_process '] }],
231
+ 'no-global-assign' : ['error', { exceptions : ['MyGlobal '] }],
232
232
}
233
233
};
234
234
`
@@ -258,16 +258,16 @@ ruleTester.run('InvalidRuleConfig', rule, {
258
258
code : dedent `
259
259
module.exports = {
260
260
rules: {
261
- [\`camelcase \`]: ['error', { ignore : ['child_process '] }],
261
+ [\`no-global-assign \`]: ['error', { allow : ['MyGlobal '] }],
262
262
}
263
263
};
264
264
` ,
265
265
errors : [
266
266
expectedError ( {
267
267
type : ESLintErrorType . InvalidRuleConfig ,
268
- ruleId : 'camelcase ' ,
268
+ ruleId : 'no-global-assign ' ,
269
269
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.' ,
271
271
path : '' ,
272
272
line : 3 ,
273
273
column : 6
@@ -278,16 +278,16 @@ ruleTester.run('InvalidRuleConfig', rule, {
278
278
code : dedent `
279
279
module.exports = {
280
280
rules: {
281
- camelcase : ['error', { ignore : ['child_process '] }],
281
+ 'no-global-assign' : ['error', { allow : ['MyGlobal '] }],
282
282
}
283
283
};
284
284
` ,
285
285
errors : [
286
286
expectedError ( {
287
287
type : ESLintErrorType . InvalidRuleConfig ,
288
- ruleId : 'camelcase ' ,
288
+ ruleId : 'no-global-assign ' ,
289
289
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.' ,
291
291
path : '' ,
292
292
line : 3 ,
293
293
column : 5
@@ -304,7 +304,7 @@ ruleTester.run('InvalidRuleConfig', rule, {
304
304
{
305
305
files: ['*'],
306
306
rules: {
307
- camelcase : ['error', { ignore : ['child_process '] }]
307
+ 'no-global-assign' : ['error', { allow : ['MyGlobal '] }],
308
308
}
309
309
}
310
310
]
@@ -315,9 +315,9 @@ ruleTester.run('InvalidRuleConfig', rule, {
315
315
errors : [
316
316
expectedError ( {
317
317
type : ESLintErrorType . InvalidRuleConfig ,
318
- ruleId : 'camelcase ' ,
318
+ ruleId : 'no-global-assign ' ,
319
319
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.' ,
321
321
path : '' ,
322
322
line : 9 ,
323
323
column : 13
@@ -331,30 +331,30 @@ ruleTester.run('InvalidRuleConfig', rule, {
331
331
{
332
332
files: ['*.tsx'],
333
333
rules: {
334
- camelcase : ['error', { ignore : ['child_process '] }],
334
+ 'no-global-assign' : ['error', { allow : ['MyGlobal '] }],
335
335
}
336
336
}
337
337
],
338
338
rules: {
339
- camelcase : ['error', { ignore : ['child_process '] }],
339
+ 'no-global-assign' : ['error', { allow : ['MyGlobal '] }],
340
340
}
341
341
};
342
342
` ,
343
343
errors : [
344
344
expectedError ( {
345
345
type : ESLintErrorType . InvalidRuleConfig ,
346
- ruleId : 'camelcase ' ,
346
+ ruleId : 'no-global-assign ' ,
347
347
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.' ,
349
349
path : '' ,
350
350
line : 6 ,
351
351
column : 9
352
352
} ) ,
353
353
expectedError ( {
354
354
type : ESLintErrorType . InvalidRuleConfig ,
355
- ruleId : 'camelcase ' ,
355
+ ruleId : 'no-global-assign ' ,
356
356
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.' ,
358
358
path : '#overrides[0]' ,
359
359
line : 11 ,
360
360
column : 5
@@ -368,30 +368,30 @@ ruleTester.run('InvalidRuleConfig', rule, {
368
368
{
369
369
files: ['*.tsx'],
370
370
rules: {
371
- camelcase : ['error', { ignore : ['child_process '] }],
371
+ 'no-global-assign' : ['error', { allow : ['MyGlobal '] }],
372
372
}
373
373
}
374
374
],
375
375
rules: {
376
- camelcase : ['error', { allow : ['child_process '] }],
376
+ 'no-global-assign' : ['error', { exceptions : ['MyGlobal '] }],
377
377
}
378
378
};
379
379
` ,
380
380
errors : [
381
381
expectedError ( {
382
382
type : ESLintErrorType . InvalidRuleConfig ,
383
- ruleId : 'camelcase ' ,
383
+ ruleId : 'no-global-assign ' ,
384
384
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.' ,
386
386
path : '' ,
387
387
line : 6 ,
388
388
column : 9
389
389
} ) ,
390
390
expectedError ( {
391
391
type : ESLintErrorType . InvalidRuleConfig ,
392
- ruleId : 'camelcase ' ,
392
+ ruleId : 'no-global-assign ' ,
393
393
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.' ,
395
395
path : '#overrides[0]' ,
396
396
line : 11 ,
397
397
column : 5
@@ -405,30 +405,30 @@ ruleTester.run('InvalidRuleConfig', rule, {
405
405
{
406
406
files: ['*.tsx'],
407
407
rules: {
408
- camelcase : ['error', { allow : ['child_process '] }],
408
+ 'no-global-assign' : ['error', { exceptions : ['MyGlobal '] }],
409
409
}
410
410
}
411
411
],
412
412
rules: {
413
- camelcase : ['error', { ignore : ['child_process '] }],
413
+ 'no-global-assign' : ['error', { allow : ['MyGlobal '] }],
414
414
}
415
415
};
416
416
` ,
417
417
errors : [
418
418
expectedError ( {
419
419
type : ESLintErrorType . InvalidRuleConfig ,
420
- ruleId : 'camelcase ' ,
420
+ ruleId : 'no-global-assign ' ,
421
421
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.' ,
423
423
path : '' ,
424
424
line : 6 ,
425
425
column : 9
426
426
} ) ,
427
427
expectedError ( {
428
428
type : ESLintErrorType . InvalidRuleConfig ,
429
- ruleId : 'camelcase ' ,
429
+ ruleId : 'no-global-assign ' ,
430
430
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.' ,
432
432
path : '#overrides[0]' ,
433
433
line : 11 ,
434
434
column : 5
0 commit comments