scss-prettier 4.0.23 → 4.0.24
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/LICENSE.txt +27 -27
- package/README.md +23 -7
- package/bin/scss-prettier.js +1 -1
- package/package.json +32 -32
package/LICENSE.txt
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
Proprietary License
|
|
2
|
-
|
|
3
|
-
Copyright (c) Daekyung Yoo. All rights reserved.
|
|
4
|
-
|
|
5
|
-
This software and associated documentation files (the "Software") are the
|
|
6
|
-
exclusive property of Daekyung Yoo.
|
|
7
|
-
|
|
8
|
-
1. GRANT OF USE: You are granted a non-exclusive, non-transferable license
|
|
9
|
-
to use the Software solely through official distribution channels
|
|
10
|
-
(Visual Studio Code Marketplace, npm registry, and the author's servers)
|
|
11
|
-
for your personal or internal business purposes.
|
|
12
|
-
|
|
13
|
-
2. RESTRICTIONS: You may NOT, without prior written permission from the
|
|
14
|
-
copyright holder:
|
|
15
|
-
- Copy, modify, merge, or create derivative works of the Software
|
|
16
|
-
- Distribute, sublicense, sell, or transfer the Software
|
|
17
|
-
- Reverse engineer, decompile, or disassemble the Software
|
|
18
|
-
- Remove or alter any proprietary notices or labels
|
|
19
|
-
|
|
20
|
-
3. TERMINATION: This license is effective until terminated. It will
|
|
21
|
-
terminate automatically if you fail to comply with any term of this
|
|
22
|
-
license.
|
|
23
|
-
|
|
24
|
-
4. DISCLAIMER: THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
|
|
25
|
-
KIND, EXPRESS OR IMPLIED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE
|
|
26
|
-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY ARISING FROM THE USE
|
|
27
|
-
OF THE SOFTWARE.
|
|
1
|
+
Proprietary License
|
|
2
|
+
|
|
3
|
+
Copyright (c) Daekyung Yoo. All rights reserved.
|
|
4
|
+
|
|
5
|
+
This software and associated documentation files (the "Software") are the
|
|
6
|
+
exclusive property of Daekyung Yoo.
|
|
7
|
+
|
|
8
|
+
1. GRANT OF USE: You are granted a non-exclusive, non-transferable license
|
|
9
|
+
to use the Software solely through official distribution channels
|
|
10
|
+
(Visual Studio Code Marketplace, npm registry, and the author's servers)
|
|
11
|
+
for your personal or internal business purposes.
|
|
12
|
+
|
|
13
|
+
2. RESTRICTIONS: You may NOT, without prior written permission from the
|
|
14
|
+
copyright holder:
|
|
15
|
+
- Copy, modify, merge, or create derivative works of the Software
|
|
16
|
+
- Distribute, sublicense, sell, or transfer the Software
|
|
17
|
+
- Reverse engineer, decompile, or disassemble the Software
|
|
18
|
+
- Remove or alter any proprietary notices or labels
|
|
19
|
+
|
|
20
|
+
3. TERMINATION: This license is effective until terminated. It will
|
|
21
|
+
terminate automatically if you fail to comply with any term of this
|
|
22
|
+
license.
|
|
23
|
+
|
|
24
|
+
4. DISCLAIMER: THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
|
|
25
|
+
KIND, EXPRESS OR IMPLIED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE
|
|
26
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY ARISING FROM THE USE
|
|
27
|
+
OF THE SOFTWARE.
|
package/README.md
CHANGED
|
@@ -37,10 +37,12 @@ The only formatter that combines **property sorting + inline formatting** in a s
|
|
|
37
37
|
.box { color: red; padding: 10px; background: blue; display: flex; margin: 5px; }
|
|
38
38
|
|
|
39
39
|
/* After - Ctrl+S */
|
|
40
|
-
.box {
|
|
40
|
+
.box {
|
|
41
|
+
display: flex; padding: 10px; margin: 5px; color: red; background: blue;
|
|
42
|
+
}
|
|
41
43
|
```
|
|
42
44
|
|
|
43
|
-
Properties are automatically sorted: **position → display → width → padding → margin →
|
|
45
|
+
Properties are automatically sorted: **position → display → width → padding → margin → color → background**
|
|
44
46
|
|
|
45
47
|
---
|
|
46
48
|
|
|
@@ -71,7 +73,7 @@ Properties on one line — compact and scroll-efficient.
|
|
|
71
73
|
|
|
72
74
|
```scss
|
|
73
75
|
.card {
|
|
74
|
-
display: flex; padding: 20px; margin: 10px;
|
|
76
|
+
display: flex; padding: 20px; margin: 10px; color: #333; background: white;
|
|
75
77
|
}
|
|
76
78
|
```
|
|
77
79
|
|
|
@@ -83,8 +85,8 @@ Each property on its own line — traditional style.
|
|
|
83
85
|
display: flex;
|
|
84
86
|
padding: 20px;
|
|
85
87
|
margin: 10px;
|
|
86
|
-
background: white;
|
|
87
88
|
color: #333;
|
|
89
|
+
background: white;
|
|
88
90
|
}
|
|
89
91
|
```
|
|
90
92
|
|
|
@@ -92,7 +94,7 @@ Each property on its own line — traditional style.
|
|
|
92
94
|
Everything compressed.
|
|
93
95
|
|
|
94
96
|
```scss
|
|
95
|
-
.card{display:flex;padding:20px;margin:10px;background:white;
|
|
97
|
+
.card{display:flex;padding:20px;margin:10px;color:#333;background:white;}
|
|
96
98
|
```
|
|
97
99
|
|
|
98
100
|
Set globally: `"scssPrettier.formatMode": "expanded"`
|
|
@@ -134,18 +136,30 @@ Override per-rule with `///expand` or `///minify` directives.
|
|
|
134
136
|
| `scssPrettier.shorthandCascade` | `true` | Protect shorthand/longhand order |
|
|
135
137
|
| `scssPrettier.removeEmptyRules` | `false` | Remove empty rule blocks |
|
|
136
138
|
| `scssPrettier.duplicateProperties` | `"ignore"` | `ignore` / `warn` / `remove` |
|
|
139
|
+
| `scssPrettier.printWidth` | `0` | Max line length in inline mode (`0` = unlimited) |
|
|
140
|
+
| `scssPrettier.quoteStyle` | `"preserve"` | `preserve` / `single` / `double` |
|
|
141
|
+
| `scssPrettier.sortEnabled` | `true` | Sort properties (`false` keeps the written order) |
|
|
137
142
|
| `scssPrettier.exclude` | `[]` | File patterns to skip |
|
|
138
143
|
| `scssPrettier.debugJson` | `false` | Export AST to JSON |
|
|
139
144
|
|
|
140
145
|
### Workspace Config (`.scssPrettier.json`)
|
|
141
146
|
|
|
147
|
+
Put a config file in your project so the editor, the CLI and the LSP server all format the same way.
|
|
148
|
+
It accepts the same keys as the VS Code settings (without the `scssPrettier.` prefix):
|
|
149
|
+
|
|
142
150
|
```json
|
|
143
151
|
{
|
|
144
|
-
"
|
|
152
|
+
"formatMode": "expanded",
|
|
153
|
+
"indentSize": 2,
|
|
154
|
+
"quoteStyle": "single",
|
|
155
|
+
"propsPriority": ["position", "display", "width", "height", "padding", "margin"],
|
|
156
|
+
"exclude": ["**/vendor/**"]
|
|
145
157
|
}
|
|
146
158
|
```
|
|
147
159
|
|
|
148
|
-
|
|
160
|
+
The nearest `.scssPrettier.json` above the file being formatted is used.
|
|
161
|
+
|
|
162
|
+
Priority: CLI flags > `.scssPrettier.json` > VS Code settings > Defaults
|
|
149
163
|
|
|
150
164
|
---
|
|
151
165
|
|
|
@@ -187,6 +201,8 @@ Custom properties (`--*`) maintain their authored order in any selector.
|
|
|
187
201
|
.box { margin: 10px; margin-left: 0; }
|
|
188
202
|
```
|
|
189
203
|
|
|
204
|
+
Declarations that only partly overlap (`border-left` and `border-color`, `padding-block` and `padding-top`, …) keep the order you wrote them in, because swapping them would change the result.
|
|
205
|
+
|
|
190
206
|
### Vendor Prefix Grouping
|
|
191
207
|
```scss
|
|
192
208
|
/* Grouped together */
|