-
Notifications
You must be signed in to change notification settings - Fork 16
/
prettier.config.mjs
44 lines (37 loc) · 1.33 KB
/
prettier.config.mjs
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
38
39
40
41
42
43
44
// This is the configuration file for Prettier, the auto-formatter:
// https://prettier.io/docs/en/configuration.html
/** @type {import("prettier").Config} */
const config = {
plugins: [
"prettier-plugin-organize-imports", // Prettier does not format imports by default.
"prettier-plugin-packagejson", // Prettier does not format "package.json" by default.
// @template-customization-start
"@prettier/plugin-xml", // Prettier does not format XML files by default.
// @template-customization-end
],
overrides: [
// Allow proper formatting of JSONC files that have JSON file extensions.
{
files: ["**/.vscode/*.json", "**/tsconfig.json", "**/tsconfig.*.json"],
options: {
parser: "jsonc",
},
},
// @template-customization-start
// Allow proper formatting of XML files:
// https://github.com/prettier/plugin-xml#configuration
{
files: ["**/*.xml"],
options: {
// The default is "strict". However, whitespace cannot be reformatted unless this is set to
// "ignore".
xmlWhitespaceSensitivity: "ignore",
// Prettier's default value is 80, but this causes XML files in particular to become
// difficult to work with.
printWidth: 1_000_000,
},
},
// @template-customization-end
],
};
export default config;