@mrhenry/stylelint-mrhenry-prop-order 1.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/LICENSE +21 -0
- package/README.md +10 -0
- package/order.js +591 -0
- package/package.json +35 -0
- package/stylelint-mrhenry-prop-order.js +103 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023 Mr. Henry
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
package/order.js
ADDED
|
@@ -0,0 +1,591 @@
|
|
|
1
|
+
module.exports = [
|
|
2
|
+
"accent-color",
|
|
3
|
+
"align-content",
|
|
4
|
+
"align-items",
|
|
5
|
+
"align-self",
|
|
6
|
+
"align-tracks",
|
|
7
|
+
"alignment-baseline",
|
|
8
|
+
"all",
|
|
9
|
+
"anchor-name",
|
|
10
|
+
"anchor-scroll",
|
|
11
|
+
"animation",
|
|
12
|
+
"animation-composition",
|
|
13
|
+
"animation-delay",
|
|
14
|
+
"animation-delay-start",
|
|
15
|
+
"animation-delay-end",
|
|
16
|
+
"animation-direction",
|
|
17
|
+
"animation-duration",
|
|
18
|
+
"animation-fill-mode",
|
|
19
|
+
"animation-iteration-count",
|
|
20
|
+
"animation-name",
|
|
21
|
+
"animation-play-state",
|
|
22
|
+
"animation-range",
|
|
23
|
+
"animation-timeline",
|
|
24
|
+
"animation-timing-function",
|
|
25
|
+
"appearance",
|
|
26
|
+
"aspect-ratio",
|
|
27
|
+
"backdrop-filter",
|
|
28
|
+
"backface-visibility",
|
|
29
|
+
"background",
|
|
30
|
+
"background-attachment",
|
|
31
|
+
"background-blend-mode",
|
|
32
|
+
"background-clip",
|
|
33
|
+
"background-color",
|
|
34
|
+
"background-image",
|
|
35
|
+
"background-origin",
|
|
36
|
+
"background-position",
|
|
37
|
+
"background-position-block",
|
|
38
|
+
"background-position-inline",
|
|
39
|
+
"background-position-x",
|
|
40
|
+
"background-position-y",
|
|
41
|
+
"background-repeat",
|
|
42
|
+
"background-size",
|
|
43
|
+
"baseline-shift",
|
|
44
|
+
"baseline-source",
|
|
45
|
+
"block-ellipsis",
|
|
46
|
+
"block-size",
|
|
47
|
+
"block-step",
|
|
48
|
+
"block-step-align",
|
|
49
|
+
"block-step-insert",
|
|
50
|
+
"block-step-round",
|
|
51
|
+
"block-step-size",
|
|
52
|
+
"bookmark-label",
|
|
53
|
+
"bookmark-level",
|
|
54
|
+
"bookmark-state",
|
|
55
|
+
"border",
|
|
56
|
+
"border-color",
|
|
57
|
+
"border-limit",
|
|
58
|
+
"border-radius",
|
|
59
|
+
"border-spacing",
|
|
60
|
+
"border-style",
|
|
61
|
+
"border-width",
|
|
62
|
+
"border-block",
|
|
63
|
+
"border-block-color",
|
|
64
|
+
"border-block-start",
|
|
65
|
+
"border-block-start-color",
|
|
66
|
+
"border-block-start-style",
|
|
67
|
+
"border-block-start-width",
|
|
68
|
+
"border-block-end",
|
|
69
|
+
"border-block-end-color",
|
|
70
|
+
"border-block-end-style",
|
|
71
|
+
"border-block-end-width",
|
|
72
|
+
"border-block-style",
|
|
73
|
+
"border-block-width",
|
|
74
|
+
"border-inline",
|
|
75
|
+
"border-inline-color",
|
|
76
|
+
"border-inline-start",
|
|
77
|
+
"border-inline-start-color",
|
|
78
|
+
"border-inline-start-style",
|
|
79
|
+
"border-inline-start-width",
|
|
80
|
+
"border-inline-end",
|
|
81
|
+
"border-inline-end-color",
|
|
82
|
+
"border-inline-end-style",
|
|
83
|
+
"border-inline-end-width",
|
|
84
|
+
"border-inline-style",
|
|
85
|
+
"border-inline-width",
|
|
86
|
+
"border-top",
|
|
87
|
+
"border-top-color",
|
|
88
|
+
"border-top-left-radius",
|
|
89
|
+
"border-top-right-radius",
|
|
90
|
+
"border-top-style",
|
|
91
|
+
"border-top-width",
|
|
92
|
+
"border-right",
|
|
93
|
+
"border-right-color",
|
|
94
|
+
"border-right-style",
|
|
95
|
+
"border-right-width",
|
|
96
|
+
"border-bottom",
|
|
97
|
+
"border-bottom-color",
|
|
98
|
+
"border-bottom-left-radius",
|
|
99
|
+
"border-bottom-right-radius",
|
|
100
|
+
"border-bottom-style",
|
|
101
|
+
"border-bottom-width",
|
|
102
|
+
"border-left",
|
|
103
|
+
"border-left-color",
|
|
104
|
+
"border-left-style",
|
|
105
|
+
"border-left-width",
|
|
106
|
+
"border-start-start-radius",
|
|
107
|
+
"border-start-end-radius",
|
|
108
|
+
"border-end-end-radius",
|
|
109
|
+
"border-end-start-radius",
|
|
110
|
+
"border-boundary",
|
|
111
|
+
"border-clip",
|
|
112
|
+
"border-clip-bottom",
|
|
113
|
+
"border-clip-left",
|
|
114
|
+
"border-clip-right",
|
|
115
|
+
"border-clip-top",
|
|
116
|
+
"border-collapse",
|
|
117
|
+
"border-image",
|
|
118
|
+
"border-image-outset",
|
|
119
|
+
"border-image-repeat",
|
|
120
|
+
"border-image-slice",
|
|
121
|
+
"border-image-source",
|
|
122
|
+
"border-image-width",
|
|
123
|
+
"box-decoration-break",
|
|
124
|
+
"box-shadow",
|
|
125
|
+
"box-sizing",
|
|
126
|
+
"box-snap",
|
|
127
|
+
"break-before",
|
|
128
|
+
"break-after",
|
|
129
|
+
"break-inside",
|
|
130
|
+
"caption-side",
|
|
131
|
+
"caret",
|
|
132
|
+
"caret-color",
|
|
133
|
+
"caret-shape",
|
|
134
|
+
"clear",
|
|
135
|
+
"clip",
|
|
136
|
+
"clip-path",
|
|
137
|
+
"clip-rule",
|
|
138
|
+
"color",
|
|
139
|
+
"color-adjust",
|
|
140
|
+
"color-interpolation",
|
|
141
|
+
"color-interpolation-filters",
|
|
142
|
+
"color-scheme",
|
|
143
|
+
"column-count",
|
|
144
|
+
"column-fill",
|
|
145
|
+
"column-gap",
|
|
146
|
+
"column-rule",
|
|
147
|
+
"column-rule-color",
|
|
148
|
+
"column-rule-style",
|
|
149
|
+
"column-rule-width",
|
|
150
|
+
"column-span",
|
|
151
|
+
"column-width",
|
|
152
|
+
"columns",
|
|
153
|
+
"contain",
|
|
154
|
+
"contain-intrinsic-block-size",
|
|
155
|
+
"contain-intrinsic-width",
|
|
156
|
+
"contain-intrinsic-height",
|
|
157
|
+
"contain-intrinsic-inline-size",
|
|
158
|
+
"contain-intrinsic-size",
|
|
159
|
+
"container",
|
|
160
|
+
"container-name",
|
|
161
|
+
"container-type",
|
|
162
|
+
"content",
|
|
163
|
+
"content-visibility",
|
|
164
|
+
"continue",
|
|
165
|
+
"copy-into",
|
|
166
|
+
"corner-shape",
|
|
167
|
+
"corners",
|
|
168
|
+
"counter-increment",
|
|
169
|
+
"counter-reset",
|
|
170
|
+
"counter-set",
|
|
171
|
+
"cue",
|
|
172
|
+
"cue-after",
|
|
173
|
+
"cue-before",
|
|
174
|
+
"cursor",
|
|
175
|
+
"cx",
|
|
176
|
+
"cy",
|
|
177
|
+
"d",
|
|
178
|
+
"direction",
|
|
179
|
+
"display",
|
|
180
|
+
"dominant-baseline",
|
|
181
|
+
"empty-cells",
|
|
182
|
+
"fill",
|
|
183
|
+
"fill-break",
|
|
184
|
+
"fill-color",
|
|
185
|
+
"fill-image",
|
|
186
|
+
"fill-opacity",
|
|
187
|
+
"fill-origin",
|
|
188
|
+
"fill-position",
|
|
189
|
+
"fill-repeat",
|
|
190
|
+
"fill-rule",
|
|
191
|
+
"fill-size",
|
|
192
|
+
"filter",
|
|
193
|
+
"flex",
|
|
194
|
+
"flex-basis",
|
|
195
|
+
"flex-grow",
|
|
196
|
+
"flex-shrink",
|
|
197
|
+
"flex-flow",
|
|
198
|
+
"flex-direction",
|
|
199
|
+
"flex-wrap",
|
|
200
|
+
"float",
|
|
201
|
+
"float-defer",
|
|
202
|
+
"float-offset",
|
|
203
|
+
"float-reference",
|
|
204
|
+
"flood-color",
|
|
205
|
+
"flood-opacity",
|
|
206
|
+
"flow-from",
|
|
207
|
+
"flow-into",
|
|
208
|
+
"font",
|
|
209
|
+
"font-family",
|
|
210
|
+
"font-feature-settings",
|
|
211
|
+
"font-kerning",
|
|
212
|
+
"font-language-override",
|
|
213
|
+
"font-optical-sizing",
|
|
214
|
+
"font-palette",
|
|
215
|
+
"font-size",
|
|
216
|
+
"font-size-adjust",
|
|
217
|
+
"font-stretch",
|
|
218
|
+
"font-style",
|
|
219
|
+
"font-synthesis",
|
|
220
|
+
"font-synthesis-small-caps",
|
|
221
|
+
"font-synthesis-style",
|
|
222
|
+
"font-synthesis-weight",
|
|
223
|
+
"font-variant",
|
|
224
|
+
"font-variant-alternates",
|
|
225
|
+
"font-variant-caps",
|
|
226
|
+
"font-variant-east-asian",
|
|
227
|
+
"font-variant-emoji",
|
|
228
|
+
"font-variant-ligatures",
|
|
229
|
+
"font-variant-numeric",
|
|
230
|
+
"font-variant-position",
|
|
231
|
+
"font-variation-settings",
|
|
232
|
+
"font-weight",
|
|
233
|
+
"footnote-display",
|
|
234
|
+
"footnote-policy",
|
|
235
|
+
"forced-color-adjust",
|
|
236
|
+
"gap",
|
|
237
|
+
"glyph-orientation-vertical",
|
|
238
|
+
"grid",
|
|
239
|
+
"grid-gap",
|
|
240
|
+
"grid-area",
|
|
241
|
+
"grid-row",
|
|
242
|
+
"grid-row-start",
|
|
243
|
+
"grid-row-end",
|
|
244
|
+
"grid-row-gap",
|
|
245
|
+
"grid-column",
|
|
246
|
+
"grid-column-start",
|
|
247
|
+
"grid-column-end",
|
|
248
|
+
"grid-column-gap",
|
|
249
|
+
"grid-auto-rows",
|
|
250
|
+
"grid-auto-columns",
|
|
251
|
+
"grid-auto-flow",
|
|
252
|
+
"grid-template",
|
|
253
|
+
"grid-template-areas",
|
|
254
|
+
"grid-template-rows",
|
|
255
|
+
"grid-template-columns",
|
|
256
|
+
"hanging-punctuation",
|
|
257
|
+
"hyphenate-character",
|
|
258
|
+
"hyphenate-limit-chars",
|
|
259
|
+
"hyphenate-limit-last",
|
|
260
|
+
"hyphenate-limit-lines",
|
|
261
|
+
"hyphenate-limit-zone",
|
|
262
|
+
"hyphens",
|
|
263
|
+
"image-orientation",
|
|
264
|
+
"image-rendering",
|
|
265
|
+
"image-resolution",
|
|
266
|
+
"initial-letter",
|
|
267
|
+
"initial-letter-align",
|
|
268
|
+
"initial-letter-wrap",
|
|
269
|
+
"inline-size",
|
|
270
|
+
"inline-sizing",
|
|
271
|
+
"input-security",
|
|
272
|
+
"inset",
|
|
273
|
+
"inset-block",
|
|
274
|
+
"inset-block-start",
|
|
275
|
+
"inset-block-end",
|
|
276
|
+
"inset-inline",
|
|
277
|
+
"inset-inline-start",
|
|
278
|
+
"inset-inline-end",
|
|
279
|
+
"isolation",
|
|
280
|
+
"justify-content",
|
|
281
|
+
"justify-items",
|
|
282
|
+
"justify-self",
|
|
283
|
+
"justify-tracks",
|
|
284
|
+
"leading-trim",
|
|
285
|
+
"letter-spacing",
|
|
286
|
+
"lighting-color",
|
|
287
|
+
"line-break",
|
|
288
|
+
"line-clamp",
|
|
289
|
+
"line-grid",
|
|
290
|
+
"line-height",
|
|
291
|
+
"line-height-step",
|
|
292
|
+
"line-padding",
|
|
293
|
+
"line-snap",
|
|
294
|
+
"list-style",
|
|
295
|
+
"list-style-image",
|
|
296
|
+
"list-style-position",
|
|
297
|
+
"list-style-type",
|
|
298
|
+
"margin",
|
|
299
|
+
"margin-block",
|
|
300
|
+
"margin-block-start",
|
|
301
|
+
"margin-block-end",
|
|
302
|
+
"margin-inline",
|
|
303
|
+
"margin-inline-start",
|
|
304
|
+
"margin-inline-end",
|
|
305
|
+
"margin-break",
|
|
306
|
+
"margin-top",
|
|
307
|
+
"margin-right",
|
|
308
|
+
"margin-bottom",
|
|
309
|
+
"margin-left",
|
|
310
|
+
"margin-trim",
|
|
311
|
+
"marker",
|
|
312
|
+
"marker-start",
|
|
313
|
+
"marker-end",
|
|
314
|
+
"marker-mid",
|
|
315
|
+
"marker-side",
|
|
316
|
+
"mask",
|
|
317
|
+
"mask-border",
|
|
318
|
+
"mask-border-mode",
|
|
319
|
+
"mask-border-outset",
|
|
320
|
+
"mask-border-repeat",
|
|
321
|
+
"mask-border-slice",
|
|
322
|
+
"mask-border-source",
|
|
323
|
+
"mask-border-width",
|
|
324
|
+
"mask-clip",
|
|
325
|
+
"mask-composite",
|
|
326
|
+
"mask-image",
|
|
327
|
+
"mask-mode",
|
|
328
|
+
"mask-origin",
|
|
329
|
+
"mask-position",
|
|
330
|
+
"mask-repeat",
|
|
331
|
+
"mask-size",
|
|
332
|
+
"mask-type",
|
|
333
|
+
"masonry-auto-flow",
|
|
334
|
+
"math-depth",
|
|
335
|
+
"math-shift",
|
|
336
|
+
"math-style",
|
|
337
|
+
"max-width",
|
|
338
|
+
"max-height",
|
|
339
|
+
"max-block-size",
|
|
340
|
+
"max-inline-size",
|
|
341
|
+
"max-lines",
|
|
342
|
+
"min-width",
|
|
343
|
+
"min-height",
|
|
344
|
+
"min-block-size",
|
|
345
|
+
"min-inline-size",
|
|
346
|
+
"min-intrinsic-sizing",
|
|
347
|
+
"mix-blend-mode",
|
|
348
|
+
"nav-up",
|
|
349
|
+
"nav-right",
|
|
350
|
+
"nav-down",
|
|
351
|
+
"nav-left",
|
|
352
|
+
"object-fit",
|
|
353
|
+
"object-position",
|
|
354
|
+
"object-view-box",
|
|
355
|
+
"offset",
|
|
356
|
+
"offset-anchor",
|
|
357
|
+
"offset-distance",
|
|
358
|
+
"offset-path",
|
|
359
|
+
"offset-position",
|
|
360
|
+
"offset-rotate",
|
|
361
|
+
"opacity",
|
|
362
|
+
"order",
|
|
363
|
+
"orphans",
|
|
364
|
+
"outline",
|
|
365
|
+
"outline-color",
|
|
366
|
+
"outline-style",
|
|
367
|
+
"outline-width",
|
|
368
|
+
"outline-offset",
|
|
369
|
+
"overflow",
|
|
370
|
+
"overflow-x",
|
|
371
|
+
"overflow-y",
|
|
372
|
+
"overflow-anchor",
|
|
373
|
+
"overflow-block",
|
|
374
|
+
"overflow-clip-margin",
|
|
375
|
+
"overflow-inline",
|
|
376
|
+
"overflow-wrap",
|
|
377
|
+
"overscroll-behavior",
|
|
378
|
+
"overscroll-behavior-block",
|
|
379
|
+
"overscroll-behavior-inline",
|
|
380
|
+
"overscroll-behavior-x",
|
|
381
|
+
"overscroll-behavior-y",
|
|
382
|
+
"padding",
|
|
383
|
+
"padding-block",
|
|
384
|
+
"padding-block-start",
|
|
385
|
+
"padding-block-end",
|
|
386
|
+
"padding-inline",
|
|
387
|
+
"padding-inline-start",
|
|
388
|
+
"padding-inline-end",
|
|
389
|
+
"padding-top",
|
|
390
|
+
"padding-right",
|
|
391
|
+
"padding-bottom",
|
|
392
|
+
"padding-left",
|
|
393
|
+
"page",
|
|
394
|
+
"page-break-before",
|
|
395
|
+
"page-break-after",
|
|
396
|
+
"page-break-inside",
|
|
397
|
+
"paint-order",
|
|
398
|
+
"pause",
|
|
399
|
+
"pause-before",
|
|
400
|
+
"pause-after",
|
|
401
|
+
"perspective",
|
|
402
|
+
"perspective-origin",
|
|
403
|
+
"place-content",
|
|
404
|
+
"place-items",
|
|
405
|
+
"place-self",
|
|
406
|
+
"pointer-events",
|
|
407
|
+
"position",
|
|
408
|
+
"position-fallback",
|
|
409
|
+
"print-color-adjust",
|
|
410
|
+
"quotes",
|
|
411
|
+
"r",
|
|
412
|
+
"region-fragment",
|
|
413
|
+
"resize",
|
|
414
|
+
"rest",
|
|
415
|
+
"rest-before",
|
|
416
|
+
"rest-after",
|
|
417
|
+
"rotate",
|
|
418
|
+
"row-gap",
|
|
419
|
+
"ruby-align",
|
|
420
|
+
"ruby-merge",
|
|
421
|
+
"ruby-overhang",
|
|
422
|
+
"ruby-position",
|
|
423
|
+
"rx",
|
|
424
|
+
"ry",
|
|
425
|
+
"scale",
|
|
426
|
+
"scroll-behavior",
|
|
427
|
+
"scroll-margin",
|
|
428
|
+
"scroll-margin-block",
|
|
429
|
+
"scroll-margin-block-start",
|
|
430
|
+
"scroll-margin-block-end",
|
|
431
|
+
"scroll-margin-inline",
|
|
432
|
+
"scroll-margin-inline-start",
|
|
433
|
+
"scroll-margin-inline-end",
|
|
434
|
+
"scroll-margin-top",
|
|
435
|
+
"scroll-margin-right",
|
|
436
|
+
"scroll-margin-bottom",
|
|
437
|
+
"scroll-margin-left",
|
|
438
|
+
"scroll-padding",
|
|
439
|
+
"scroll-padding-block",
|
|
440
|
+
"scroll-padding-block-start",
|
|
441
|
+
"scroll-padding-block-end",
|
|
442
|
+
"scroll-padding-inline",
|
|
443
|
+
"scroll-padding-inline-start",
|
|
444
|
+
"scroll-padding-inline-end",
|
|
445
|
+
"scroll-padding-top",
|
|
446
|
+
"scroll-padding-right",
|
|
447
|
+
"scroll-padding-bottom",
|
|
448
|
+
"scroll-padding-left",
|
|
449
|
+
"scroll-snap-align",
|
|
450
|
+
"scroll-snap-stop",
|
|
451
|
+
"scroll-snap-type",
|
|
452
|
+
"scroll-start",
|
|
453
|
+
"scroll-start-block",
|
|
454
|
+
"scroll-start-inline",
|
|
455
|
+
"scroll-start-target",
|
|
456
|
+
"scroll-start-x",
|
|
457
|
+
"scroll-start-y",
|
|
458
|
+
"scroll-timeline",
|
|
459
|
+
"scroll-timeline-axis",
|
|
460
|
+
"scroll-timeline-name",
|
|
461
|
+
"scrollbar-color",
|
|
462
|
+
"scrollbar-gutter",
|
|
463
|
+
"scrollbar-width",
|
|
464
|
+
"shape-image-threshold",
|
|
465
|
+
"shape-inside",
|
|
466
|
+
"shape-margin",
|
|
467
|
+
"shape-outside",
|
|
468
|
+
"shape-padding",
|
|
469
|
+
"shape-rendering",
|
|
470
|
+
"shape-subtract",
|
|
471
|
+
"spatial-navigation-action",
|
|
472
|
+
"spatial-navigation-contain",
|
|
473
|
+
"spatial-navigation-function",
|
|
474
|
+
"speak",
|
|
475
|
+
"speak-as",
|
|
476
|
+
"stop-color",
|
|
477
|
+
"stop-opacity",
|
|
478
|
+
"string-set",
|
|
479
|
+
"stroke",
|
|
480
|
+
"stroke-align",
|
|
481
|
+
"stroke-alignment",
|
|
482
|
+
"stroke-break",
|
|
483
|
+
"stroke-color",
|
|
484
|
+
"stroke-dash-corner",
|
|
485
|
+
"stroke-dash-justify",
|
|
486
|
+
"stroke-dashadjust",
|
|
487
|
+
"stroke-dasharray",
|
|
488
|
+
"stroke-dashcorner",
|
|
489
|
+
"stroke-dashoffset",
|
|
490
|
+
"stroke-image",
|
|
491
|
+
"stroke-linecap",
|
|
492
|
+
"stroke-linejoin",
|
|
493
|
+
"stroke-miterlimit",
|
|
494
|
+
"stroke-opacity",
|
|
495
|
+
"stroke-origin",
|
|
496
|
+
"stroke-position",
|
|
497
|
+
"stroke-repeat",
|
|
498
|
+
"stroke-size",
|
|
499
|
+
"stroke-width",
|
|
500
|
+
"tab-size",
|
|
501
|
+
"table-layout",
|
|
502
|
+
"text-align",
|
|
503
|
+
"text-align-all",
|
|
504
|
+
"text-align-last",
|
|
505
|
+
"text-anchor",
|
|
506
|
+
"text-combine-upright",
|
|
507
|
+
"text-decoration",
|
|
508
|
+
"text-decoration-color",
|
|
509
|
+
"text-decoration-line",
|
|
510
|
+
"text-decoration-style",
|
|
511
|
+
"text-decoration-thickness",
|
|
512
|
+
"text-decoration-skip",
|
|
513
|
+
"text-decoration-skip-box",
|
|
514
|
+
"text-decoration-skip-ink",
|
|
515
|
+
"text-decoration-skip-self",
|
|
516
|
+
"text-decoration-skip-spaces",
|
|
517
|
+
"text-decoration-trim",
|
|
518
|
+
"text-edge",
|
|
519
|
+
"text-emphasis",
|
|
520
|
+
"text-emphasis-color",
|
|
521
|
+
"text-emphasis-style",
|
|
522
|
+
"text-emphasis-position",
|
|
523
|
+
"text-emphasis-skip",
|
|
524
|
+
"text-group-align",
|
|
525
|
+
"text-indent",
|
|
526
|
+
"text-justify",
|
|
527
|
+
"text-orientation",
|
|
528
|
+
"text-overflow",
|
|
529
|
+
"text-rendering",
|
|
530
|
+
"text-shadow",
|
|
531
|
+
"text-size-adjust",
|
|
532
|
+
"text-space-collapse",
|
|
533
|
+
"text-space-trim",
|
|
534
|
+
"text-spacing",
|
|
535
|
+
"text-transform",
|
|
536
|
+
"text-underline-offset",
|
|
537
|
+
"text-underline-position",
|
|
538
|
+
"text-wrap",
|
|
539
|
+
"top",
|
|
540
|
+
"right",
|
|
541
|
+
"bottom",
|
|
542
|
+
"left",
|
|
543
|
+
"touch-action",
|
|
544
|
+
"transform",
|
|
545
|
+
"transform-box",
|
|
546
|
+
"transform-origin",
|
|
547
|
+
"transform-style",
|
|
548
|
+
"transition",
|
|
549
|
+
"transition-delay",
|
|
550
|
+
"transition-duration",
|
|
551
|
+
"transition-property",
|
|
552
|
+
"transition-timing-function",
|
|
553
|
+
"translate",
|
|
554
|
+
"unicode-bidi",
|
|
555
|
+
"user-select",
|
|
556
|
+
"vector-effect",
|
|
557
|
+
"vertical-align",
|
|
558
|
+
"view-timeline",
|
|
559
|
+
"view-timeline-axis",
|
|
560
|
+
"view-timeline-inset",
|
|
561
|
+
"view-timeline-name",
|
|
562
|
+
"view-transition-name",
|
|
563
|
+
"visibility",
|
|
564
|
+
"voice-balance",
|
|
565
|
+
"voice-duration",
|
|
566
|
+
"voice-family",
|
|
567
|
+
"voice-pitch",
|
|
568
|
+
"voice-range",
|
|
569
|
+
"voice-rate",
|
|
570
|
+
"voice-stress",
|
|
571
|
+
"voice-volume",
|
|
572
|
+
"white-space",
|
|
573
|
+
"widows",
|
|
574
|
+
"width",
|
|
575
|
+
"height",
|
|
576
|
+
"will-change",
|
|
577
|
+
"word-boundary-detection",
|
|
578
|
+
"word-boundary-expansion",
|
|
579
|
+
"word-break",
|
|
580
|
+
"word-spacing",
|
|
581
|
+
"word-wrap",
|
|
582
|
+
"wrap-before",
|
|
583
|
+
"wrap-after",
|
|
584
|
+
"wrap-flow",
|
|
585
|
+
"wrap-inside",
|
|
586
|
+
"wrap-through",
|
|
587
|
+
"writing-mode",
|
|
588
|
+
"x",
|
|
589
|
+
"y",
|
|
590
|
+
"z-index"
|
|
591
|
+
]
|
package/package.json
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@mrhenry/stylelint-mrhenry-prop-order",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "styelint-mrhenry-prop-order.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"test": "npm run test:jest && npm run test:properties-list",
|
|
8
|
+
"test:jest": "c8 --100 jest",
|
|
9
|
+
"test:properties-list": "node verify-properties-list.mjs"
|
|
10
|
+
},
|
|
11
|
+
"author": "Mr. Henry",
|
|
12
|
+
"license": "MIT",
|
|
13
|
+
"files": [
|
|
14
|
+
"order.js",
|
|
15
|
+
"stylelint-mrhenry-prop-order.js",
|
|
16
|
+
"LICENSE"
|
|
17
|
+
],
|
|
18
|
+
"jest": {
|
|
19
|
+
"preset": "jest-preset-stylelint"
|
|
20
|
+
},
|
|
21
|
+
"keywords": [
|
|
22
|
+
"stylelint",
|
|
23
|
+
"stylelint-plugin"
|
|
24
|
+
],
|
|
25
|
+
"peerDependencies": {
|
|
26
|
+
"stylelint": "^14.16.1"
|
|
27
|
+
},
|
|
28
|
+
"devDependencies": {
|
|
29
|
+
"@webref/css": "^6.1.1",
|
|
30
|
+
"c8": "^7.12.0",
|
|
31
|
+
"jest": "^29.3.1",
|
|
32
|
+
"jest-preset-stylelint": "^6.0.0",
|
|
33
|
+
"stylelint": "^14.16.1"
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
const stylelint = require("stylelint");
|
|
2
|
+
const order = require('./order.js');
|
|
3
|
+
const orderSet = new Set(order);
|
|
4
|
+
|
|
5
|
+
const ruleName = "plugin/stylelint-mrhenry-prop-order";
|
|
6
|
+
const messages = stylelint.utils.ruleMessages(ruleName, {
|
|
7
|
+
expected: (name) => {
|
|
8
|
+
return `Expected ${name} to appear at a different position.`;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
const meta = {
|
|
13
|
+
url: "https://github.com/mrhenry/stylelint-mrhenry-prop-order"
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
const ruleFunction = (primaryOption, secondaryOptionObject, context) => {
|
|
17
|
+
return (postcssRoot, postcssResult) => {
|
|
18
|
+
postcssRoot.walkRules((rule) => {
|
|
19
|
+
let parent = rule.parent;
|
|
20
|
+
while (parent) {
|
|
21
|
+
if (parent.type === 'atrule' && parent.name.toLowerCase() === 'font-face') {
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
parent = parent.parent
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
if (!rule.nodes.length) {
|
|
29
|
+
/* c8 ignore next */
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
let declarationsSections = [[]]
|
|
34
|
+
for (let i = 0; i < rule.nodes.length; i++) {
|
|
35
|
+
if (
|
|
36
|
+
rule.nodes[i].type === 'decl' &&
|
|
37
|
+
!rule.nodes[i].variable &&
|
|
38
|
+
orderSet.has(rule.nodes[i].prop.toLowerCase())
|
|
39
|
+
) {
|
|
40
|
+
if ((rule.nodes[i].raws?.before?.match(/\n/g) || []).length >= 2) {
|
|
41
|
+
declarationsSections.push([])
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
declarationsSections.at(-1).push(rule.nodes[i]);
|
|
45
|
+
|
|
46
|
+
continue;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
declarationsSections.push([])
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
declarationsSections = declarationsSections.filter((x) => {
|
|
53
|
+
return x.length > 1
|
|
54
|
+
})
|
|
55
|
+
|
|
56
|
+
declarationsSections.forEach((section) => {
|
|
57
|
+
section.sort((a, b) => {
|
|
58
|
+
return order.indexOf(a.prop.toLowerCase()) - order.indexOf(b.prop.toLowerCase());
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
const firstNodeIndex = Math.min.apply(Math, section.map((x) => rule.index(x)));
|
|
62
|
+
const originalFirstNode = rule.nodes[firstNodeIndex];
|
|
63
|
+
|
|
64
|
+
section.forEach((decl, index) => {
|
|
65
|
+
const desiredIndex = firstNodeIndex + index;
|
|
66
|
+
if (rule.index(decl) === desiredIndex) {
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
if (context.fix) {
|
|
71
|
+
rule.insertBefore(desiredIndex, decl)
|
|
72
|
+
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
if (index < section.length - 1) {
|
|
77
|
+
stylelint.utils.report({
|
|
78
|
+
message: messages.expected(decl.prop),
|
|
79
|
+
node: decl,
|
|
80
|
+
index: 0,
|
|
81
|
+
endIndex: decl.prop.length,
|
|
82
|
+
result: postcssResult,
|
|
83
|
+
ruleName,
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
const finalFirstNode = rule.nodes[firstNodeIndex];
|
|
89
|
+
if (originalFirstNode.raws.before && finalFirstNode.raws.before) {
|
|
90
|
+
const originalRawBefore = originalFirstNode.raws.before;
|
|
91
|
+
originalFirstNode.raws.before = finalFirstNode.raws.before;
|
|
92
|
+
finalFirstNode.raws.before = originalRawBefore;
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
});
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
ruleFunction.ruleName = ruleName;
|
|
100
|
+
ruleFunction.messages = messages;
|
|
101
|
+
ruleFunction.meta = meta;
|
|
102
|
+
|
|
103
|
+
module.exports = stylelint.createPlugin(ruleName, ruleFunction);
|