Skip to content

Commit

Permalink
chore: added new order rules
Browse files Browse the repository at this point in the history
  • Loading branch information
Onizuka-wl committed Oct 1, 2024
1 parent ffa7d2a commit 288335d
Showing 1 changed file with 21 additions and 5 deletions.
26 changes: 21 additions & 5 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -58,19 +58,35 @@ export default [
caseInsensitive: false,
},
// Enforce a specific import order
groups: ['external', 'builtin', 'parent', 'sibling', 'index'],
groups: ['external', 'builtin', 'parent', 'sibling', 'index', 'object', 'type', 'unknown'],
pathGroups: [
{
pattern: '@(react|react-native)',
pattern: 'react',
group: 'external',
position: 'before',
},
{
pattern: '@src/**',
group: 'internal',
pattern: 'next',
group: 'external',
position: 'before',
},
{
pattern: 'next/**',
group: 'external',
position: 'before',
},
{
pattern: '~/assets/**',
group: 'unknown',
position: 'after',
},
{
pattern: '~/**',
group: 'parent',
position: 'before',
},
],
pathGroupsExcludedImportTypes: ['internal', 'react'],
pathGroupsExcludedImportTypes: ['react'],
},
],
// Prettier plugin to apply formatting rules
Expand Down

0 comments on commit 288335d

Please sign in to comment.