worsier 1.0.6 → 2.0.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 +3 -2
- package/configuration_schema.json +35 -2
- package/dist/types.d.ts +6 -1
- package/package.json +9 -9
package/README.md
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
# Worsier
|
|
2
2
|
|
|
3
|
-
A focused JavaScript, TypeScript, JSX, and TSX
|
|
4
|
-
|
|
3
|
+
A focused JavaScript, TypeScript, JSX, and TSX formatter powered by Rust. It formats static imports
|
|
4
|
+
and the boundaries around runtime variable declarations while preserving the declarations
|
|
5
|
+
themselves.
|
|
5
6
|
Node.js 24.0.0 or newer is required.
|
|
6
7
|
Prebuilt Windows x64 binaries are temporarily unavailable while
|
|
7
8
|
[npm package publication is restored](https://github.com/Perdolique/worsier/issues/11).
|
|
@@ -25,7 +25,11 @@
|
|
|
25
25
|
"rules": {
|
|
26
26
|
"$ref": "#/$defs/RulesConfig",
|
|
27
27
|
"default": {
|
|
28
|
-
"
|
|
28
|
+
"importLayout": true,
|
|
29
|
+
"statementSpacing": {
|
|
30
|
+
"imports": "separate",
|
|
31
|
+
"variableDeclarations": "separate"
|
|
32
|
+
}
|
|
29
33
|
}
|
|
30
34
|
},
|
|
31
35
|
"verifyAst": {
|
|
@@ -38,12 +42,41 @@
|
|
|
38
42
|
"RulesConfig": {
|
|
39
43
|
"type": "object",
|
|
40
44
|
"properties": {
|
|
41
|
-
"
|
|
45
|
+
"importLayout": {
|
|
42
46
|
"type": "boolean",
|
|
43
47
|
"default": true
|
|
48
|
+
},
|
|
49
|
+
"statementSpacing": {
|
|
50
|
+
"$ref": "#/$defs/StatementSpacingConfig",
|
|
51
|
+
"default": {
|
|
52
|
+
"imports": "separate",
|
|
53
|
+
"variableDeclarations": "separate"
|
|
54
|
+
}
|
|
44
55
|
}
|
|
45
56
|
},
|
|
46
57
|
"additionalProperties": false
|
|
58
|
+
},
|
|
59
|
+
"StatementSpacingConfig": {
|
|
60
|
+
"type": "object",
|
|
61
|
+
"properties": {
|
|
62
|
+
"imports": {
|
|
63
|
+
"$ref": "#/$defs/StatementSpacingMode",
|
|
64
|
+
"default": "separate"
|
|
65
|
+
},
|
|
66
|
+
"variableDeclarations": {
|
|
67
|
+
"$ref": "#/$defs/StatementSpacingMode",
|
|
68
|
+
"default": "separate"
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
"additionalProperties": false
|
|
72
|
+
},
|
|
73
|
+
"StatementSpacingMode": {
|
|
74
|
+
"type": "string",
|
|
75
|
+
"enum": [
|
|
76
|
+
"separate",
|
|
77
|
+
"compact",
|
|
78
|
+
"off"
|
|
79
|
+
]
|
|
47
80
|
}
|
|
48
81
|
}
|
|
49
82
|
}
|
package/dist/types.d.ts
CHANGED
|
@@ -6,5 +6,10 @@ export interface FormatConfig {
|
|
|
6
6
|
verifyAst?: boolean;
|
|
7
7
|
}
|
|
8
8
|
export interface RulesConfig {
|
|
9
|
-
|
|
9
|
+
importLayout?: boolean;
|
|
10
|
+
statementSpacing?: StatementSpacingConfig;
|
|
11
|
+
}
|
|
12
|
+
export interface StatementSpacingConfig {
|
|
13
|
+
imports?: 'separate' | 'compact' | 'off';
|
|
14
|
+
variableDeclarations?: 'separate' | 'compact' | 'off';
|
|
10
15
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "worsier",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "A focused JavaScript and TypeScript import formatter powered by Rust",
|
|
3
|
+
"version": "2.0.0",
|
|
4
|
+
"description": "A focused JavaScript and TypeScript import and variable-boundary formatter powered by Rust",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -48,13 +48,13 @@
|
|
|
48
48
|
]
|
|
49
49
|
},
|
|
50
50
|
"optionalDependencies": {
|
|
51
|
-
"worsier-darwin-arm64": "
|
|
52
|
-
"worsier-win32-arm64-msvc": "
|
|
53
|
-
"worsier-linux-arm64-gnu": "
|
|
54
|
-
"worsier-linux-arm64-musl": "
|
|
55
|
-
"worsier-darwin-x64": "
|
|
56
|
-
"worsier-linux-x64-gnu": "
|
|
57
|
-
"worsier-linux-x64-musl": "
|
|
51
|
+
"worsier-darwin-arm64": "2.0.0",
|
|
52
|
+
"worsier-win32-arm64-msvc": "2.0.0",
|
|
53
|
+
"worsier-linux-arm64-gnu": "2.0.0",
|
|
54
|
+
"worsier-linux-arm64-musl": "2.0.0",
|
|
55
|
+
"worsier-darwin-x64": "2.0.0",
|
|
56
|
+
"worsier-linux-x64-gnu": "2.0.0",
|
|
57
|
+
"worsier-linux-x64-musl": "2.0.0"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"@types/node": "26.2.0",
|