forked from cloudflare/cloudflare-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.prettierrc.mjs
More file actions
30 lines (30 loc) · 740 Bytes
/
.prettierrc.mjs
File metadata and controls
30 lines (30 loc) · 740 Bytes
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
// @ts-check
/** @type {import("prettier").Config} */
export default {
plugins: [
"prettier-plugin-astro",
"prettier-plugin-tailwindcss",
"./plugins/prettier-plugin-cloudflare-docs/index.mjs",
],
useTabs: true,
overrides: [
{
files: "*.astro",
options: {
parser: "astro",
},
},
// Custom plugin that prevents prettier from reformatting specific
// MDX components. Listed elements are preserved verbatim.
// May become unnecessary once prettier adds MDX v3 support:
// https://github.com/prettier/prettier/issues/12209
{
files: "*.mdx",
options: {
parser: "mdx-cloudflare-docs",
mdxPreserveElements:
"code,GlossaryTooltip,Steps,Tabs,TabItem,FileTree,WranglerConfig",
},
},
],
};