Last active
June 20, 2024 12:59
-
-
Save ellemedit/cb752697ebfb881df774d8f7b08c9acc to your computer and use it in GitHub Desktop.
favorite prettier config
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @see https://prettier.io/docs/en/configuration.html | |
* @type {import("prettier").Config} | |
*/ | |
const config = { | |
trailingComma: "all", | |
printWidth: 120, | |
tabWidth: 2, | |
arrowParens: "always", | |
semi: false, | |
importOrder: [ | |
"(server-only|client-only)", | |
"(.*)\\.css$", | |
"<THIRD_PARTY_MODULES>", | |
"^@(.*)\\/.*$", | |
"^#data\\/.*$", | |
"^#styled-system\\/.*$", | |
"^#styles\\/.*$", | |
"^#components\\/.*$", | |
"^#hooks\\/.*$", | |
"^#(.*)\\/.*$", | |
"^[./]", | |
"^[../]", | |
], | |
importOrderSeparation: true, | |
importOrderSortSpecifiers: true, | |
plugins: ["@trivago/prettier-plugin-sort-imports"], | |
} | |
export default config |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment