1/** @typedef {import("@ianvs/prettier-plugin-sort-imports").PluginConfig} SortImportsConfig*/
2/** @typedef {import("prettier").Config} PrettierConfig*/
3/** @typedef {{ tailwindConfig: string }} TailwindConfig*/
4
5/** @type { PrettierConfig | SortImportsConfig | TailwindConfig } */
6const config = {
7 arrowParens: "always",
8 printWidth: 80,
9 singleQuote: false,
10 jsxSingleQuote: false,
11 semi: true,
12 trailingComma: "all",
13 tabWidth: 2,
14 // pluginSearchDirs: false,
15 plugins: [
16 "@ianvs/prettier-plugin-sort-imports",
17 "prettier-plugin-tailwindcss",
18 ],
19 tailwindConfig: "./apps/amethyst/tailwind.config.js",
20 importOrder: [
21 "^(react/(.*)$)|^(react$)|^(react-native(.*)$)",
22 "^(next/(.*)$)|^(next$)",
23 "^(expo(.*)$)|^(expo$)",
24 "<THIRD_PARTY_MODULES>",
25 "",
26 "^@teal/(.*)$",
27 "",
28 "^~/utils/(.*)$",
29 "^~/components/(.*)$",
30 "^~/styles/(.*)$",
31 "^~/(.*)$",
32 "^[./]",
33 ],
34 importOrderParserPlugins: ["typescript", "jsx", "decorators-legacy"],
35 importOrderTypeScriptVersion: "5.0.4",
36};
37
38module.exports = config;