oxfmt 0.7.0 → 0.8.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.
@@ -5,36 +5,54 @@
5
5
  "type": "object",
6
6
  "properties": {
7
7
  "arrowParens": {
8
- "type": [
9
- "string",
10
- "null"
8
+ "description": "Include parentheses around a sole arrow function parameter. (Default: \"always\")",
9
+ "anyOf": [
10
+ {
11
+ "$ref": "#/definitions/ArrowParensConfig"
12
+ },
13
+ {
14
+ "type": "null"
15
+ }
11
16
  ]
12
17
  },
13
18
  "bracketSameLine": {
19
+ "description": "Put the > of a multi-line JSX element at the end of the last line instead of being alone on the next line. (Default: false)",
14
20
  "type": [
15
21
  "boolean",
16
22
  "null"
17
23
  ]
18
24
  },
19
25
  "bracketSpacing": {
26
+ "description": "Print spaces between brackets in object literals. (Default: true)",
20
27
  "type": [
21
28
  "boolean",
22
29
  "null"
23
30
  ]
24
31
  },
25
32
  "endOfLine": {
26
- "type": [
27
- "string",
28
- "null"
33
+ "description": "Which end of line characters to apply. (Default: \"lf\")",
34
+ "anyOf": [
35
+ {
36
+ "$ref": "#/definitions/EndOfLineConfig"
37
+ },
38
+ {
39
+ "type": "null"
40
+ }
29
41
  ]
30
42
  },
31
43
  "experimentalOperatorPosition": {
32
- "type": [
33
- "string",
34
- "null"
44
+ "description": "Experimental: Position of operators in expressions. (Default: \"end\")",
45
+ "anyOf": [
46
+ {
47
+ "$ref": "#/definitions/OperatorPositionConfig"
48
+ },
49
+ {
50
+ "type": "null"
51
+ }
35
52
  ]
36
53
  },
37
54
  "experimentalSortImports": {
55
+ "description": "Experimental: Sort import statements. Disabled by default.",
38
56
  "anyOf": [
39
57
  {
40
58
  "$ref": "#/definitions/SortImportsConfig"
@@ -44,19 +62,36 @@
44
62
  }
45
63
  ]
46
64
  },
65
+ "ignorePatterns": {
66
+ "description": "Ignore files matching these glob patterns. Current working directory is used as the root.",
67
+ "type": [
68
+ "array",
69
+ "null"
70
+ ],
71
+ "items": {
72
+ "type": "string"
73
+ }
74
+ },
47
75
  "jsxSingleQuote": {
76
+ "description": "Use single quotes instead of double quotes in JSX. (Default: false)",
48
77
  "type": [
49
78
  "boolean",
50
79
  "null"
51
80
  ]
52
81
  },
53
82
  "objectWrap": {
54
- "type": [
55
- "string",
56
- "null"
83
+ "description": "How to wrap object literals when they could fit on one line or span multiple lines. (Default: \"preserve\")\nNOTE: In addition to Prettier's \"preserve\" and \"collapse\", we also support \"always\".",
84
+ "anyOf": [
85
+ {
86
+ "$ref": "#/definitions/ObjectWrapConfig"
87
+ },
88
+ {
89
+ "type": "null"
90
+ }
57
91
  ]
58
92
  },
59
93
  "printWidth": {
94
+ "description": "The line length that the printer will wrap on. (Default: 80)",
60
95
  "type": [
61
96
  "integer",
62
97
  "null"
@@ -65,30 +100,39 @@
65
100
  "minimum": 0.0
66
101
  },
67
102
  "quoteProps": {
68
- "type": [
69
- "string",
70
- "null"
103
+ "description": "Change when properties in objects are quoted. (Default: \"as-needed\")",
104
+ "anyOf": [
105
+ {
106
+ "$ref": "#/definitions/QuotePropsConfig"
107
+ },
108
+ {
109
+ "type": "null"
110
+ }
71
111
  ]
72
112
  },
73
113
  "semi": {
114
+ "description": "Print semicolons at the ends of statements. (Default: true)",
74
115
  "type": [
75
116
  "boolean",
76
117
  "null"
77
118
  ]
78
119
  },
79
120
  "singleAttributePerLine": {
121
+ "description": "Put each attribute on a new line in JSX. (Default: false)",
80
122
  "type": [
81
123
  "boolean",
82
124
  "null"
83
125
  ]
84
126
  },
85
127
  "singleQuote": {
128
+ "description": "Use single quotes instead of double quotes. (Default: false)",
86
129
  "type": [
87
130
  "boolean",
88
131
  "null"
89
132
  ]
90
133
  },
91
134
  "tabWidth": {
135
+ "description": "Number of spaces per indentation level. (Default: 2)",
92
136
  "type": [
93
137
  "integer",
94
138
  "null"
@@ -97,12 +141,18 @@
97
141
  "minimum": 0.0
98
142
  },
99
143
  "trailingComma": {
100
- "type": [
101
- "string",
102
- "null"
144
+ "description": "Print trailing commas wherever possible. (Default: \"all\")",
145
+ "anyOf": [
146
+ {
147
+ "$ref": "#/definitions/TrailingCommaConfig"
148
+ },
149
+ {
150
+ "type": "null"
151
+ }
103
152
  ]
104
153
  },
105
154
  "useTabs": {
155
+ "description": "Use tabs for indentation or spaces. (Default: false)",
106
156
  "type": [
107
157
  "boolean",
108
158
  "null"
@@ -110,6 +160,43 @@
110
160
  }
111
161
  },
112
162
  "definitions": {
163
+ "ArrowParensConfig": {
164
+ "type": "string",
165
+ "enum": [
166
+ "always",
167
+ "avoid"
168
+ ]
169
+ },
170
+ "EndOfLineConfig": {
171
+ "type": "string",
172
+ "enum": [
173
+ "lf",
174
+ "crlf",
175
+ "cr"
176
+ ]
177
+ },
178
+ "ObjectWrapConfig": {
179
+ "type": "string",
180
+ "enum": [
181
+ "preserve",
182
+ "collapse",
183
+ "always"
184
+ ]
185
+ },
186
+ "OperatorPositionConfig": {
187
+ "type": "string",
188
+ "enum": [
189
+ "start",
190
+ "end"
191
+ ]
192
+ },
193
+ "QuotePropsConfig": {
194
+ "type": "string",
195
+ "enum": [
196
+ "as-needed",
197
+ "preserve"
198
+ ]
199
+ },
113
200
  "SortImportsConfig": {
114
201
  "type": "object",
115
202
  "properties": {
@@ -118,8 +205,14 @@
118
205
  "type": "boolean"
119
206
  },
120
207
  "order": {
121
- "default": "asc",
122
- "type": "string"
208
+ "anyOf": [
209
+ {
210
+ "$ref": "#/definitions/SortOrderConfig"
211
+ },
212
+ {
213
+ "type": "null"
214
+ }
215
+ ]
123
216
  },
124
217
  "partitionByComment": {
125
218
  "default": false,
@@ -134,6 +227,21 @@
134
227
  "type": "boolean"
135
228
  }
136
229
  }
230
+ },
231
+ "SortOrderConfig": {
232
+ "type": "string",
233
+ "enum": [
234
+ "asc",
235
+ "desc"
236
+ ]
237
+ },
238
+ "TrailingCommaConfig": {
239
+ "type": "string",
240
+ "enum": [
241
+ "all",
242
+ "es5",
243
+ "none"
244
+ ]
137
245
  }
138
246
  }
139
247
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oxfmt",
3
- "version": "0.7.0",
3
+ "version": "0.8.0",
4
4
  "type": "module",
5
5
  "description": "Formatter for the JavaScript Oxidation Compiler",
6
6
  "keywords": [],
@@ -28,13 +28,13 @@
28
28
  "README.md"
29
29
  ],
30
30
  "optionalDependencies": {
31
- "@oxfmt/win32-x64": "0.7.0",
32
- "@oxfmt/win32-arm64": "0.7.0",
33
- "@oxfmt/linux-x64-gnu": "0.7.0",
34
- "@oxfmt/linux-arm64-gnu": "0.7.0",
35
- "@oxfmt/linux-x64-musl": "0.7.0",
36
- "@oxfmt/linux-arm64-musl": "0.7.0",
37
- "@oxfmt/darwin-x64": "0.7.0",
38
- "@oxfmt/darwin-arm64": "0.7.0"
31
+ "@oxfmt/win32-x64": "0.8.0",
32
+ "@oxfmt/win32-arm64": "0.8.0",
33
+ "@oxfmt/linux-x64-gnu": "0.8.0",
34
+ "@oxfmt/linux-arm64-gnu": "0.8.0",
35
+ "@oxfmt/linux-x64-musl": "0.8.0",
36
+ "@oxfmt/linux-arm64-musl": "0.8.0",
37
+ "@oxfmt/darwin-x64": "0.8.0",
38
+ "@oxfmt/darwin-arm64": "0.8.0"
39
39
  }
40
40
  }