diff --git a/.changeset/spicy-berries-cough.md b/.changeset/spicy-berries-cough.md new file mode 100644 index 0000000..a677f9c --- /dev/null +++ b/.changeset/spicy-berries-cough.md @@ -0,0 +1,6 @@ +--- +'@commencis/eslint-config': patch +--- + +update import sort of common directories: +`config`, `types`, `interfaces`, `constants`, `helpers`, `utils`, `lib` diff --git a/packages/eslint-config/src/rules/importSortRules.ts b/packages/eslint-config/src/rules/importSortRules.ts index 9967045..06cb8f9 100644 --- a/packages/eslint-config/src/rules/importSortRules.ts +++ b/packages/eslint-config/src/rules/importSortRules.ts @@ -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 ['^\\.\\.(?!/?$)', '^\\.\\./?$'],