@@ -2099,6 +2099,74 @@ ruleTester.run('order', rule, {
2099
2099
} ,
2100
2100
] ,
2101
2101
} ) ,
2102
+ test ( {
2103
+ code : `
2104
+ import path from 'path';
2105
+ import { namespace } from '@namespace';
2106
+ import { a } from 'a';
2107
+ import { b } from 'b';
2108
+ import { c } from 'c';
2109
+ import { d } from 'd';
2110
+ import { e } from 'e';
2111
+ import { f } from 'f';
2112
+ import { g } from 'g';
2113
+ import { h } from 'h';
2114
+ import { i } from 'i';
2115
+ import { j } from 'j';
2116
+ import { k } from 'k';` ,
2117
+ output : `
2118
+ import path from 'path';
2119
+
2120
+ import { namespace } from '@namespace';
2121
+
2122
+ import { a } from 'a';
2123
+
2124
+ import { b } from 'b';
2125
+
2126
+ import { c } from 'c';
2127
+
2128
+ import { d } from 'd';
2129
+
2130
+ import { e } from 'e';
2131
+
2132
+ import { f } from 'f';
2133
+
2134
+ import { g } from 'g';
2135
+
2136
+ import { h } from 'h';
2137
+
2138
+ import { i } from 'i';
2139
+
2140
+ import { j } from 'j';
2141
+ import { k } from 'k';` ,
2142
+ options : [
2143
+ {
2144
+ groups : [
2145
+ 'builtin' ,
2146
+ 'external' ,
2147
+ 'internal' ,
2148
+ ] ,
2149
+ pathGroups : [
2150
+ { pattern : '@namespace' , group : 'external' , position : 'after' } ,
2151
+ { pattern : 'a' , group : 'internal' , position : 'before' } ,
2152
+ { pattern : 'b' , group : 'internal' , position : 'before' } ,
2153
+ { pattern : 'c' , group : 'internal' , position : 'before' } ,
2154
+ { pattern : 'd' , group : 'internal' , position : 'before' } ,
2155
+ { pattern : 'e' , group : 'internal' , position : 'before' } ,
2156
+ { pattern : 'f' , group : 'internal' , position : 'before' } ,
2157
+ { pattern : 'g' , group : 'internal' , position : 'before' } ,
2158
+ { pattern : 'h' , group : 'internal' , position : 'before' } ,
2159
+ { pattern : 'i' , group : 'internal' , position : 'before' } ,
2160
+ ] ,
2161
+ 'newlines-between' : 'always' ,
2162
+ pathGroupsExcludedImportTypes : [ 'builtin' ] ,
2163
+ } ,
2164
+ ] ,
2165
+ settings : {
2166
+ 'import/internal-regex' : '^(a|b|c|d|e|f|g|h|i|j|k)(\\/|$)' ,
2167
+ } ,
2168
+ errors : new Array ( 11 ) . fill ( 'There should be at least one empty line between import groups' ) ,
2169
+ } ) ,
2102
2170
2103
2171
// reorder fix cannot cross non import or require
2104
2172
test ( withoutAutofixOutput ( {
0 commit comments