Skip to content

Instantly share code, notes, and snippets.

@ellemedit
Last active June 20, 2024 12:59
Show Gist options
  • Save ellemedit/cb752697ebfb881df774d8f7b08c9acc to your computer and use it in GitHub Desktop.
Save ellemedit/cb752697ebfb881df774d8f7b08c9acc to your computer and use it in GitHub Desktop.
favorite prettier config
/**
* @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