-
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathprettier.config.js
More file actions
37 lines (35 loc) · 1.18 KB
/
prettier.config.js
File metadata and controls
37 lines (35 loc) · 1.18 KB
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
33
34
35
36
37
module.exports = {
// DEFAULT CONFIGURATIONS
printWidth: 80,
semi: true,
tabWidth: 2,
trailingComma: "all",
// PLUG-IN CONFIGURATIONS
plugins: [
require.resolve("@trivago/prettier-plugin-sort-imports"),
require.resolve("prettier-plugin-jsdoc"),
],
importOrder: ["<THIRD_PARTY_MODULES>", "@api(.*)$", "^[./]"],
importOrderSeparation: true,
importOrderSortSpecifiers: true,
importOrderParserPlugins: ["decorators-legacy", "typescript", "jsx"],
overrides: [
// TypeScript: force the typescript parser (matches the previous top-level
// `parser: "typescript"` so `.ts`/`.tsx`/`.mts`/`.cts` keep formatting).
{
files: ["*.ts", "*.tsx", "*.mts", "*.cts"],
options: { parser: "typescript" },
},
// Markdown / MDX: Markdown soft-wraps on render, so manual mid-paragraph
// line breaks change nothing visible and only make diffs noisy. Keep prose
// on a single line. `embeddedLanguageFormatting: "off"` keeps fenced code
// blocks byte-identical (Prettier must not reformat ```ts etc.).
{
files: ["*.md", "*.mdx"],
options: {
proseWrap: "never",
embeddedLanguageFormatting: "off",
},
},
],
};