Skip to content
This repository has been archived by the owner on Nov 5, 2023. It is now read-only.

Commit

Permalink
[style] Combine internal modules
Browse files Browse the repository at this point in the history
  • Loading branch information
Nico Dinata committed Mar 3, 2020
1 parent 812d2b3 commit 427736d
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,22 +72,18 @@ function style(api, file) {
{ separator: true },

// import ... from '../projectFoo' (non-resource)
// import ... from './projectFoo' (non-resource)
// import image from '**/foo.png'
{
match: and(isExternalModule, not(isResourceModule)),
sort: [dotSegmentCount, moduleName(naturally)],
sortNamedMembers: alias(unicode),
},
{ separator: true },

// import ... from './projectFoo' (non-resource)
{
match: and(isInternalModule, not(isResourceModule)),
sort: [dotSegmentCount, moduleName(naturally)],
sortNamedMembers: alias(unicode),
},
{ separator: true },

// import image from '**/foo.png'
{
match: isResourceModule,
sort: [dotSegmentCount, moduleName(naturally)],
Expand Down

0 comments on commit 427736d

Please sign in to comment.