@wasm-fmt/mago_fmt 0.6.0 → 0.6.2
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/jsr.jsonc +1 -1
- package/mago_fmt_bg.wasm +0 -0
- package/mago_fmt_settings.d.ts +46 -10
- package/package.json +1 -1
package/jsr.jsonc
CHANGED
package/mago_fmt_bg.wasm
CHANGED
|
Binary file
|
package/mago_fmt_settings.d.ts
CHANGED
|
@@ -12,11 +12,12 @@ export interface Settings {
|
|
|
12
12
|
* @remarks Available presets:
|
|
13
13
|
* - `default` - Default preset (PER-CS compatible)
|
|
14
14
|
* - `psr-12` - PSR-12 preset
|
|
15
|
-
* - `pint` -
|
|
16
|
-
* - `
|
|
15
|
+
* - `laravel` / `pint` - Laravel Pint's 'laravel' preset
|
|
16
|
+
* - `drupal` - Drupal's coding standard
|
|
17
|
+
* - `tempest` - Tempest framework compatible
|
|
17
18
|
* - `hack` - Hack preset (`hackfmt` compatible)
|
|
18
19
|
*/
|
|
19
|
-
preset?: "default" | "psr-12" | "pint" | "tempest" | "hack";
|
|
20
|
+
preset?: "default" | "psr-12" | "laravel" | "pint" | "drupal" | "tempest" | "hack";
|
|
20
21
|
|
|
21
22
|
/**
|
|
22
23
|
* Maximum line length that the printer will wrap on.
|
|
@@ -38,7 +39,7 @@ export interface Settings {
|
|
|
38
39
|
|
|
39
40
|
/**
|
|
40
41
|
* End-of-line characters to use.
|
|
41
|
-
* @default "
|
|
42
|
+
* @default "lf"
|
|
42
43
|
*/
|
|
43
44
|
"end-of-line"?: "auto" | "lf" | "crlf" | "cr";
|
|
44
45
|
|
|
@@ -89,8 +90,16 @@ export interface Settings {
|
|
|
89
90
|
* return 'Hello, world!';
|
|
90
91
|
* }
|
|
91
92
|
* ```
|
|
93
|
+
*
|
|
94
|
+
* @example "always-next-line"
|
|
95
|
+
* ```php
|
|
96
|
+
* if ($expr)
|
|
97
|
+
* {
|
|
98
|
+
* return 'Hello, world!';
|
|
99
|
+
* }
|
|
100
|
+
* ```
|
|
92
101
|
*/
|
|
93
|
-
"control-brace-style"?: "same-line" | "next-line";
|
|
102
|
+
"control-brace-style"?: "same-line" | "next-line" | "always-next-line";
|
|
94
103
|
|
|
95
104
|
/**
|
|
96
105
|
* Whether to place `else`, `elseif`, `catch` and `finally` on a new line.
|
|
@@ -116,8 +125,16 @@ export interface Settings {
|
|
|
116
125
|
* return 'Hello, world!';
|
|
117
126
|
* };
|
|
118
127
|
* ```
|
|
128
|
+
*
|
|
129
|
+
* @example "always-next-line"
|
|
130
|
+
* ```php
|
|
131
|
+
* $closure = function()
|
|
132
|
+
* {
|
|
133
|
+
* return 'Hello, world!';
|
|
134
|
+
* };
|
|
135
|
+
* ```
|
|
119
136
|
*/
|
|
120
|
-
"closure-brace-style"?: "same-line" | "next-line";
|
|
137
|
+
"closure-brace-style"?: "same-line" | "next-line" | "always-next-line";
|
|
121
138
|
|
|
122
139
|
/**
|
|
123
140
|
* Brace placement for function declarations.
|
|
@@ -137,8 +154,16 @@ export interface Settings {
|
|
|
137
154
|
* return 'Hello, world!';
|
|
138
155
|
* }
|
|
139
156
|
* ```
|
|
157
|
+
*
|
|
158
|
+
* @example "always-next-line"
|
|
159
|
+
* ```php
|
|
160
|
+
* function foo()
|
|
161
|
+
* {
|
|
162
|
+
* return 'Hello, world!';
|
|
163
|
+
* }
|
|
164
|
+
* ```
|
|
140
165
|
*/
|
|
141
|
-
"function-brace-style"?: "same-line" | "next-line";
|
|
166
|
+
"function-brace-style"?: "same-line" | "next-line" | "always-next-line";
|
|
142
167
|
|
|
143
168
|
/**
|
|
144
169
|
* Brace placement for method declarations.
|
|
@@ -164,8 +189,19 @@ export interface Settings {
|
|
|
164
189
|
* }
|
|
165
190
|
* }
|
|
166
191
|
* ```
|
|
192
|
+
*
|
|
193
|
+
* @example "always-next-line"
|
|
194
|
+
* ```php
|
|
195
|
+
* class Foo
|
|
196
|
+
* {
|
|
197
|
+
* public function bar()
|
|
198
|
+
* {
|
|
199
|
+
* return 'Hello, world!';
|
|
200
|
+
* }
|
|
201
|
+
* }
|
|
202
|
+
* ```
|
|
167
203
|
*/
|
|
168
|
-
"method-brace-style"?: "same-line" | "next-line";
|
|
204
|
+
"method-brace-style"?: "same-line" | "next-line" | "always-next-line";
|
|
169
205
|
|
|
170
206
|
/**
|
|
171
207
|
* Brace placement for class-like structures (classes, interfaces, traits, enums).
|
|
@@ -224,7 +260,7 @@ export interface Settings {
|
|
|
224
260
|
|
|
225
261
|
/**
|
|
226
262
|
* Place empty function bodies on the same line.
|
|
227
|
-
* @default
|
|
263
|
+
* @default true
|
|
228
264
|
*
|
|
229
265
|
* @example false
|
|
230
266
|
* ```php
|
|
@@ -242,7 +278,7 @@ export interface Settings {
|
|
|
242
278
|
|
|
243
279
|
/**
|
|
244
280
|
* Place empty method bodies on the same line.
|
|
245
|
-
* @default
|
|
281
|
+
* @default true
|
|
246
282
|
*
|
|
247
283
|
* @example false
|
|
248
284
|
* ```php
|