forked from TalismanSociety/talisman
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.prettierrc.cjs
32 lines (27 loc) · 834 Bytes
/
.prettierrc.cjs
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
// Because both of these prettier plugins hijack the typescript parser,
// we can only use one of them at a time!
//
// If we try to use both, the second will overwrite the first.
//
// What follows is a workaround stolen from:
// https://github.com/tailwindlabs/prettier-plugin-tailwindcss/issues/31#issuecomment-1203264916
const pluginImportSort = require("prettier-plugin-import-sort")
const pluginTailwindcss = require("prettier-plugin-tailwindcss")
/** @type {import("prettier").Parser} */
const myParser = {
...pluginImportSort.parsers.typescript,
parse:
pluginTailwindcss.parsers.typescript.parse,
}
/** @type {import("prettier").Plugin} */
const myPlugin = {
parsers: {
typescript: myParser,
},
}
module.exports = {
plugins: [myPlugin],
printWidth: 100,
quoteProps: "consistent",
semi: false,
}