46 lines
1.1 KiB
JavaScript
46 lines
1.1 KiB
JavaScript
/** @typedef {import("prettier").Config} PrettierConfig */
|
|
/** @typedef {import("prettier-plugin-tailwindcss").PluginOptions} TailwindConfig */
|
|
/** @typedef {import("@ianvs/prettier-plugin-sort-imports").PluginConfig} SortImportsConfig */
|
|
|
|
/** @type { PrettierConfig | SortImportsConfig | TailwindConfig } */
|
|
const config = {
|
|
plugins: [
|
|
"@ianvs/prettier-plugin-sort-imports",
|
|
"prettier-plugin-tailwindcss",
|
|
],
|
|
tailwindFunctions: ["cn", "cva"],
|
|
importOrder: [
|
|
"<TYPES>",
|
|
"^(react/(.*)$)|^(react$)|^(react-native(.*)$)",
|
|
"^(next/(.*)$)|^(next$)",
|
|
"^(expo(.*)$)|^(expo$)",
|
|
"<THIRD_PARTY_MODULES>",
|
|
"",
|
|
"<TYPES>^@acme",
|
|
"^@acme/(.*)$",
|
|
"",
|
|
"<TYPES>^[.|..|~]",
|
|
"^~/",
|
|
"^[../]",
|
|
"^[./]",
|
|
],
|
|
importOrderParserPlugins: ["typescript", "jsx", "decorators-legacy"],
|
|
importOrderTypeScriptVersion: "5.0.0",
|
|
overrides: [
|
|
{
|
|
files: "*.json.hbs",
|
|
options: {
|
|
parser: "json",
|
|
},
|
|
},
|
|
{
|
|
files: "*.ts.hbs",
|
|
options: {
|
|
parser: "babel",
|
|
},
|
|
},
|
|
],
|
|
};
|
|
|
|
export default config;
|