Skip to content

Commit 36b9a09

Browse files
committed
Deps: add plugin to sort imports
1 parent 38a1249 commit 36b9a09

File tree

3 files changed

+113
-85
lines changed

3 files changed

+113
-85
lines changed

.prettierrc.cjs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,14 @@ module.exports = {
44
semi: true,
55
singleQuote: true,
66
printWidth: 100,
7+
plugins: ['@trivago/prettier-plugin-sort-imports'],
8+
importOrder: [
9+
'<THIRD_PARTY_MODULES>', // External libraries
10+
'^@/.*', // Absolute aliases (e.g., `@/components`)
11+
'^\\.\\./.*', // Relative parent imports
12+
'^\\./.*', // Relative sibling imports
13+
],
14+
importOrderSeparation: true,
15+
importOrderSortSpecifiers: true,
16+
importOrderParserPlugins: ['typescript', 'decorators-legacy'],
717
};

package-lock.json

Lines changed: 102 additions & 85 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@
8888
"@noble/curves": "1.8.1",
8989
"@noble/hashes": "^1.3.2",
9090
"@playwright/test": "^1.48.0",
91+
"@trivago/prettier-plugin-sort-imports": "^5.2.2",
9192
"@types/jest": "^27.0.0",
9293
"@types/libsodium-wrappers-sumo": "^0.7.8",
9394
"@types/node": "^18.14.2",

0 commit comments

Comments
 (0)