-
Notifications
You must be signed in to change notification settings - Fork 0
/
.prettierrc.mjs
42 lines (40 loc) · 1.13 KB
/
.prettierrc.mjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/**
* STEPS TO INSTALL THIS PRETIER CONFIG
* Copy-paste this file into your project
* install the tailwind plugin:
* npm i -D prettier prettier-plugin-tailwindcss
* install the import-sort plugin:
* npm i -D @trivago/prettier-plugin-sort-imports
* DONE!
*
* Stuck?
* import-sort docs: https://www.npmjs.com/package/@trivago/prettier-plugin-sort-imports
* npm x tailwind articel: https://tailwindcss.com/blog/automatic-class-sorting-with-prettier
*
* Changed the file contents but it won't adhere the new config?
* Reload the window: CMD+SHIFT+P => then run "Reload Window"
*
* Common prettier commands:
* Format everything:
* npx prettier . --write
* Check if formatted:
* npx prettier . --check
*/
export default {
plugins: [
"@trivago/prettier-plugin-sort-imports",
"prettier-plugin-tailwindcss",
],
pluginSearchDirs: false,
importOrder: [
"^next(.*)$",
"^react(.*)$",
"^@/utils/(.*)$",
"^@/hooks/(.*)$",
"^@/component(.*)$",
"^@heroicons/(.*)$",
"<THIRD_PARTY_MODULES>",
],
importOrderSeparation: true,
importOrderSortSpecifiers: false,
};