Skip to content

Commit

Permalink
Add test for local module grouping
Browse files Browse the repository at this point in the history
  • Loading branch information
stormwarning committed Dec 12, 2024
1 parent d3542f2 commit cdeccec
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/rules/order.test.ts
Original file line number Diff line number Diff line change
@@ -154,6 +154,24 @@ describe('order', () => {
errors: [{ messageId: 'needs-newline' }],
},

{
name: 'groups local modules together',
code: dedent`
import prettier from 'eslint-config-prettier'
import xoTypeScript from 'eslint-config-xo-typescript'
import etc from 'eslint-plugin-etc'
import stylistic from './stylistic.js'
`,
output: dedent`
import prettier from 'eslint-config-prettier'
import xoTypeScript from 'eslint-config-xo-typescript'
import etc from 'eslint-plugin-etc'
import stylistic from './stylistic.js'
`,
errors: [{ messageId: 'needs-newline' }],
},

{
name: 'sorts local paths by dot segments',
code: dedent`

0 comments on commit cdeccec

Please sign in to comment.