Skip to content

Commit cdeccec

Browse files
committed
Add test for local module grouping
1 parent d3542f2 commit cdeccec

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

tests/rules/order.test.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,24 @@ describe('order', () => {
154154
errors: [{ messageId: 'needs-newline' }],
155155
},
156156

157+
{
158+
name: 'groups local modules together',
159+
code: dedent`
160+
import prettier from 'eslint-config-prettier'
161+
import xoTypeScript from 'eslint-config-xo-typescript'
162+
import etc from 'eslint-plugin-etc'
163+
import stylistic from './stylistic.js'
164+
`,
165+
output: dedent`
166+
import prettier from 'eslint-config-prettier'
167+
import xoTypeScript from 'eslint-config-xo-typescript'
168+
import etc from 'eslint-plugin-etc'
169+
170+
import stylistic from './stylistic.js'
171+
`,
172+
errors: [{ messageId: 'needs-newline' }],
173+
},
174+
157175
{
158176
name: 'sorts local paths by dot segments',
159177
code: dedent`

0 commit comments

Comments
 (0)