Skip to content

Commit

Permalink
Add @widen sorting
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Skelton committed Jan 25, 2022
1 parent 131d5b4 commit 4b10644
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/little-hornets-lick.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'eslint-config-widen': minor
---

Sort `@widen` imports and exports after dependencies.
25 changes: 25 additions & 0 deletions packages/eslint-config-widen/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,30 @@ export = {
destructuring: 'all',
},
],
'sort/exports': [
'warn',
{
groups: [
{ order: 6, type: 'default' },
{ order: 5, type: 'sourceless' },
{ order: 2, regex: '^@widen\\/' },
{ order: 4, regex: '^\\.+\\/' },
{ order: 1, type: 'dependency' },
{ order: 3, type: 'other' },
],
},
],
'sort/imports': [
'warn',
{
groups: [
{ order: 1, type: 'side-effect' },
{ order: 3, regex: '^@widen\\/' },
{ order: 4, regex: '^\\.+\\/' },
{ order: 2, type: 'dependency' },
{ order: 5, type: 'other' },
],
},
],
},
}

0 comments on commit 4b10644

Please sign in to comment.