@commencis/stylelint-config 2.6.0 → 3.0.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @commencis/stylelint-config
2
2
 
3
+ ## 3.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - fix: export paths ([#416](https://github.com/Commencis/js-toolkit/pull/416))
8
+
9
+ ## 3.0.0
10
+
11
+ ### Major Changes
12
+
13
+ - [BreakingChange]: Introducing v3 - With cleaner dependencies and structure. Check readme files for implementations. ([#414](https://github.com/Commencis/js-toolkit/pull/414))
14
+
3
15
  ## 2.6.0
4
16
 
5
17
  ### Minor Changes
@@ -0,0 +1,18 @@
1
+ import { c as cssModulesRules } from "./rules-CUo3Oc-0.mjs";
2
+ import css_default from "./css.mjs";
3
+
4
+ //#region src/configs/css-modules.ts
5
+ const cssModulesConfig = {
6
+ ...css_default,
7
+ overrides: [{
8
+ files: ["**/*.module.css"],
9
+ rules: {
10
+ ...css_default.rules,
11
+ ...cssModulesRules
12
+ }
13
+ }]
14
+ };
15
+ var css_modules_default = cssModulesConfig;
16
+
17
+ //#endregion
18
+ export { css_modules_default as default };
package/dist/css.mjs ADDED
@@ -0,0 +1,17 @@
1
+ import { o as orderRules, s as cssRules } from "./rules-CUo3Oc-0.mjs";
2
+ import { t as stylisticRules } from "./stylisticRules-C13hEg4V.mjs";
3
+
4
+ //#region src/configs/css.ts
5
+ const cssConfig = {
6
+ extends: ["stylelint-config-standard", "@stylistic/stylelint-config"],
7
+ plugins: ["stylelint-order"],
8
+ rules: {
9
+ ...cssRules,
10
+ ...orderRules,
11
+ ...stylisticRules
12
+ }
13
+ };
14
+ var css_default = cssConfig;
15
+
16
+ //#endregion
17
+ export { css_default as default };
@@ -0,0 +1,656 @@
1
+ //#region src/rules/cssModulesRules.ts
2
+ const cssModulesRules = {
3
+ "selector-class-pattern": ["^[a-z][a-zA-Z0-9]*$", { message: "Module class names must be in camelCase." }],
4
+ "selector-pseudo-class-no-unknown": [true, { ignorePseudoClasses: ["global", "local"] }]
5
+ };
6
+
7
+ //#endregion
8
+ //#region src/rules/cssRules.ts
9
+ const cssRules = {
10
+ "selector-max-combinators": 4,
11
+ "color-named": "never",
12
+ "color-function-notation": "legacy",
13
+ "alpha-value-notation": "number",
14
+ "color-hex-length": null,
15
+ "no-unknown-animations": true
16
+ };
17
+
18
+ //#endregion
19
+ //#region src/utils/orderRuleCreators.ts
20
+ function createLogicalGroup(groupName, properties, emptyLineBefore = "always") {
21
+ return {
22
+ groupName,
23
+ properties,
24
+ emptyLineBefore,
25
+ noEmptyLineBetween: true,
26
+ order: "flexible"
27
+ };
28
+ }
29
+ function createAtRule(name, hasBlock) {
30
+ return {
31
+ name,
32
+ hasBlock,
33
+ type: "at-rule"
34
+ };
35
+ }
36
+ function createRule(selector) {
37
+ return {
38
+ selector: `&${selector}`,
39
+ type: "rule"
40
+ };
41
+ }
42
+
43
+ //#endregion
44
+ //#region src/rules/orderRules.ts
45
+ const orderRules = {
46
+ "declaration-empty-line-before": null,
47
+ "order/order": [
48
+ "custom-properties",
49
+ "dollar-variables",
50
+ createAtRule("include", false),
51
+ "declarations",
52
+ createRule("::selection"),
53
+ createRule("::backdrop"),
54
+ createRule("::before"),
55
+ createRule("::after"),
56
+ createRule("::marker"),
57
+ createRule("::first-line"),
58
+ createRule("::first-letter"),
59
+ createRule("::cue"),
60
+ createRule("::cue-region"),
61
+ createRule("::placeholder"),
62
+ createRule("::file-selector-button"),
63
+ createRule("::highlight"),
64
+ createRule("::part"),
65
+ createRule("::slotted"),
66
+ createRule(":root"),
67
+ createRule(":lang"),
68
+ createRule(":scope"),
69
+ createRule(":modal"),
70
+ createRule(":past"),
71
+ createRule(":current"),
72
+ createRule(":future"),
73
+ createRule(":where"),
74
+ createRule(":is"),
75
+ createRule(":has"),
76
+ createRule(":not"),
77
+ createRule(":empty"),
78
+ createRule(":target"),
79
+ createRule(":link"),
80
+ createRule(":local-link"),
81
+ createRule(":any-link"),
82
+ createRule(":defined"),
83
+ createRule(":buffering"),
84
+ createRule(":placeholder-shown"),
85
+ createRule(":right"),
86
+ createRule(":left"),
87
+ createRule(":host"),
88
+ createRule(":host-content"),
89
+ createRule(":only-of-type"),
90
+ createRule(":first-of-type"),
91
+ createRule(":nth-of-type"),
92
+ createRule(":last-of-type"),
93
+ createRule(":nth-last-of-type"),
94
+ createRule(":only-child"),
95
+ createRule(":first"),
96
+ createRule(":first-child"),
97
+ createRule(":nth-child"),
98
+ createRule(":last-child"),
99
+ createRule(":nth-last-child"),
100
+ createRule(":default"),
101
+ createRule(":enabled"),
102
+ createRule(":disabled"),
103
+ createRule(":hover"),
104
+ createRule(":focus"),
105
+ createRule(":focus-within"),
106
+ createRule(":focus-visible"),
107
+ createRule(":active"),
108
+ createRule(":checked"),
109
+ createRule(":visited"),
110
+ createRule(":indeterminate"),
111
+ createRule(":in-range"),
112
+ createRule(":out-of-range"),
113
+ createRule(":valid"),
114
+ createRule(":invalid"),
115
+ createRule(":user-valid"),
116
+ createRule(":user-invalid"),
117
+ createRule(":read-only"),
118
+ createRule(":read-write"),
119
+ createRule(":optional"),
120
+ createRule(":required"),
121
+ createRule(":popover-open"),
122
+ createRule(":fullscreen"),
123
+ createRule(":picture-in-picture"),
124
+ createRule(":autofill"),
125
+ "rules",
126
+ createAtRule("include", true),
127
+ "at-rules"
128
+ ],
129
+ "order/properties-order": [[
130
+ createLogicalGroup("All", ["all", "page"]),
131
+ createLogicalGroup("Print", [
132
+ "break-before",
133
+ "break-inside",
134
+ "break-after",
135
+ "orphans",
136
+ "widows"
137
+ ]),
138
+ createLogicalGroup("Actions", [
139
+ "cursor",
140
+ "pointer-events",
141
+ "touch-action",
142
+ "resize"
143
+ ]),
144
+ createLogicalGroup("User Actions", ["user-select", "user-zoom"], "never"),
145
+ createLogicalGroup("Content", ["content", "quotes"], "never"),
146
+ createLogicalGroup("Counter", [
147
+ "counter-increment",
148
+ "counter-set",
149
+ "counter-reset"
150
+ ], "never"),
151
+ createLogicalGroup("List", [
152
+ "list-style",
153
+ "list-style-type",
154
+ "list-style-position",
155
+ "list-style-image"
156
+ ], "never"),
157
+ createLogicalGroup("Marker", [
158
+ "marker",
159
+ "marker-start",
160
+ "marker-mid",
161
+ "marker-end"
162
+ ], "never"),
163
+ createLogicalGroup("Display", [
164
+ "display",
165
+ "opacity",
166
+ "isolation",
167
+ "visibility",
168
+ "backface-visibility",
169
+ "appearance"
170
+ ]),
171
+ createLogicalGroup("Gap", [
172
+ "gap",
173
+ "column-gap",
174
+ "row-gap"
175
+ ], "never"),
176
+ createLogicalGroup("Alignment", [
177
+ "place-content",
178
+ "place-items",
179
+ "place-self",
180
+ "align-content",
181
+ "align-items",
182
+ "align-self",
183
+ "justify-content",
184
+ "justify-items",
185
+ "justify-self"
186
+ ], "never"),
187
+ createLogicalGroup("Position", [
188
+ "position",
189
+ "float",
190
+ "clear",
191
+ "offset",
192
+ "offset-position",
193
+ "offset-path",
194
+ "offset-distance",
195
+ "offset-rotate",
196
+ "offset-anchor",
197
+ "inset",
198
+ "inset-block",
199
+ "inset-block-start",
200
+ "inset-block-end",
201
+ "inset-inline",
202
+ "inset-inline-start",
203
+ "inset-inline-end",
204
+ "top",
205
+ "right",
206
+ "bottom",
207
+ "left",
208
+ "z-index"
209
+ ]),
210
+ createLogicalGroup("Outline", [
211
+ "outline",
212
+ "outline-width",
213
+ "outline-style",
214
+ "outline-color",
215
+ "outline-offset"
216
+ ], "never"),
217
+ createLogicalGroup("Shape", [
218
+ "shape-outside",
219
+ "shape-margin",
220
+ "shape-image-threshold"
221
+ ], "never"),
222
+ createLogicalGroup("Mask", [
223
+ "mask",
224
+ "mask-border",
225
+ "mask-border-source",
226
+ "mask-border-slice",
227
+ "mask-border-width",
228
+ "mask-border-outset",
229
+ "mask-border-repeat",
230
+ "mask-border-mode",
231
+ "mask-image",
232
+ "mask-clip",
233
+ "mask-origin",
234
+ "mask-type",
235
+ "mask-size",
236
+ "mask-position",
237
+ "mask-repeat",
238
+ "mask-mode",
239
+ "mask-composite"
240
+ ], "never"),
241
+ createLogicalGroup("Margin", [
242
+ "margin",
243
+ "margin-block",
244
+ "margin-block-start",
245
+ "margin-block-end",
246
+ "margin-inline",
247
+ "margin-inline-start",
248
+ "margin-inline-end",
249
+ "margin-top",
250
+ "margin-right",
251
+ "margin-bottom",
252
+ "margin-left"
253
+ ]),
254
+ createLogicalGroup("Border", [
255
+ "border",
256
+ "border-width",
257
+ "border-style",
258
+ "border-color",
259
+ "border-radius",
260
+ "border-start-start-radius",
261
+ "border-start-end-radius",
262
+ "border-end-start-radius",
263
+ "border-end-end-radius",
264
+ "border-block",
265
+ "border-block-width",
266
+ "border-block-style",
267
+ "border-block-color",
268
+ "border-block-start",
269
+ "border-block-start-width",
270
+ "border-block-start-style",
271
+ "border-block-start-color",
272
+ "border-block-end",
273
+ "border-block-end-width",
274
+ "border-block-end-style",
275
+ "border-block-end-color",
276
+ "border-inline",
277
+ "border-inline-width",
278
+ "border-inline-style",
279
+ "border-inline-color",
280
+ "border-inline-start",
281
+ "border-inline-start-width",
282
+ "border-inline-start-style",
283
+ "border-inline-start-color",
284
+ "border-inline-end",
285
+ "border-inline-end-width",
286
+ "border-inline-end-style",
287
+ "border-inline-end-color",
288
+ "border-top",
289
+ "border-top-left-radius",
290
+ "border-top-right-radius",
291
+ "border-top-width",
292
+ "border-top-style",
293
+ "border-top-color",
294
+ "border-right",
295
+ "border-right-width",
296
+ "border-right-style",
297
+ "border-right-color",
298
+ "border-bottom",
299
+ "border-bottom-left-radius",
300
+ "border-bottom-right-radius",
301
+ "border-bottom-width",
302
+ "border-bottom-style",
303
+ "border-bottom-color",
304
+ "border-left",
305
+ "border-left-width",
306
+ "border-left-style",
307
+ "border-left-color",
308
+ "border-image",
309
+ "border-image-source",
310
+ "border-image-slice",
311
+ "border-image-width",
312
+ "border-image-outset",
313
+ "border-image-repeat"
314
+ ], "never"),
315
+ createLogicalGroup("Box", [
316
+ "box-sizing",
317
+ "box-decoration-break",
318
+ "box-shadow"
319
+ ], "never"),
320
+ createLogicalGroup("Object", ["object-fit", "object-position"], "never"),
321
+ createLogicalGroup("container", [
322
+ "container",
323
+ "container-name",
324
+ "container-type"
325
+ ], "never"),
326
+ createLogicalGroup("Contain", [
327
+ "contain",
328
+ "contain-intrinsic-size",
329
+ "contain-intrinsic-block-size",
330
+ "contain-intrinsic-inline-size",
331
+ "contain-intrinsic-height",
332
+ "contain-intrinsic-width"
333
+ ], "never"),
334
+ createLogicalGroup("Color", [
335
+ "color-scheme",
336
+ "accent-color",
337
+ "color",
338
+ "caret-color",
339
+ "forced-color-adjust",
340
+ "print-color-adjust"
341
+ ]),
342
+ createLogicalGroup("SVG", [
343
+ "fill",
344
+ "stroke",
345
+ "paint-order"
346
+ ], "never"),
347
+ createLogicalGroup("Background", [
348
+ "background",
349
+ "background-image",
350
+ "background-color",
351
+ "background-origin",
352
+ "background-size",
353
+ "background-position",
354
+ "background-position-y",
355
+ "background-position-x",
356
+ "background-repeat",
357
+ "background-attachment",
358
+ "background-clip",
359
+ "background-blend-mode"
360
+ ], "never"),
361
+ createLogicalGroup("Filter", [
362
+ "filter",
363
+ "backdrop-filter",
364
+ "mix-blend-mode",
365
+ "clip-path"
366
+ ], "never"),
367
+ createLogicalGroup("Dimensions", [
368
+ "aspect-ratio",
369
+ "block-size",
370
+ "min-block-size",
371
+ "max-block-size",
372
+ "inline-size",
373
+ "min-inline-size",
374
+ "max-inline-size",
375
+ "height",
376
+ "min-height",
377
+ "max-height",
378
+ "width",
379
+ "min-width",
380
+ "max-width"
381
+ ]),
382
+ createLogicalGroup("Padding", [
383
+ "padding",
384
+ "padding-block",
385
+ "padding-block-start",
386
+ "padding-block-end",
387
+ "padding-inline",
388
+ "padding-inline-start",
389
+ "padding-inline-end",
390
+ "padding-top",
391
+ "padding-right",
392
+ "padding-bottom",
393
+ "padding-left"
394
+ ], "never"),
395
+ createLogicalGroup("Overflow", [
396
+ "overflow",
397
+ "overflow-clip-margin",
398
+ "overflow-block",
399
+ "overflow-inline",
400
+ "overflow-y",
401
+ "overflow-x",
402
+ "overflow-wrap",
403
+ "overflow-anchor"
404
+ ], "never"),
405
+ createLogicalGroup("Columns", [
406
+ "columns",
407
+ "column-width",
408
+ "column-count",
409
+ "column-fill",
410
+ "column-span",
411
+ "column-rule",
412
+ "column-rule-width",
413
+ "column-rule-style",
414
+ "column-rule-color"
415
+ ], "never"),
416
+ createLogicalGroup("Flex", [
417
+ "flex",
418
+ "flex-grow",
419
+ "flex-shrink",
420
+ "flex-basis",
421
+ "flex-flow",
422
+ "flex-direction",
423
+ "flex-wrap",
424
+ "order"
425
+ ]),
426
+ createLogicalGroup("Grid", [
427
+ "grid",
428
+ "grid-area",
429
+ "grid-template",
430
+ "grid-template-areas",
431
+ "grid-template-columns",
432
+ "grid-template-rows",
433
+ "grid-auto-flow",
434
+ "grid-auto-columns",
435
+ "grid-column",
436
+ "grid-column-start",
437
+ "grid-column-end",
438
+ "grid-auto-rows",
439
+ "grid-row",
440
+ "grid-row-start",
441
+ "grid-row-end"
442
+ ]),
443
+ createLogicalGroup("Table", [
444
+ "table-layout",
445
+ "border-spacing",
446
+ "border-collapse",
447
+ "empty-cells",
448
+ "vertical-align",
449
+ "caption-side"
450
+ ]),
451
+ createLogicalGroup("Image", ["image-orientation", "image-rendering"]),
452
+ createLogicalGroup("Font", [
453
+ "src",
454
+ "font",
455
+ "font-family",
456
+ "font-size",
457
+ "font-size-adjust",
458
+ "font-weight",
459
+ "font-style",
460
+ "font-display",
461
+ "font-palette",
462
+ "font-kerning",
463
+ "font-stretch",
464
+ "font-optical-sizing",
465
+ "font-language-override",
466
+ "font-feature-settings",
467
+ "font-synthesis",
468
+ "font-synthesis-weight",
469
+ "font-synthesis-style",
470
+ "font-synthesis-small-caps",
471
+ "font-variant",
472
+ "font-variant-position",
473
+ "font-variant-ligatures",
474
+ "font-variant-numeric",
475
+ "font-variant-emoji",
476
+ "font-variant-caps",
477
+ "font-variant-east-asian",
478
+ "font-variant-alternates",
479
+ "font-variation-settings"
480
+ ]),
481
+ createLogicalGroup("Typography", [
482
+ "unicode-bidi",
483
+ "unicode-range",
484
+ "tab-size",
485
+ "direction",
486
+ "writing-mode",
487
+ "white-space",
488
+ "ruby-position",
489
+ "line-break",
490
+ "line-height",
491
+ "word-spacing",
492
+ "word-wrap",
493
+ "word-break",
494
+ "letter-spacing",
495
+ "hyphens",
496
+ "hyphenate-character",
497
+ "hyphenate-limit-chars",
498
+ "hanging-punctuation"
499
+ ], "never"),
500
+ createLogicalGroup("Text", [
501
+ "text-overflow",
502
+ "text-rendering",
503
+ "text-indent",
504
+ "text-justify",
505
+ "text-orientation",
506
+ "text-shadow",
507
+ "text-transform",
508
+ "text-anchor",
509
+ "text-wrap",
510
+ "text-align",
511
+ "text-align-last",
512
+ "text-combine-upright",
513
+ "text-decoration",
514
+ "text-decoration-skip-ink",
515
+ "text-decoration-thickness",
516
+ "text-decoration-line",
517
+ "text-decoration-style",
518
+ "text-decoration-color",
519
+ "text-emphasis",
520
+ "text-emphasis-position",
521
+ "text-emphasis-style",
522
+ "text-emphasis-color",
523
+ "text-underline-position",
524
+ "text-underline-offset"
525
+ ], "never"),
526
+ createLogicalGroup("Math", ["math-depth", "math-style"]),
527
+ createLogicalGroup("Overscroll", [
528
+ "overscroll-behavior",
529
+ "overscroll-behavior-block",
530
+ "overscroll-behavior-inline",
531
+ "overscroll-behavior-y",
532
+ "overscroll-behavior-x"
533
+ ]),
534
+ createLogicalGroup("Scroll", [
535
+ "scroll-margin",
536
+ "scroll-margin-block",
537
+ "scroll-margin-block-start",
538
+ "scroll-margin-block-end",
539
+ "scroll-margin-inline",
540
+ "scroll-margin-inline-start",
541
+ "scroll-margin-inline-end",
542
+ "scroll-margin-top",
543
+ "scroll-margin-right",
544
+ "scroll-margin-bottom",
545
+ "scroll-margin-left",
546
+ "scroll-padding",
547
+ "scroll-padding-block",
548
+ "scroll-padding-block-start",
549
+ "scroll-padding-block-end",
550
+ "scroll-padding-inline",
551
+ "scroll-padding-inline-start",
552
+ "scroll-padding-inline-end",
553
+ "scroll-padding-top",
554
+ "scroll-padding-right",
555
+ "scroll-padding-bottom",
556
+ "scroll-padding-left",
557
+ "scroll-snap-type",
558
+ "scroll-snap-align",
559
+ "scroll-snap-stop",
560
+ "scroll-behavior"
561
+ ]),
562
+ createLogicalGroup("Scrollbar", [
563
+ "scrollbar-gutter",
564
+ "scrollbar-width",
565
+ "scrollbar-color"
566
+ ]),
567
+ createLogicalGroup("Transform", [
568
+ "transform",
569
+ "transform-origin",
570
+ "transform-box",
571
+ "transform-style",
572
+ "translate",
573
+ "scale",
574
+ "rotate",
575
+ "will-change",
576
+ "perspective",
577
+ "perspective-origin"
578
+ ]),
579
+ createLogicalGroup("Transition", [
580
+ "transition",
581
+ "transition-property",
582
+ "transition-duration",
583
+ "transition-timing-function",
584
+ "transition-delay"
585
+ ]),
586
+ createLogicalGroup("Animation", [
587
+ "animation",
588
+ "animation-name",
589
+ "animation-duration",
590
+ "animation-timing-function",
591
+ "animation-delay",
592
+ "animation-iteration-count",
593
+ "animation-direction",
594
+ "animation-fill-mode",
595
+ "animation-play-state",
596
+ "animation-composition"
597
+ ])
598
+ ], {
599
+ unspecified: "bottomAlphabetical",
600
+ emptyLineBeforeUnspecified: "threshold",
601
+ emptyLineMinimumPropertyThreshold: 4
602
+ }]
603
+ };
604
+
605
+ //#endregion
606
+ //#region src/rules/scssModulesRules.ts
607
+ const scssModulesRules = { "scss/at-extend-no-missing-placeholder": true };
608
+
609
+ //#endregion
610
+ //#region src/rules/scssRules.ts
611
+ const scssRules = {
612
+ "scss/dollar-variable-no-namespaced-assignment": true,
613
+ "scss/no-duplicate-dollar-variables": true,
614
+ "scss/at-mixin-argumentless-call-parentheses": null,
615
+ "scss/dollar-variable-empty-line-before": ["always", { ignore: [
616
+ "after-comment",
617
+ "inside-single-line-block",
618
+ "after-dollar-variable"
619
+ ] }]
620
+ };
621
+
622
+ //#endregion
623
+ //#region src/rules/styledRules.ts
624
+ const styledRules = {
625
+ "at-rule-no-unknown": null,
626
+ "no-invalid-double-slash-comments": null,
627
+ "property-no-unknown": [true, { ignoreProperties: ["composes"] }],
628
+ "selector-class-pattern": null,
629
+ "function-no-unknown": null,
630
+ "value-keyword-case": null,
631
+ "no-empty-source": null,
632
+ "value-no-vendor-prefix": true,
633
+ "property-no-vendor-prefix": true
634
+ };
635
+
636
+ //#endregion
637
+ //#region src/rules/vueCssRules.ts
638
+ const vueCssRules = {
639
+ "selector-pseudo-class-no-unknown": [true, { ignorePseudoClasses: [
640
+ "deep",
641
+ "global",
642
+ "slotted"
643
+ ] }],
644
+ "selector-pseudo-element-no-unknown": [true, { ignorePseudoElements: [
645
+ "v-deep",
646
+ "v-global",
647
+ "v-slotted"
648
+ ] }]
649
+ };
650
+
651
+ //#endregion
652
+ //#region src/rules/vueScssRules.ts
653
+ const vueScssRules = { "function-no-unknown": null };
654
+
655
+ //#endregion
656
+ export { scssModulesRules as a, cssModulesRules as c, scssRules as i, vueCssRules as n, orderRules as o, styledRules as r, cssRules as s, vueScssRules as t };