Skip to content

Commit

Permalink
Merge pull request #125 from Commencis/feature/import-sort-commons
Browse files Browse the repository at this point in the history
feat(eslint-config): update import sort for commons
  • Loading branch information
ymehmetcan authored Nov 6, 2024
2 parents ec0f1b0 + de2f30c commit 9130f01
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 6 additions & 0 deletions .changeset/spicy-berries-cough.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@commencis/eslint-config': patch
---

update import sort of common directories:
`config`, `types`, `interfaces`, `constants`, `helpers`, `utils`, `lib`
6 changes: 2 additions & 4 deletions packages/eslint-config/src/rules/importSortRules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,13 @@ export const importSortRules: Linter.RulesRecord = {
['^@commencis', '^@?\\w'],

// Internal common directories
[
'^@?/?(configs(s?)|types(s?)|constants(s?)|helpers(s?)|utils(s?)|lib(s?)|providers(s?))(/.*|$)',
],
['^@?/?(config|types|interfaces|constants|helpers|utils|lib)(/.*|$)'],

// Internal directories
['^@/'],

// Components
['((.*)/)?(layouts|pages|modules|features|components)/'],
['((.*)/)?(providers|layouts|pages|modules|features|components)/'],

// Relative parent imports: '../' comes last
['^\\.\\.(?!/?$)', '^\\.\\./?$'],
Expand Down

0 comments on commit 9130f01

Please sign in to comment.