@@ -2280,6 +2280,8 @@ ruleTester.run('order', rule, {
2280
2280
} ,
2281
2281
] ,
2282
2282
} ) ,
2283
+
2284
+ // pathGroups overflowing to previous/next groups
2283
2285
test ( {
2284
2286
code : `
2285
2287
import path from 'path';
@@ -2349,6 +2351,47 @@ ruleTester.run('order', rule, {
2349
2351
errors : Array . from ( { length : 11 } , ( ) => 'There should be at least one empty line between import groups' ) ,
2350
2352
} ) ,
2351
2353
2354
+ // rankings that overflow to double-digit ranks
2355
+ test ( {
2356
+ code : `
2357
+ import external from 'external';
2358
+ import a from '@namespace/a';
2359
+ import b from '@namespace/b';
2360
+ import { parent } from '../../parent';
2361
+ import local from './local';
2362
+ import './side-effect';` ,
2363
+ output : `
2364
+ import external from 'external';
2365
+
2366
+ import a from '@namespace/a';
2367
+ import b from '@namespace/b';
2368
+
2369
+ import { parent } from '../../parent';
2370
+
2371
+ import local from './local';
2372
+ import './side-effect';` ,
2373
+ options : [
2374
+ {
2375
+ alphabetize : {
2376
+ order : 'asc' ,
2377
+ caseInsensitive : true ,
2378
+ } ,
2379
+ groups : [ 'type' , 'builtin' , 'external' , 'internal' , 'parent' , 'sibling' , 'index' , 'object' ] ,
2380
+ 'newlines-between' : 'always' ,
2381
+ pathGroups : [
2382
+ { pattern : '@namespace' , group : 'external' , position : 'after' } ,
2383
+ { pattern : '@namespace/**' , group : 'external' , position : 'after' } ,
2384
+ ] ,
2385
+ pathGroupsExcludedImportTypes : [ '@namespace' ] ,
2386
+ } ,
2387
+ ] ,
2388
+ errors : [
2389
+ 'There should be at least one empty line between import groups' ,
2390
+ 'There should be at least one empty line between import groups' ,
2391
+ 'There should be at least one empty line between import groups' ,
2392
+ ] ,
2393
+ } ) ,
2394
+
2352
2395
// reorder fix cannot cross non import or require
2353
2396
test ( withoutAutofixOutput ( {
2354
2397
code : `
0 commit comments