oxfmt 0.53.0 → 0.54.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/configuration_schema.json +96 -96
- package/dist/{apis-DOCQy_NG.js → apis-CngUzqDq.js} +3 -3
- package/dist/{chunk-DSjvVL_1-CrjveNIv.js → chunk-DSjvVL_1-BUO3FyMh.js} +1 -1
- package/dist/cli-worker.js +1 -1
- package/dist/cli.js +13 -22
- package/dist/{dist-Cb-CB0nt.js → dist-ZI7w_ao-.js} +4 -4
- package/dist/index.d.ts +48 -4
- package/dist/index.js +11 -11
- package/dist/{jiti-Bb1dT6Cw-bfahw2Ut.js → jiti-Bb1dT6Cw-DPQUX1DC.js} +2 -2
- package/dist/{bindings-ChKdN0o7.js → napi-callbacks-C8y3J_xb.js} +56 -27
- package/dist/{plugin-DOvWpprN.js → plugin-CHUKsFCg.js} +21 -3
- package/dist/{sorter-BZkvDMjt-X7PZZf-k.js → sorter-BZkvDMjt-DCuU-7CM.js} +7 -7
- package/dist/{sorter-o4mwRTof.js → sorter-CharfNIQ.js} +1 -1
- package/dist/{v3-D-mr2VVh-BYLPgMY0.js → v3-D-mr2VVh-C7AdPwxy.js} +4 -4
- package/dist/{v4-C-HWEQJm-DbK_mluY.js → v4-C-HWEQJm-CJKqx13d.js} +4 -4
- package/package.json +20 -20
package/README.md
CHANGED
|
@@ -56,3 +56,5 @@ Run
|
|
|
56
56
|
|
|
57
57
|
- `npx --yes oxfmt@latest` in your JavaScript / TypeScript codebase and see it complete in milliseconds. No configurations are required.
|
|
58
58
|
- `npx oxfmt@latest --help` for quick usage instructions.
|
|
59
|
+
- `npx skills add https://github.com/oxc-project/oxc --skill migrate-oxfmt` to install the [`migrate-oxfmt`](https://skills.sh/oxc-project/oxc/migrate-oxfmt) skill, then run `/migrate-oxfmt` to migrate from Prettier or Biome.
|
|
60
|
+
- See also [migrate from Prettier](https://oxc.rs/docs/guide/usage/formatter/migrate-from-prettier.html).
|
|
@@ -5,50 +5,50 @@
|
|
|
5
5
|
"type": "object",
|
|
6
6
|
"properties": {
|
|
7
7
|
"arrowParens": {
|
|
8
|
-
"description": "Include parentheses around a sole arrow function parameter.\n\n- Default: `\"always\"`",
|
|
8
|
+
"description": "Include parentheses around a sole arrow function parameter.\n\n- Languages: JS, JSX, TS, TSX\n- Default: `\"always\"`",
|
|
9
9
|
"allOf": [
|
|
10
10
|
{
|
|
11
11
|
"$ref": "#/definitions/ArrowParensConfig"
|
|
12
12
|
}
|
|
13
13
|
],
|
|
14
|
-
"markdownDescription": "Include parentheses around a sole arrow function parameter.\n\n- Default: `\"always\"`"
|
|
14
|
+
"markdownDescription": "Include parentheses around a sole arrow function parameter.\n\n- Languages: JS, JSX, TS, TSX\n- Default: `\"always\"`"
|
|
15
15
|
},
|
|
16
16
|
"bracketSameLine": {
|
|
17
|
-
"description": "Put the `>` of a multi-line HTML (HTML, JSX, Vue, Angular) element at the end of the last line,\ninstead of being alone on the next line (does not apply to self closing elements).\n\n- Default: `false`",
|
|
17
|
+
"description": "Put the `>` of a multi-line HTML (HTML, JSX, Vue, Angular) element at the end of the last line,\ninstead of being alone on the next line (does not apply to self closing elements).\n\n- Languages: JSX, TSX, HTML, Angular, Vue, MJML, Svelte\n- Default: `false`",
|
|
18
18
|
"type": "boolean",
|
|
19
|
-
"markdownDescription": "Put the `>` of a multi-line HTML (HTML, JSX, Vue, Angular) element at the end of the last line,\ninstead of being alone on the next line (does not apply to self closing elements).\n\n- Default: `false`"
|
|
19
|
+
"markdownDescription": "Put the `>` of a multi-line HTML (HTML, JSX, Vue, Angular) element at the end of the last line,\ninstead of being alone on the next line (does not apply to self closing elements).\n\n- Languages: JSX, TSX, HTML, Angular, Vue, MJML, Svelte\n- Default: `false`"
|
|
20
20
|
},
|
|
21
21
|
"bracketSpacing": {
|
|
22
|
-
"description": "Print spaces between brackets in object literals.\n\n- Default: `true`",
|
|
22
|
+
"description": "Print spaces between brackets in object literals.\n\n- Languages: JS, JSX, TS, TSX, JSON, JSONC, JSON5, GraphQL, YAML\n- Default: `true`",
|
|
23
23
|
"type": "boolean",
|
|
24
|
-
"markdownDescription": "Print spaces between brackets in object literals.\n\n- Default: `true`"
|
|
24
|
+
"markdownDescription": "Print spaces between brackets in object literals.\n\n- Languages: JS, JSX, TS, TSX, JSON, JSONC, JSON5, GraphQL, YAML\n- Default: `true`"
|
|
25
25
|
},
|
|
26
26
|
"embeddedLanguageFormatting": {
|
|
27
|
-
"description": "Control whether to format embedded parts (For example, CSS-in-JS, or JS-in-Vue, etc.) in the file.\n\
|
|
27
|
+
"description": "Control whether to format embedded parts (For example, CSS-in-JS, or JS-in-Vue, etc.) in the file.\n\n- Languages: JS, JSX, TS, TSX, HTML, Vue, Angular, Svelte, Markdown, MDX (languages with embedded code)\n- Default: `\"auto\"`",
|
|
28
28
|
"allOf": [
|
|
29
29
|
{
|
|
30
30
|
"$ref": "#/definitions/EmbeddedLanguageFormattingConfig"
|
|
31
31
|
}
|
|
32
32
|
],
|
|
33
|
-
"markdownDescription": "Control whether to format embedded parts (For example, CSS-in-JS, or JS-in-Vue, etc.) in the file.\n\
|
|
33
|
+
"markdownDescription": "Control whether to format embedded parts (For example, CSS-in-JS, or JS-in-Vue, etc.) in the file.\n\n- Languages: JS, JSX, TS, TSX, HTML, Vue, Angular, Svelte, Markdown, MDX (languages with embedded code)\n- Default: `\"auto\"`"
|
|
34
34
|
},
|
|
35
35
|
"endOfLine": {
|
|
36
|
-
"description": "Which end of line characters to apply.\n\nNOTE: `\"auto\"` is not supported.\n\n- Default: `\"lf\"`\n- Overrides `.editorconfig.end_of_line`",
|
|
36
|
+
"description": "Which end of line characters to apply.\n\nNOTE: `\"auto\"` is not supported.\n\n- Languages: All\n- Default: `\"lf\"`\n- Overrides `.editorconfig.end_of_line`",
|
|
37
37
|
"allOf": [
|
|
38
38
|
{
|
|
39
39
|
"$ref": "#/definitions/EndOfLineConfig"
|
|
40
40
|
}
|
|
41
41
|
],
|
|
42
|
-
"markdownDescription": "Which end of line characters to apply.\n\nNOTE: `\"auto\"` is not supported.\n\n- Default: `\"lf\"`\n- Overrides `.editorconfig.end_of_line`"
|
|
42
|
+
"markdownDescription": "Which end of line characters to apply.\n\nNOTE: `\"auto\"` is not supported.\n\n- Languages: All\n- Default: `\"lf\"`\n- Overrides `.editorconfig.end_of_line`"
|
|
43
43
|
},
|
|
44
44
|
"htmlWhitespaceSensitivity": {
|
|
45
|
-
"description": "Specify the global whitespace sensitivity for HTML, Vue, Angular, and Handlebars.\n\n- Default: `\"css\"`",
|
|
45
|
+
"description": "Specify the global whitespace sensitivity for HTML, Vue, Angular, and Handlebars.\n\n- Languages: HTML, Angular, Vue, Handlebars, Svelte\n- Default: `\"css\"`",
|
|
46
46
|
"allOf": [
|
|
47
47
|
{
|
|
48
48
|
"$ref": "#/definitions/HtmlWhitespaceSensitivityConfig"
|
|
49
49
|
}
|
|
50
50
|
],
|
|
51
|
-
"markdownDescription": "Specify the global whitespace sensitivity for HTML, Vue, Angular, and Handlebars.\n\n- Default: `\"css\"`"
|
|
51
|
+
"markdownDescription": "Specify the global whitespace sensitivity for HTML, Vue, Angular, and Handlebars.\n\n- Languages: HTML, Angular, Vue, Handlebars, Svelte\n- Default: `\"css\"`"
|
|
52
52
|
},
|
|
53
53
|
"ignorePatterns": {
|
|
54
54
|
"description": "Ignore files matching these glob patterns.\nPatterns are based on the location of the Oxfmt configuration file.\n\n- Default: `[]`",
|
|
@@ -59,32 +59,32 @@
|
|
|
59
59
|
"markdownDescription": "Ignore files matching these glob patterns.\nPatterns are based on the location of the Oxfmt configuration file.\n\n- Default: `[]`"
|
|
60
60
|
},
|
|
61
61
|
"insertFinalNewline": {
|
|
62
|
-
"description": "Whether to insert a final newline at the end of the file.\n\n- Default: `true`\n- Overrides `.editorconfig.insert_final_newline`",
|
|
62
|
+
"description": "Whether to insert a final newline at the end of the file.\n\n- Languages: All\n- Default: `true`\n- Overrides `.editorconfig.insert_final_newline`",
|
|
63
63
|
"type": "boolean",
|
|
64
|
-
"markdownDescription": "Whether to insert a final newline at the end of the file.\n\n- Default: `true`\n- Overrides `.editorconfig.insert_final_newline`"
|
|
64
|
+
"markdownDescription": "Whether to insert a final newline at the end of the file.\n\n- Languages: All\n- Default: `true`\n- Overrides `.editorconfig.insert_final_newline`"
|
|
65
65
|
},
|
|
66
66
|
"jsdoc": {
|
|
67
|
-
"description": "Enable JSDoc comment formatting.\n\nWhen enabled, JSDoc comments are normalized and reformatted:\ntag aliases are canonicalized, descriptions are capitalized,\nlong lines are wrapped, and short comments are collapsed to single-line.\n\nPass `true` or an object to enable with defaults, or omit/set `false` to disable.\n\n- Default: Disabled",
|
|
67
|
+
"description": "Enable JSDoc comment formatting.\n\nWhen enabled, JSDoc comments are normalized and reformatted:\ntag aliases are canonicalized, descriptions are capitalized,\nlong lines are wrapped, and short comments are collapsed to single-line.\n\nPass `true` or an object to enable with defaults, or omit/set `false` to disable.\n\n- Languages: JS, JSX, TS, TSX\n- Default: Disabled",
|
|
68
68
|
"allOf": [
|
|
69
69
|
{
|
|
70
70
|
"$ref": "#/definitions/JsdocUserConfig"
|
|
71
71
|
}
|
|
72
72
|
],
|
|
73
|
-
"markdownDescription": "Enable JSDoc comment formatting.\n\nWhen enabled, JSDoc comments are normalized and reformatted:\ntag aliases are canonicalized, descriptions are capitalized,\nlong lines are wrapped, and short comments are collapsed to single-line.\n\nPass `true` or an object to enable with defaults, or omit/set `false` to disable.\n\n- Default: Disabled"
|
|
73
|
+
"markdownDescription": "Enable JSDoc comment formatting.\n\nWhen enabled, JSDoc comments are normalized and reformatted:\ntag aliases are canonicalized, descriptions are capitalized,\nlong lines are wrapped, and short comments are collapsed to single-line.\n\nPass `true` or an object to enable with defaults, or omit/set `false` to disable.\n\n- Languages: JS, JSX, TS, TSX\n- Default: Disabled"
|
|
74
74
|
},
|
|
75
75
|
"jsxSingleQuote": {
|
|
76
|
-
"description": "Use single quotes instead of double quotes in JSX.\n\n- Default: `false`",
|
|
76
|
+
"description": "Use single quotes instead of double quotes in JSX.\n\n- Languages: JSX, TSX\n- Default: `false`",
|
|
77
77
|
"type": "boolean",
|
|
78
|
-
"markdownDescription": "Use single quotes instead of double quotes in JSX.\n\n- Default: `false`"
|
|
78
|
+
"markdownDescription": "Use single quotes instead of double quotes in JSX.\n\n- Languages: JSX, TSX\n- Default: `false`"
|
|
79
79
|
},
|
|
80
80
|
"objectWrap": {
|
|
81
|
-
"description": "How to wrap object literals when they could fit on one line or span multiple lines.\n\nBy default, formats objects as multi-line if there is a newline prior to the first property.\nAuthors can use this heuristic to contextually improve readability, though it has some downsides.\n\n- Default: `\"preserve\"`",
|
|
81
|
+
"description": "How to wrap object literals when they could fit on one line or span multiple lines.\n\nBy default, formats objects as multi-line if there is a newline prior to the first property.\nAuthors can use this heuristic to contextually improve readability, though it has some downsides.\n\n- Languages: JS, JSX, TS, TSX, JSON, JSONC, JSON5\n- Default: `\"preserve\"`",
|
|
82
82
|
"allOf": [
|
|
83
83
|
{
|
|
84
84
|
"$ref": "#/definitions/ObjectWrapConfig"
|
|
85
85
|
}
|
|
86
86
|
],
|
|
87
|
-
"markdownDescription": "How to wrap object literals when they could fit on one line or span multiple lines.\n\nBy default, formats objects as multi-line if there is a newline prior to the first property.\nAuthors can use this heuristic to contextually improve readability, though it has some downsides.\n\n- Default: `\"preserve\"`"
|
|
87
|
+
"markdownDescription": "How to wrap object literals when they could fit on one line or span multiple lines.\n\nBy default, formats objects as multi-line if there is a newline prior to the first property.\nAuthors can use this heuristic to contextually improve readability, though it has some downsides.\n\n- Languages: JS, JSX, TS, TSX, JSON, JSONC, JSON5\n- Default: `\"preserve\"`"
|
|
88
88
|
},
|
|
89
89
|
"overrides": {
|
|
90
90
|
"description": "File-specific overrides.\nWhen a file matches multiple overrides, the later override takes precedence (array order matters).\n\n- Default: `[]`",
|
|
@@ -95,106 +95,106 @@
|
|
|
95
95
|
"markdownDescription": "File-specific overrides.\nWhen a file matches multiple overrides, the later override takes precedence (array order matters).\n\n- Default: `[]`"
|
|
96
96
|
},
|
|
97
97
|
"printWidth": {
|
|
98
|
-
"description": "Specify the line length that the printer will wrap on.\n\nIf you don't want line wrapping when formatting Markdown, you can set the `proseWrap` option to disable it.\n\n- Default: `100`\n- Overrides `.editorconfig.max_line_length`",
|
|
98
|
+
"description": "Specify the line length that the printer will wrap on.\n\nIf you don't want line wrapping when formatting Markdown, you can set the `proseWrap` option to disable it.\n\n- Languages: All\n- Default: `100`\n- Overrides `.editorconfig.max_line_length`",
|
|
99
99
|
"type": "integer",
|
|
100
100
|
"format": "uint16",
|
|
101
101
|
"minimum": 0.0,
|
|
102
|
-
"markdownDescription": "Specify the line length that the printer will wrap on.\n\nIf you don't want line wrapping when formatting Markdown, you can set the `proseWrap` option to disable it.\n\n- Default: `100`\n- Overrides `.editorconfig.max_line_length`"
|
|
102
|
+
"markdownDescription": "Specify the line length that the printer will wrap on.\n\nIf you don't want line wrapping when formatting Markdown, you can set the `proseWrap` option to disable it.\n\n- Languages: All\n- Default: `100`\n- Overrides `.editorconfig.max_line_length`"
|
|
103
103
|
},
|
|
104
104
|
"proseWrap": {
|
|
105
|
-
"description": "How to wrap prose.\n\nBy default, formatter will not change wrapping in markdown text since some services use a linebreak-sensitive renderer, e.g. GitHub comments and BitBucket.\nTo wrap prose to the print width, change this option to \"always\".\nIf you want to force all prose blocks to be on a single line and rely on editor/viewer soft wrapping instead, you can use \"never\".\n\n- Default: `\"preserve\"`",
|
|
105
|
+
"description": "How to wrap prose.\n\nBy default, formatter will not change wrapping in markdown text since some services use a linebreak-sensitive renderer, e.g. GitHub comments and BitBucket.\nTo wrap prose to the print width, change this option to \"always\".\nIf you want to force all prose blocks to be on a single line and rely on editor/viewer soft wrapping instead, you can use \"never\".\n\n- Languages: Markdown, MDX, YAML\n- Default: `\"preserve\"`",
|
|
106
106
|
"allOf": [
|
|
107
107
|
{
|
|
108
108
|
"$ref": "#/definitions/ProseWrapConfig"
|
|
109
109
|
}
|
|
110
110
|
],
|
|
111
|
-
"markdownDescription": "How to wrap prose.\n\nBy default, formatter will not change wrapping in markdown text since some services use a linebreak-sensitive renderer, e.g. GitHub comments and BitBucket.\nTo wrap prose to the print width, change this option to \"always\".\nIf you want to force all prose blocks to be on a single line and rely on editor/viewer soft wrapping instead, you can use \"never\".\n\n- Default: `\"preserve\"`"
|
|
111
|
+
"markdownDescription": "How to wrap prose.\n\nBy default, formatter will not change wrapping in markdown text since some services use a linebreak-sensitive renderer, e.g. GitHub comments and BitBucket.\nTo wrap prose to the print width, change this option to \"always\".\nIf you want to force all prose blocks to be on a single line and rely on editor/viewer soft wrapping instead, you can use \"never\".\n\n- Languages: Markdown, MDX, YAML\n- Default: `\"preserve\"`"
|
|
112
112
|
},
|
|
113
113
|
"quoteProps": {
|
|
114
|
-
"description": "Change when properties in objects are quoted.\n\n- Default: `\"as-needed\"`",
|
|
114
|
+
"description": "Change when properties in objects are quoted.\n\n- Languages: JS, JSX, TS, TSX\n- Default: `\"as-needed\"`",
|
|
115
115
|
"allOf": [
|
|
116
116
|
{
|
|
117
117
|
"$ref": "#/definitions/QuotePropsConfig"
|
|
118
118
|
}
|
|
119
119
|
],
|
|
120
|
-
"markdownDescription": "Change when properties in objects are quoted.\n\n- Default: `\"as-needed\"`"
|
|
120
|
+
"markdownDescription": "Change when properties in objects are quoted.\n\n- Languages: JS, JSX, TS, TSX\n- Default: `\"as-needed\"`"
|
|
121
121
|
},
|
|
122
122
|
"semi": {
|
|
123
|
-
"description": "Print semicolons at the ends of statements.\n\n- Default: `true`",
|
|
123
|
+
"description": "Print semicolons at the ends of statements.\n\n- Languages: JS, JSX, TS, TSX\n- Default: `true`",
|
|
124
124
|
"type": "boolean",
|
|
125
|
-
"markdownDescription": "Print semicolons at the ends of statements.\n\n- Default: `true`"
|
|
125
|
+
"markdownDescription": "Print semicolons at the ends of statements.\n\n- Languages: JS, JSX, TS, TSX\n- Default: `true`"
|
|
126
126
|
},
|
|
127
127
|
"singleAttributePerLine": {
|
|
128
|
-
"description": "Enforce single attribute per line in HTML, Vue, and JSX.\n\n- Default: `false`",
|
|
128
|
+
"description": "Enforce single attribute per line in HTML, Vue, and JSX.\n\n- Languages: JSX, TSX, HTML, Angular, Vue, MJML, Svelte\n- Default: `false`",
|
|
129
129
|
"type": "boolean",
|
|
130
|
-
"markdownDescription": "Enforce single attribute per line in HTML, Vue, and JSX.\n\n- Default: `false`"
|
|
130
|
+
"markdownDescription": "Enforce single attribute per line in HTML, Vue, and JSX.\n\n- Languages: JSX, TSX, HTML, Angular, Vue, MJML, Svelte\n- Default: `false`"
|
|
131
131
|
},
|
|
132
132
|
"singleQuote": {
|
|
133
|
-
"description": "Use single quotes instead of double quotes.\n\nFor JSX, you can set the `jsxSingleQuote` option.\n\n- Default: `false`\n- Overrides `.editorconfig.quote_type`",
|
|
133
|
+
"description": "Use single quotes instead of double quotes.\n\nFor JSX, you can set the `jsxSingleQuote` option.\n\n- Languages: JS, JSX, TS, TSX, CSS, Less, SCSS, Markdown, MDX, YAML, Handlebars, Svelte\n- Default: `false`\n- Overrides `.editorconfig.quote_type`",
|
|
134
134
|
"type": "boolean",
|
|
135
|
-
"markdownDescription": "Use single quotes instead of double quotes.\n\nFor JSX, you can set the `jsxSingleQuote` option.\n\n- Default: `false`\n- Overrides `.editorconfig.quote_type`"
|
|
135
|
+
"markdownDescription": "Use single quotes instead of double quotes.\n\nFor JSX, you can set the `jsxSingleQuote` option.\n\n- Languages: JS, JSX, TS, TSX, CSS, Less, SCSS, Markdown, MDX, YAML, Handlebars, Svelte\n- Default: `false`\n- Overrides `.editorconfig.quote_type`"
|
|
136
136
|
},
|
|
137
137
|
"sortImports": {
|
|
138
|
-
"description": "Sort import statements.\n\nUsing the similar algorithm as [eslint-plugin-perfectionist/sort-imports](https://perfectionist.dev/rules/sort-imports).\nFor details, see each field's documentation.\n\nPass `true` or an object to enable with defaults, or omit/set `false` to disable.\n\n- Default: Disabled",
|
|
138
|
+
"description": "Sort import statements.\n\nUsing the similar algorithm as [eslint-plugin-perfectionist/sort-imports](https://perfectionist.dev/rules/sort-imports).\nFor details, see each field's documentation.\n\nPass `true` or an object to enable with defaults, or omit/set `false` to disable.\n\n- Languages: JS, JSX, TS, TSX\n- Default: Disabled",
|
|
139
139
|
"allOf": [
|
|
140
140
|
{
|
|
141
141
|
"$ref": "#/definitions/SortImportsUserConfig"
|
|
142
142
|
}
|
|
143
143
|
],
|
|
144
|
-
"markdownDescription": "Sort import statements.\n\nUsing the similar algorithm as [eslint-plugin-perfectionist/sort-imports](https://perfectionist.dev/rules/sort-imports).\nFor details, see each field's documentation.\n\nPass `true` or an object to enable with defaults, or omit/set `false` to disable.\n\n- Default: Disabled"
|
|
144
|
+
"markdownDescription": "Sort import statements.\n\nUsing the similar algorithm as [eslint-plugin-perfectionist/sort-imports](https://perfectionist.dev/rules/sort-imports).\nFor details, see each field's documentation.\n\nPass `true` or an object to enable with defaults, or omit/set `false` to disable.\n\n- Languages: JS, JSX, TS, TSX\n- Default: Disabled"
|
|
145
145
|
},
|
|
146
146
|
"sortPackageJson": {
|
|
147
|
-
"description": "Sort `package.json` keys.\n\nThe algorithm is NOT compatible with [prettier-plugin-sort-packagejson](https://github.com/matzkoh/prettier-plugin-packagejson).\nBut we believe it is clearer and easier to navigate.\nFor details, see each field's documentation.\n\n- Default: `true`",
|
|
147
|
+
"description": "Sort `package.json` keys.\n\nThe algorithm is NOT compatible with [prettier-plugin-sort-packagejson](https://github.com/matzkoh/prettier-plugin-packagejson).\nBut we believe it is clearer and easier to navigate.\nFor details, see each field's documentation.\n\n- Languages: JSON (`package.json` only)\n- Default: `true`",
|
|
148
148
|
"allOf": [
|
|
149
149
|
{
|
|
150
150
|
"$ref": "#/definitions/SortPackageJsonUserConfig"
|
|
151
151
|
}
|
|
152
152
|
],
|
|
153
|
-
"markdownDescription": "Sort `package.json` keys.\n\nThe algorithm is NOT compatible with [prettier-plugin-sort-packagejson](https://github.com/matzkoh/prettier-plugin-packagejson).\nBut we believe it is clearer and easier to navigate.\nFor details, see each field's documentation.\n\n- Default: `true`"
|
|
153
|
+
"markdownDescription": "Sort `package.json` keys.\n\nThe algorithm is NOT compatible with [prettier-plugin-sort-packagejson](https://github.com/matzkoh/prettier-plugin-packagejson).\nBut we believe it is clearer and easier to navigate.\nFor details, see each field's documentation.\n\n- Languages: JSON (`package.json` only)\n- Default: `true`"
|
|
154
154
|
},
|
|
155
155
|
"sortTailwindcss": {
|
|
156
|
-
"description": "Sort Tailwind CSS classes.\n\nUsing the same algorithm as [prettier-plugin-tailwindcss](https://github.com/tailwindlabs/prettier-plugin-tailwindcss).\nOption names omit the `tailwind` prefix used in the original plugin (e.g., `config` instead of `tailwindConfig`).\nFor details, see each field's documentation.\n\nPass `true` or an object to enable with defaults, or omit/set `false` to disable.\n\n- Default: Disabled",
|
|
156
|
+
"description": "Sort Tailwind CSS classes.\n\nUsing the same algorithm as [prettier-plugin-tailwindcss](https://github.com/tailwindlabs/prettier-plugin-tailwindcss).\nOption names omit the `tailwind` prefix used in the original plugin (e.g., `config` instead of `tailwindConfig`).\nFor details, see each field's documentation.\n\nPass `true` or an object to enable with defaults, or omit/set `false` to disable.\n\n- Languages: JS, JSX, TS, TSX, HTML, Vue, Angular, Handlebars, CSS, SCSS, Less, Svelte\n- Default: Disabled",
|
|
157
157
|
"allOf": [
|
|
158
158
|
{
|
|
159
159
|
"$ref": "#/definitions/SortTailwindcssUserConfig"
|
|
160
160
|
}
|
|
161
161
|
],
|
|
162
|
-
"markdownDescription": "Sort Tailwind CSS classes.\n\nUsing the same algorithm as [prettier-plugin-tailwindcss](https://github.com/tailwindlabs/prettier-plugin-tailwindcss).\nOption names omit the `tailwind` prefix used in the original plugin (e.g., `config` instead of `tailwindConfig`).\nFor details, see each field's documentation.\n\nPass `true` or an object to enable with defaults, or omit/set `false` to disable.\n\n- Default: Disabled"
|
|
162
|
+
"markdownDescription": "Sort Tailwind CSS classes.\n\nUsing the same algorithm as [prettier-plugin-tailwindcss](https://github.com/tailwindlabs/prettier-plugin-tailwindcss).\nOption names omit the `tailwind` prefix used in the original plugin (e.g., `config` instead of `tailwindConfig`).\nFor details, see each field's documentation.\n\nPass `true` or an object to enable with defaults, or omit/set `false` to disable.\n\n- Languages: JS, JSX, TS, TSX, HTML, Vue, Angular, Handlebars, CSS, SCSS, Less, Svelte\n- Default: Disabled"
|
|
163
163
|
},
|
|
164
164
|
"svelte": {
|
|
165
|
-
"description": "Options for `prettier-plugin-svelte`.\n\nPass `true` or an object to enable `.svelte` file formatting,\nor `false` (handy in overrides) / omit to disable.\nSetting `true` resets to defaults — any options inherited from a parent scope are dropped.\n\nNOTE: `prettier-plugin-svelte` requires the `svelte` package (`svelte/compiler`) at runtime,\nbut Oxfmt does NOT bundle or auto-install it.\nYou must install `svelte` yourself in your project, formatting will fail at runtime otherwise.\n\n- Default: Disabled",
|
|
165
|
+
"description": "Options for `prettier-plugin-svelte`.\n\nPass `true` or an object to enable `.svelte` file formatting,\nor `false` (handy in overrides) / omit to disable.\nSetting `true` resets to defaults — any options inherited from a parent scope are dropped.\n\nNOTE: `prettier-plugin-svelte` requires the `svelte` package (`svelte/compiler`) at runtime,\nbut Oxfmt does NOT bundle or auto-install it.\nYou must install `svelte` yourself in your project, formatting will fail at runtime otherwise.\n\n- Languages: Svelte\n- Default: Disabled",
|
|
166
166
|
"allOf": [
|
|
167
167
|
{
|
|
168
168
|
"$ref": "#/definitions/SvelteUserConfig"
|
|
169
169
|
}
|
|
170
170
|
],
|
|
171
|
-
"markdownDescription": "Options for `prettier-plugin-svelte`.\n\nPass `true` or an object to enable `.svelte` file formatting,\nor `false` (handy in overrides) / omit to disable.\nSetting `true` resets to defaults — any options inherited from a parent scope are dropped.\n\nNOTE: `prettier-plugin-svelte` requires the `svelte` package (`svelte/compiler`) at runtime,\nbut Oxfmt does NOT bundle or auto-install it.\nYou must install `svelte` yourself in your project, formatting will fail at runtime otherwise.\n\n- Default: Disabled"
|
|
171
|
+
"markdownDescription": "Options for `prettier-plugin-svelte`.\n\nPass `true` or an object to enable `.svelte` file formatting,\nor `false` (handy in overrides) / omit to disable.\nSetting `true` resets to defaults — any options inherited from a parent scope are dropped.\n\nNOTE: `prettier-plugin-svelte` requires the `svelte` package (`svelte/compiler`) at runtime,\nbut Oxfmt does NOT bundle or auto-install it.\nYou must install `svelte` yourself in your project, formatting will fail at runtime otherwise.\n\n- Languages: Svelte\n- Default: Disabled"
|
|
172
172
|
},
|
|
173
173
|
"tabWidth": {
|
|
174
|
-
"description": "Specify the number of spaces per indentation-level.\n\n- Default: `2`\n- Overrides `.editorconfig.indent_size` (falls back to `.editorconfig.tab_width`)",
|
|
174
|
+
"description": "Specify the number of spaces per indentation-level.\n\n- Languages: All\n- Default: `2`\n- Overrides `.editorconfig.indent_size` (falls back to `.editorconfig.tab_width`)",
|
|
175
175
|
"type": "integer",
|
|
176
176
|
"format": "uint8",
|
|
177
177
|
"minimum": 0.0,
|
|
178
|
-
"markdownDescription": "Specify the number of spaces per indentation-level.\n\n- Default: `2`\n- Overrides `.editorconfig.indent_size` (falls back to `.editorconfig.tab_width`)"
|
|
178
|
+
"markdownDescription": "Specify the number of spaces per indentation-level.\n\n- Languages: All\n- Default: `2`\n- Overrides `.editorconfig.indent_size` (falls back to `.editorconfig.tab_width`)"
|
|
179
179
|
},
|
|
180
180
|
"trailingComma": {
|
|
181
|
-
"description": "Print trailing commas wherever possible in multi-line comma-separated syntactic structures.\n\nA single-line array, for example, never gets trailing commas.\n\n- Default: `\"all\"`",
|
|
181
|
+
"description": "Print trailing commas wherever possible in multi-line comma-separated syntactic structures.\n\nA single-line array, for example, never gets trailing commas.\n\n- Languages: JS, JSX, TS, TSX, JSONC, JSON5, TOML, CSS, Less, SCSS, YAML\n- Default: `\"all\"`",
|
|
182
182
|
"allOf": [
|
|
183
183
|
{
|
|
184
184
|
"$ref": "#/definitions/TrailingCommaConfig"
|
|
185
185
|
}
|
|
186
186
|
],
|
|
187
|
-
"markdownDescription": "Print trailing commas wherever possible in multi-line comma-separated syntactic structures.\n\nA single-line array, for example, never gets trailing commas.\n\n- Default: `\"all\"`"
|
|
187
|
+
"markdownDescription": "Print trailing commas wherever possible in multi-line comma-separated syntactic structures.\n\nA single-line array, for example, never gets trailing commas.\n\n- Languages: JS, JSX, TS, TSX, JSONC, JSON5, TOML, CSS, Less, SCSS, YAML\n- Default: `\"all\"`"
|
|
188
188
|
},
|
|
189
189
|
"useTabs": {
|
|
190
|
-
"description": "Indent lines with tabs instead of spaces.\n\n- Default: `false`\n- Overrides `.editorconfig.indent_style`",
|
|
190
|
+
"description": "Indent lines with tabs instead of spaces.\n\n- Languages: All\n- Default: `false`\n- Overrides `.editorconfig.indent_style`",
|
|
191
191
|
"type": "boolean",
|
|
192
|
-
"markdownDescription": "Indent lines with tabs instead of spaces.\n\n- Default: `false`\n- Overrides `.editorconfig.indent_style`"
|
|
192
|
+
"markdownDescription": "Indent lines with tabs instead of spaces.\n\n- Languages: All\n- Default: `false`\n- Overrides `.editorconfig.indent_style`"
|
|
193
193
|
},
|
|
194
194
|
"vueIndentScriptAndStyle": {
|
|
195
|
-
"description": "Whether or not to indent the code inside `<script>` and `<style>` tags in Vue files.\n\n- Default: `false`",
|
|
195
|
+
"description": "Whether or not to indent the code inside `<script>` and `<style>` tags in Vue files.\n\n- Languages: Vue\n- Default: `false`",
|
|
196
196
|
"type": "boolean",
|
|
197
|
-
"markdownDescription": "Whether or not to indent the code inside `<script>` and `<style>` tags in Vue files.\n\n- Default: `false`"
|
|
197
|
+
"markdownDescription": "Whether or not to indent the code inside `<script>` and `<style>` tags in Vue files.\n\n- Languages: Vue\n- Default: `false`"
|
|
198
198
|
}
|
|
199
199
|
},
|
|
200
200
|
"allowComments": true,
|
|
@@ -259,180 +259,180 @@
|
|
|
259
259
|
"type": "object",
|
|
260
260
|
"properties": {
|
|
261
261
|
"arrowParens": {
|
|
262
|
-
"description": "Include parentheses around a sole arrow function parameter.\n\n- Default: `\"always\"`",
|
|
262
|
+
"description": "Include parentheses around a sole arrow function parameter.\n\n- Languages: JS, JSX, TS, TSX\n- Default: `\"always\"`",
|
|
263
263
|
"allOf": [
|
|
264
264
|
{
|
|
265
265
|
"$ref": "#/definitions/ArrowParensConfig"
|
|
266
266
|
}
|
|
267
267
|
],
|
|
268
|
-
"markdownDescription": "Include parentheses around a sole arrow function parameter.\n\n- Default: `\"always\"`"
|
|
268
|
+
"markdownDescription": "Include parentheses around a sole arrow function parameter.\n\n- Languages: JS, JSX, TS, TSX\n- Default: `\"always\"`"
|
|
269
269
|
},
|
|
270
270
|
"bracketSameLine": {
|
|
271
|
-
"description": "Put the `>` of a multi-line HTML (HTML, JSX, Vue, Angular) element at the end of the last line,\ninstead of being alone on the next line (does not apply to self closing elements).\n\n- Default: `false`",
|
|
271
|
+
"description": "Put the `>` of a multi-line HTML (HTML, JSX, Vue, Angular) element at the end of the last line,\ninstead of being alone on the next line (does not apply to self closing elements).\n\n- Languages: JSX, TSX, HTML, Angular, Vue, MJML, Svelte\n- Default: `false`",
|
|
272
272
|
"type": "boolean",
|
|
273
|
-
"markdownDescription": "Put the `>` of a multi-line HTML (HTML, JSX, Vue, Angular) element at the end of the last line,\ninstead of being alone on the next line (does not apply to self closing elements).\n\n- Default: `false`"
|
|
273
|
+
"markdownDescription": "Put the `>` of a multi-line HTML (HTML, JSX, Vue, Angular) element at the end of the last line,\ninstead of being alone on the next line (does not apply to self closing elements).\n\n- Languages: JSX, TSX, HTML, Angular, Vue, MJML, Svelte\n- Default: `false`"
|
|
274
274
|
},
|
|
275
275
|
"bracketSpacing": {
|
|
276
|
-
"description": "Print spaces between brackets in object literals.\n\n- Default: `true`",
|
|
276
|
+
"description": "Print spaces between brackets in object literals.\n\n- Languages: JS, JSX, TS, TSX, JSON, JSONC, JSON5, GraphQL, YAML\n- Default: `true`",
|
|
277
277
|
"type": "boolean",
|
|
278
|
-
"markdownDescription": "Print spaces between brackets in object literals.\n\n- Default: `true`"
|
|
278
|
+
"markdownDescription": "Print spaces between brackets in object literals.\n\n- Languages: JS, JSX, TS, TSX, JSON, JSONC, JSON5, GraphQL, YAML\n- Default: `true`"
|
|
279
279
|
},
|
|
280
280
|
"embeddedLanguageFormatting": {
|
|
281
|
-
"description": "Control whether to format embedded parts (For example, CSS-in-JS, or JS-in-Vue, etc.) in the file.\n\
|
|
281
|
+
"description": "Control whether to format embedded parts (For example, CSS-in-JS, or JS-in-Vue, etc.) in the file.\n\n- Languages: JS, JSX, TS, TSX, HTML, Vue, Angular, Svelte, Markdown, MDX (languages with embedded code)\n- Default: `\"auto\"`",
|
|
282
282
|
"allOf": [
|
|
283
283
|
{
|
|
284
284
|
"$ref": "#/definitions/EmbeddedLanguageFormattingConfig"
|
|
285
285
|
}
|
|
286
286
|
],
|
|
287
|
-
"markdownDescription": "Control whether to format embedded parts (For example, CSS-in-JS, or JS-in-Vue, etc.) in the file.\n\
|
|
287
|
+
"markdownDescription": "Control whether to format embedded parts (For example, CSS-in-JS, or JS-in-Vue, etc.) in the file.\n\n- Languages: JS, JSX, TS, TSX, HTML, Vue, Angular, Svelte, Markdown, MDX (languages with embedded code)\n- Default: `\"auto\"`"
|
|
288
288
|
},
|
|
289
289
|
"endOfLine": {
|
|
290
|
-
"description": "Which end of line characters to apply.\n\nNOTE: `\"auto\"` is not supported.\n\n- Default: `\"lf\"`\n- Overrides `.editorconfig.end_of_line`",
|
|
290
|
+
"description": "Which end of line characters to apply.\n\nNOTE: `\"auto\"` is not supported.\n\n- Languages: All\n- Default: `\"lf\"`\n- Overrides `.editorconfig.end_of_line`",
|
|
291
291
|
"allOf": [
|
|
292
292
|
{
|
|
293
293
|
"$ref": "#/definitions/EndOfLineConfig"
|
|
294
294
|
}
|
|
295
295
|
],
|
|
296
|
-
"markdownDescription": "Which end of line characters to apply.\n\nNOTE: `\"auto\"` is not supported.\n\n- Default: `\"lf\"`\n- Overrides `.editorconfig.end_of_line`"
|
|
296
|
+
"markdownDescription": "Which end of line characters to apply.\n\nNOTE: `\"auto\"` is not supported.\n\n- Languages: All\n- Default: `\"lf\"`\n- Overrides `.editorconfig.end_of_line`"
|
|
297
297
|
},
|
|
298
298
|
"htmlWhitespaceSensitivity": {
|
|
299
|
-
"description": "Specify the global whitespace sensitivity for HTML, Vue, Angular, and Handlebars.\n\n- Default: `\"css\"`",
|
|
299
|
+
"description": "Specify the global whitespace sensitivity for HTML, Vue, Angular, and Handlebars.\n\n- Languages: HTML, Angular, Vue, Handlebars, Svelte\n- Default: `\"css\"`",
|
|
300
300
|
"allOf": [
|
|
301
301
|
{
|
|
302
302
|
"$ref": "#/definitions/HtmlWhitespaceSensitivityConfig"
|
|
303
303
|
}
|
|
304
304
|
],
|
|
305
|
-
"markdownDescription": "Specify the global whitespace sensitivity for HTML, Vue, Angular, and Handlebars.\n\n- Default: `\"css\"`"
|
|
305
|
+
"markdownDescription": "Specify the global whitespace sensitivity for HTML, Vue, Angular, and Handlebars.\n\n- Languages: HTML, Angular, Vue, Handlebars, Svelte\n- Default: `\"css\"`"
|
|
306
306
|
},
|
|
307
307
|
"insertFinalNewline": {
|
|
308
|
-
"description": "Whether to insert a final newline at the end of the file.\n\n- Default: `true`\n- Overrides `.editorconfig.insert_final_newline`",
|
|
308
|
+
"description": "Whether to insert a final newline at the end of the file.\n\n- Languages: All\n- Default: `true`\n- Overrides `.editorconfig.insert_final_newline`",
|
|
309
309
|
"type": "boolean",
|
|
310
|
-
"markdownDescription": "Whether to insert a final newline at the end of the file.\n\n- Default: `true`\n- Overrides `.editorconfig.insert_final_newline`"
|
|
310
|
+
"markdownDescription": "Whether to insert a final newline at the end of the file.\n\n- Languages: All\n- Default: `true`\n- Overrides `.editorconfig.insert_final_newline`"
|
|
311
311
|
},
|
|
312
312
|
"jsdoc": {
|
|
313
|
-
"description": "Enable JSDoc comment formatting.\n\nWhen enabled, JSDoc comments are normalized and reformatted:\ntag aliases are canonicalized, descriptions are capitalized,\nlong lines are wrapped, and short comments are collapsed to single-line.\n\nPass `true` or an object to enable with defaults, or omit/set `false` to disable.\n\n- Default: Disabled",
|
|
313
|
+
"description": "Enable JSDoc comment formatting.\n\nWhen enabled, JSDoc comments are normalized and reformatted:\ntag aliases are canonicalized, descriptions are capitalized,\nlong lines are wrapped, and short comments are collapsed to single-line.\n\nPass `true` or an object to enable with defaults, or omit/set `false` to disable.\n\n- Languages: JS, JSX, TS, TSX\n- Default: Disabled",
|
|
314
314
|
"allOf": [
|
|
315
315
|
{
|
|
316
316
|
"$ref": "#/definitions/JsdocUserConfig"
|
|
317
317
|
}
|
|
318
318
|
],
|
|
319
|
-
"markdownDescription": "Enable JSDoc comment formatting.\n\nWhen enabled, JSDoc comments are normalized and reformatted:\ntag aliases are canonicalized, descriptions are capitalized,\nlong lines are wrapped, and short comments are collapsed to single-line.\n\nPass `true` or an object to enable with defaults, or omit/set `false` to disable.\n\n- Default: Disabled"
|
|
319
|
+
"markdownDescription": "Enable JSDoc comment formatting.\n\nWhen enabled, JSDoc comments are normalized and reformatted:\ntag aliases are canonicalized, descriptions are capitalized,\nlong lines are wrapped, and short comments are collapsed to single-line.\n\nPass `true` or an object to enable with defaults, or omit/set `false` to disable.\n\n- Languages: JS, JSX, TS, TSX\n- Default: Disabled"
|
|
320
320
|
},
|
|
321
321
|
"jsxSingleQuote": {
|
|
322
|
-
"description": "Use single quotes instead of double quotes in JSX.\n\n- Default: `false`",
|
|
322
|
+
"description": "Use single quotes instead of double quotes in JSX.\n\n- Languages: JSX, TSX\n- Default: `false`",
|
|
323
323
|
"type": "boolean",
|
|
324
|
-
"markdownDescription": "Use single quotes instead of double quotes in JSX.\n\n- Default: `false`"
|
|
324
|
+
"markdownDescription": "Use single quotes instead of double quotes in JSX.\n\n- Languages: JSX, TSX\n- Default: `false`"
|
|
325
325
|
},
|
|
326
326
|
"objectWrap": {
|
|
327
|
-
"description": "How to wrap object literals when they could fit on one line or span multiple lines.\n\nBy default, formats objects as multi-line if there is a newline prior to the first property.\nAuthors can use this heuristic to contextually improve readability, though it has some downsides.\n\n- Default: `\"preserve\"`",
|
|
327
|
+
"description": "How to wrap object literals when they could fit on one line or span multiple lines.\n\nBy default, formats objects as multi-line if there is a newline prior to the first property.\nAuthors can use this heuristic to contextually improve readability, though it has some downsides.\n\n- Languages: JS, JSX, TS, TSX, JSON, JSONC, JSON5\n- Default: `\"preserve\"`",
|
|
328
328
|
"allOf": [
|
|
329
329
|
{
|
|
330
330
|
"$ref": "#/definitions/ObjectWrapConfig"
|
|
331
331
|
}
|
|
332
332
|
],
|
|
333
|
-
"markdownDescription": "How to wrap object literals when they could fit on one line or span multiple lines.\n\nBy default, formats objects as multi-line if there is a newline prior to the first property.\nAuthors can use this heuristic to contextually improve readability, though it has some downsides.\n\n- Default: `\"preserve\"`"
|
|
333
|
+
"markdownDescription": "How to wrap object literals when they could fit on one line or span multiple lines.\n\nBy default, formats objects as multi-line if there is a newline prior to the first property.\nAuthors can use this heuristic to contextually improve readability, though it has some downsides.\n\n- Languages: JS, JSX, TS, TSX, JSON, JSONC, JSON5\n- Default: `\"preserve\"`"
|
|
334
334
|
},
|
|
335
335
|
"printWidth": {
|
|
336
|
-
"description": "Specify the line length that the printer will wrap on.\n\nIf you don't want line wrapping when formatting Markdown, you can set the `proseWrap` option to disable it.\n\n- Default: `100`\n- Overrides `.editorconfig.max_line_length`",
|
|
336
|
+
"description": "Specify the line length that the printer will wrap on.\n\nIf you don't want line wrapping when formatting Markdown, you can set the `proseWrap` option to disable it.\n\n- Languages: All\n- Default: `100`\n- Overrides `.editorconfig.max_line_length`",
|
|
337
337
|
"type": "integer",
|
|
338
338
|
"format": "uint16",
|
|
339
339
|
"minimum": 0.0,
|
|
340
|
-
"markdownDescription": "Specify the line length that the printer will wrap on.\n\nIf you don't want line wrapping when formatting Markdown, you can set the `proseWrap` option to disable it.\n\n- Default: `100`\n- Overrides `.editorconfig.max_line_length`"
|
|
340
|
+
"markdownDescription": "Specify the line length that the printer will wrap on.\n\nIf you don't want line wrapping when formatting Markdown, you can set the `proseWrap` option to disable it.\n\n- Languages: All\n- Default: `100`\n- Overrides `.editorconfig.max_line_length`"
|
|
341
341
|
},
|
|
342
342
|
"proseWrap": {
|
|
343
|
-
"description": "How to wrap prose.\n\nBy default, formatter will not change wrapping in markdown text since some services use a linebreak-sensitive renderer, e.g. GitHub comments and BitBucket.\nTo wrap prose to the print width, change this option to \"always\".\nIf you want to force all prose blocks to be on a single line and rely on editor/viewer soft wrapping instead, you can use \"never\".\n\n- Default: `\"preserve\"`",
|
|
343
|
+
"description": "How to wrap prose.\n\nBy default, formatter will not change wrapping in markdown text since some services use a linebreak-sensitive renderer, e.g. GitHub comments and BitBucket.\nTo wrap prose to the print width, change this option to \"always\".\nIf you want to force all prose blocks to be on a single line and rely on editor/viewer soft wrapping instead, you can use \"never\".\n\n- Languages: Markdown, MDX, YAML\n- Default: `\"preserve\"`",
|
|
344
344
|
"allOf": [
|
|
345
345
|
{
|
|
346
346
|
"$ref": "#/definitions/ProseWrapConfig"
|
|
347
347
|
}
|
|
348
348
|
],
|
|
349
|
-
"markdownDescription": "How to wrap prose.\n\nBy default, formatter will not change wrapping in markdown text since some services use a linebreak-sensitive renderer, e.g. GitHub comments and BitBucket.\nTo wrap prose to the print width, change this option to \"always\".\nIf you want to force all prose blocks to be on a single line and rely on editor/viewer soft wrapping instead, you can use \"never\".\n\n- Default: `\"preserve\"`"
|
|
349
|
+
"markdownDescription": "How to wrap prose.\n\nBy default, formatter will not change wrapping in markdown text since some services use a linebreak-sensitive renderer, e.g. GitHub comments and BitBucket.\nTo wrap prose to the print width, change this option to \"always\".\nIf you want to force all prose blocks to be on a single line and rely on editor/viewer soft wrapping instead, you can use \"never\".\n\n- Languages: Markdown, MDX, YAML\n- Default: `\"preserve\"`"
|
|
350
350
|
},
|
|
351
351
|
"quoteProps": {
|
|
352
|
-
"description": "Change when properties in objects are quoted.\n\n- Default: `\"as-needed\"`",
|
|
352
|
+
"description": "Change when properties in objects are quoted.\n\n- Languages: JS, JSX, TS, TSX\n- Default: `\"as-needed\"`",
|
|
353
353
|
"allOf": [
|
|
354
354
|
{
|
|
355
355
|
"$ref": "#/definitions/QuotePropsConfig"
|
|
356
356
|
}
|
|
357
357
|
],
|
|
358
|
-
"markdownDescription": "Change when properties in objects are quoted.\n\n- Default: `\"as-needed\"`"
|
|
358
|
+
"markdownDescription": "Change when properties in objects are quoted.\n\n- Languages: JS, JSX, TS, TSX\n- Default: `\"as-needed\"`"
|
|
359
359
|
},
|
|
360
360
|
"semi": {
|
|
361
|
-
"description": "Print semicolons at the ends of statements.\n\n- Default: `true`",
|
|
361
|
+
"description": "Print semicolons at the ends of statements.\n\n- Languages: JS, JSX, TS, TSX\n- Default: `true`",
|
|
362
362
|
"type": "boolean",
|
|
363
|
-
"markdownDescription": "Print semicolons at the ends of statements.\n\n- Default: `true`"
|
|
363
|
+
"markdownDescription": "Print semicolons at the ends of statements.\n\n- Languages: JS, JSX, TS, TSX\n- Default: `true`"
|
|
364
364
|
},
|
|
365
365
|
"singleAttributePerLine": {
|
|
366
|
-
"description": "Enforce single attribute per line in HTML, Vue, and JSX.\n\n- Default: `false`",
|
|
366
|
+
"description": "Enforce single attribute per line in HTML, Vue, and JSX.\n\n- Languages: JSX, TSX, HTML, Angular, Vue, MJML, Svelte\n- Default: `false`",
|
|
367
367
|
"type": "boolean",
|
|
368
|
-
"markdownDescription": "Enforce single attribute per line in HTML, Vue, and JSX.\n\n- Default: `false`"
|
|
368
|
+
"markdownDescription": "Enforce single attribute per line in HTML, Vue, and JSX.\n\n- Languages: JSX, TSX, HTML, Angular, Vue, MJML, Svelte\n- Default: `false`"
|
|
369
369
|
},
|
|
370
370
|
"singleQuote": {
|
|
371
|
-
"description": "Use single quotes instead of double quotes.\n\nFor JSX, you can set the `jsxSingleQuote` option.\n\n- Default: `false`\n- Overrides `.editorconfig.quote_type`",
|
|
371
|
+
"description": "Use single quotes instead of double quotes.\n\nFor JSX, you can set the `jsxSingleQuote` option.\n\n- Languages: JS, JSX, TS, TSX, CSS, Less, SCSS, Markdown, MDX, YAML, Handlebars, Svelte\n- Default: `false`\n- Overrides `.editorconfig.quote_type`",
|
|
372
372
|
"type": "boolean",
|
|
373
|
-
"markdownDescription": "Use single quotes instead of double quotes.\n\nFor JSX, you can set the `jsxSingleQuote` option.\n\n- Default: `false`\n- Overrides `.editorconfig.quote_type`"
|
|
373
|
+
"markdownDescription": "Use single quotes instead of double quotes.\n\nFor JSX, you can set the `jsxSingleQuote` option.\n\n- Languages: JS, JSX, TS, TSX, CSS, Less, SCSS, Markdown, MDX, YAML, Handlebars, Svelte\n- Default: `false`\n- Overrides `.editorconfig.quote_type`"
|
|
374
374
|
},
|
|
375
375
|
"sortImports": {
|
|
376
|
-
"description": "Sort import statements.\n\nUsing the similar algorithm as [eslint-plugin-perfectionist/sort-imports](https://perfectionist.dev/rules/sort-imports).\nFor details, see each field's documentation.\n\nPass `true` or an object to enable with defaults, or omit/set `false` to disable.\n\n- Default: Disabled",
|
|
376
|
+
"description": "Sort import statements.\n\nUsing the similar algorithm as [eslint-plugin-perfectionist/sort-imports](https://perfectionist.dev/rules/sort-imports).\nFor details, see each field's documentation.\n\nPass `true` or an object to enable with defaults, or omit/set `false` to disable.\n\n- Languages: JS, JSX, TS, TSX\n- Default: Disabled",
|
|
377
377
|
"allOf": [
|
|
378
378
|
{
|
|
379
379
|
"$ref": "#/definitions/SortImportsUserConfig"
|
|
380
380
|
}
|
|
381
381
|
],
|
|
382
|
-
"markdownDescription": "Sort import statements.\n\nUsing the similar algorithm as [eslint-plugin-perfectionist/sort-imports](https://perfectionist.dev/rules/sort-imports).\nFor details, see each field's documentation.\n\nPass `true` or an object to enable with defaults, or omit/set `false` to disable.\n\n- Default: Disabled"
|
|
382
|
+
"markdownDescription": "Sort import statements.\n\nUsing the similar algorithm as [eslint-plugin-perfectionist/sort-imports](https://perfectionist.dev/rules/sort-imports).\nFor details, see each field's documentation.\n\nPass `true` or an object to enable with defaults, or omit/set `false` to disable.\n\n- Languages: JS, JSX, TS, TSX\n- Default: Disabled"
|
|
383
383
|
},
|
|
384
384
|
"sortPackageJson": {
|
|
385
|
-
"description": "Sort `package.json` keys.\n\nThe algorithm is NOT compatible with [prettier-plugin-sort-packagejson](https://github.com/matzkoh/prettier-plugin-packagejson).\nBut we believe it is clearer and easier to navigate.\nFor details, see each field's documentation.\n\n- Default: `true`",
|
|
385
|
+
"description": "Sort `package.json` keys.\n\nThe algorithm is NOT compatible with [prettier-plugin-sort-packagejson](https://github.com/matzkoh/prettier-plugin-packagejson).\nBut we believe it is clearer and easier to navigate.\nFor details, see each field's documentation.\n\n- Languages: JSON (`package.json` only)\n- Default: `true`",
|
|
386
386
|
"allOf": [
|
|
387
387
|
{
|
|
388
388
|
"$ref": "#/definitions/SortPackageJsonUserConfig"
|
|
389
389
|
}
|
|
390
390
|
],
|
|
391
|
-
"markdownDescription": "Sort `package.json` keys.\n\nThe algorithm is NOT compatible with [prettier-plugin-sort-packagejson](https://github.com/matzkoh/prettier-plugin-packagejson).\nBut we believe it is clearer and easier to navigate.\nFor details, see each field's documentation.\n\n- Default: `true`"
|
|
391
|
+
"markdownDescription": "Sort `package.json` keys.\n\nThe algorithm is NOT compatible with [prettier-plugin-sort-packagejson](https://github.com/matzkoh/prettier-plugin-packagejson).\nBut we believe it is clearer and easier to navigate.\nFor details, see each field's documentation.\n\n- Languages: JSON (`package.json` only)\n- Default: `true`"
|
|
392
392
|
},
|
|
393
393
|
"sortTailwindcss": {
|
|
394
|
-
"description": "Sort Tailwind CSS classes.\n\nUsing the same algorithm as [prettier-plugin-tailwindcss](https://github.com/tailwindlabs/prettier-plugin-tailwindcss).\nOption names omit the `tailwind` prefix used in the original plugin (e.g., `config` instead of `tailwindConfig`).\nFor details, see each field's documentation.\n\nPass `true` or an object to enable with defaults, or omit/set `false` to disable.\n\n- Default: Disabled",
|
|
394
|
+
"description": "Sort Tailwind CSS classes.\n\nUsing the same algorithm as [prettier-plugin-tailwindcss](https://github.com/tailwindlabs/prettier-plugin-tailwindcss).\nOption names omit the `tailwind` prefix used in the original plugin (e.g., `config` instead of `tailwindConfig`).\nFor details, see each field's documentation.\n\nPass `true` or an object to enable with defaults, or omit/set `false` to disable.\n\n- Languages: JS, JSX, TS, TSX, HTML, Vue, Angular, Handlebars, CSS, SCSS, Less, Svelte\n- Default: Disabled",
|
|
395
395
|
"allOf": [
|
|
396
396
|
{
|
|
397
397
|
"$ref": "#/definitions/SortTailwindcssUserConfig"
|
|
398
398
|
}
|
|
399
399
|
],
|
|
400
|
-
"markdownDescription": "Sort Tailwind CSS classes.\n\nUsing the same algorithm as [prettier-plugin-tailwindcss](https://github.com/tailwindlabs/prettier-plugin-tailwindcss).\nOption names omit the `tailwind` prefix used in the original plugin (e.g., `config` instead of `tailwindConfig`).\nFor details, see each field's documentation.\n\nPass `true` or an object to enable with defaults, or omit/set `false` to disable.\n\n- Default: Disabled"
|
|
400
|
+
"markdownDescription": "Sort Tailwind CSS classes.\n\nUsing the same algorithm as [prettier-plugin-tailwindcss](https://github.com/tailwindlabs/prettier-plugin-tailwindcss).\nOption names omit the `tailwind` prefix used in the original plugin (e.g., `config` instead of `tailwindConfig`).\nFor details, see each field's documentation.\n\nPass `true` or an object to enable with defaults, or omit/set `false` to disable.\n\n- Languages: JS, JSX, TS, TSX, HTML, Vue, Angular, Handlebars, CSS, SCSS, Less, Svelte\n- Default: Disabled"
|
|
401
401
|
},
|
|
402
402
|
"svelte": {
|
|
403
|
-
"description": "Options for `prettier-plugin-svelte`.\n\nPass `true` or an object to enable `.svelte` file formatting,\nor `false` (handy in overrides) / omit to disable.\nSetting `true` resets to defaults — any options inherited from a parent scope are dropped.\n\nNOTE: `prettier-plugin-svelte` requires the `svelte` package (`svelte/compiler`) at runtime,\nbut Oxfmt does NOT bundle or auto-install it.\nYou must install `svelte` yourself in your project, formatting will fail at runtime otherwise.\n\n- Default: Disabled",
|
|
403
|
+
"description": "Options for `prettier-plugin-svelte`.\n\nPass `true` or an object to enable `.svelte` file formatting,\nor `false` (handy in overrides) / omit to disable.\nSetting `true` resets to defaults — any options inherited from a parent scope are dropped.\n\nNOTE: `prettier-plugin-svelte` requires the `svelte` package (`svelte/compiler`) at runtime,\nbut Oxfmt does NOT bundle or auto-install it.\nYou must install `svelte` yourself in your project, formatting will fail at runtime otherwise.\n\n- Languages: Svelte\n- Default: Disabled",
|
|
404
404
|
"allOf": [
|
|
405
405
|
{
|
|
406
406
|
"$ref": "#/definitions/SvelteUserConfig"
|
|
407
407
|
}
|
|
408
408
|
],
|
|
409
|
-
"markdownDescription": "Options for `prettier-plugin-svelte`.\n\nPass `true` or an object to enable `.svelte` file formatting,\nor `false` (handy in overrides) / omit to disable.\nSetting `true` resets to defaults — any options inherited from a parent scope are dropped.\n\nNOTE: `prettier-plugin-svelte` requires the `svelte` package (`svelte/compiler`) at runtime,\nbut Oxfmt does NOT bundle or auto-install it.\nYou must install `svelte` yourself in your project, formatting will fail at runtime otherwise.\n\n- Default: Disabled"
|
|
409
|
+
"markdownDescription": "Options for `prettier-plugin-svelte`.\n\nPass `true` or an object to enable `.svelte` file formatting,\nor `false` (handy in overrides) / omit to disable.\nSetting `true` resets to defaults — any options inherited from a parent scope are dropped.\n\nNOTE: `prettier-plugin-svelte` requires the `svelte` package (`svelte/compiler`) at runtime,\nbut Oxfmt does NOT bundle or auto-install it.\nYou must install `svelte` yourself in your project, formatting will fail at runtime otherwise.\n\n- Languages: Svelte\n- Default: Disabled"
|
|
410
410
|
},
|
|
411
411
|
"tabWidth": {
|
|
412
|
-
"description": "Specify the number of spaces per indentation-level.\n\n- Default: `2`\n- Overrides `.editorconfig.indent_size` (falls back to `.editorconfig.tab_width`)",
|
|
412
|
+
"description": "Specify the number of spaces per indentation-level.\n\n- Languages: All\n- Default: `2`\n- Overrides `.editorconfig.indent_size` (falls back to `.editorconfig.tab_width`)",
|
|
413
413
|
"type": "integer",
|
|
414
414
|
"format": "uint8",
|
|
415
415
|
"minimum": 0.0,
|
|
416
|
-
"markdownDescription": "Specify the number of spaces per indentation-level.\n\n- Default: `2`\n- Overrides `.editorconfig.indent_size` (falls back to `.editorconfig.tab_width`)"
|
|
416
|
+
"markdownDescription": "Specify the number of spaces per indentation-level.\n\n- Languages: All\n- Default: `2`\n- Overrides `.editorconfig.indent_size` (falls back to `.editorconfig.tab_width`)"
|
|
417
417
|
},
|
|
418
418
|
"trailingComma": {
|
|
419
|
-
"description": "Print trailing commas wherever possible in multi-line comma-separated syntactic structures.\n\nA single-line array, for example, never gets trailing commas.\n\n- Default: `\"all\"`",
|
|
419
|
+
"description": "Print trailing commas wherever possible in multi-line comma-separated syntactic structures.\n\nA single-line array, for example, never gets trailing commas.\n\n- Languages: JS, JSX, TS, TSX, JSONC, JSON5, TOML, CSS, Less, SCSS, YAML\n- Default: `\"all\"`",
|
|
420
420
|
"allOf": [
|
|
421
421
|
{
|
|
422
422
|
"$ref": "#/definitions/TrailingCommaConfig"
|
|
423
423
|
}
|
|
424
424
|
],
|
|
425
|
-
"markdownDescription": "Print trailing commas wherever possible in multi-line comma-separated syntactic structures.\n\nA single-line array, for example, never gets trailing commas.\n\n- Default: `\"all\"`"
|
|
425
|
+
"markdownDescription": "Print trailing commas wherever possible in multi-line comma-separated syntactic structures.\n\nA single-line array, for example, never gets trailing commas.\n\n- Languages: JS, JSX, TS, TSX, JSONC, JSON5, TOML, CSS, Less, SCSS, YAML\n- Default: `\"all\"`"
|
|
426
426
|
},
|
|
427
427
|
"useTabs": {
|
|
428
|
-
"description": "Indent lines with tabs instead of spaces.\n\n- Default: `false`\n- Overrides `.editorconfig.indent_style`",
|
|
428
|
+
"description": "Indent lines with tabs instead of spaces.\n\n- Languages: All\n- Default: `false`\n- Overrides `.editorconfig.indent_style`",
|
|
429
429
|
"type": "boolean",
|
|
430
|
-
"markdownDescription": "Indent lines with tabs instead of spaces.\n\n- Default: `false`\n- Overrides `.editorconfig.indent_style`"
|
|
430
|
+
"markdownDescription": "Indent lines with tabs instead of spaces.\n\n- Languages: All\n- Default: `false`\n- Overrides `.editorconfig.indent_style`"
|
|
431
431
|
},
|
|
432
432
|
"vueIndentScriptAndStyle": {
|
|
433
|
-
"description": "Whether or not to indent the code inside `<script>` and `<style>` tags in Vue files.\n\n- Default: `false`",
|
|
433
|
+
"description": "Whether or not to indent the code inside `<script>` and `<style>` tags in Vue files.\n\n- Languages: Vue\n- Default: `false`",
|
|
434
434
|
"type": "boolean",
|
|
435
|
-
"markdownDescription": "Whether or not to indent the code inside `<script>` and `<style>` tags in Vue files.\n\n- Default: `false`"
|
|
435
|
+
"markdownDescription": "Whether or not to indent the code inside `<script>` and `<style>` tags in Vue files.\n\n- Languages: Vue\n- Default: `false`"
|
|
436
436
|
}
|
|
437
437
|
}
|
|
438
438
|
},
|
|
@@ -84,7 +84,7 @@ async function formatEmbeddedDoc({ texts, options }) {
|
|
|
84
84
|
* Option mapping (sortTailwindcss.xxx → tailwindXxx) is also done in Rust side.
|
|
85
85
|
*/
|
|
86
86
|
async function setupTailwindPlugin(options) {
|
|
87
|
-
CACHES.tailwindPlugin ??= await loadCached("tailwindPlugin", () => import("./dist-
|
|
87
|
+
CACHES.tailwindPlugin ??= await loadCached("tailwindPlugin", () => import("./dist-ZI7w_ao-.js"));
|
|
88
88
|
options.plugins ??= [];
|
|
89
89
|
options.plugins.push(CACHES.tailwindPlugin);
|
|
90
90
|
}
|
|
@@ -94,7 +94,7 @@ async function setupTailwindPlugin(options) {
|
|
|
94
94
|
* @returns Array of sorted class strings (same order/length as input)
|
|
95
95
|
*/
|
|
96
96
|
async function sortTailwindClasses({ classes, options }) {
|
|
97
|
-
CACHES.tailwindSorter ??= await loadCached("tailwindSorter", () => import("./sorter-
|
|
97
|
+
CACHES.tailwindSorter ??= await loadCached("tailwindSorter", () => import("./sorter-CharfNIQ.js"));
|
|
98
98
|
const { createSorter } = CACHES.tailwindSorter;
|
|
99
99
|
return (await createSorter({
|
|
100
100
|
filepath: options.filepath,
|
|
@@ -108,7 +108,7 @@ async function sortTailwindClasses({ classes, options }) {
|
|
|
108
108
|
* Load prettier-plugin-svelte to provide the `svelte` parser.
|
|
109
109
|
*/
|
|
110
110
|
async function setupSveltePlugin(options) {
|
|
111
|
-
CACHES.sveltePlugin ??= await loadCached("sveltePlugin", async () => await import("./plugin-
|
|
111
|
+
CACHES.sveltePlugin ??= await loadCached("sveltePlugin", async () => await import("./plugin-CHUKsFCg.js").then((m) => /* @__PURE__ */ __toESM(m.default, 1)));
|
|
112
112
|
options.plugins ??= [];
|
|
113
113
|
options.plugins.push(CACHES.sveltePlugin);
|
|
114
114
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire } from "node:module";
|
|
2
|
-
//#region ../../node_modules/.pnpm/prettier-plugin-tailwindcss@0.0.0-insiders.2b6f3c2_prettier-plugin-svelte@4.
|
|
2
|
+
//#region ../../node_modules/.pnpm/prettier-plugin-tailwindcss@0.0.0-insiders.2b6f3c2_prettier-plugin-svelte@4.1.0_prettie_e3345e2f5995e2d14d8ee5c58c9c043a/node_modules/prettier-plugin-tailwindcss/dist/chunk-DSjvVL_1.mjs
|
|
3
3
|
var __create = Object.create;
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
5
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
package/dist/cli-worker.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as sortTailwindClasses, n as formatEmbeddedDoc, r as formatFile, t as formatEmbeddedCode } from "./apis-
|
|
1
|
+
import { i as sortTailwindClasses, n as formatEmbeddedDoc, r as formatFile, t as formatEmbeddedCode } from "./apis-CngUzqDq.js";
|
|
2
2
|
export { formatEmbeddedCode, formatEmbeddedDoc, formatFile, sortTailwindClasses };
|