Skip to content

Commit

Permalink
Configure formatter to sort imports
Browse files Browse the repository at this point in the history
  • Loading branch information
Julian702 committed Sep 23, 2023
1 parent d3cacff commit 7d943e3
Show file tree
Hide file tree
Showing 4 changed files with 105 additions and 3 deletions.
15 changes: 13 additions & 2 deletions frontend/.prettierrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
{
"tabWidth": 4,
"useTabs": true
"tabWidth": 4,
"useTabs": true,
"singleQuote": true,
"plugins": ["@trivago/prettier-plugin-sort-imports"],
"importOrder": [
"^@core/(.*)$",
"^@server/(.*)$",
"^@ui/(.*)$",
"^@/(.*)$",
"^[./]"
],
"importOrderSeparation": true,
"importOrderSortSpecifiers": true
}
87 changes: 87 additions & 0 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"@storybook/react": "^7.3.1",
"@storybook/testing-library": "^0.2.0",
"@storybook/theming": "^7.3.1",
"@trivago/prettier-plugin-sort-imports": "^4.2.0",
"@types/jwt-decode": "^3.1.0",
"@types/react-calendar-heatmap": "^1.6.3",
"autoprefixer": "^10.4.14",
Expand Down
5 changes: 4 additions & 1 deletion frontend/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"incremental": true
"incremental": true,
"paths": {
"@/*": ["./*"]
},
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
"exclude": ["node_modules"]
Expand Down

0 comments on commit 7d943e3

Please sign in to comment.