@taiga-ui/stylelint-config 0.520.0 → 0.522.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/index.esm.js ADDED
@@ -0,0 +1,964 @@
1
+ import browserslistConfig from '@taiga-ui/browserslist-config';
2
+ import valueParser from 'postcss-value-parser';
3
+ import stylelint from 'stylelint';
4
+ import { extname } from 'node:path';
5
+
6
+ const { createPlugin: createPlugin$2, utils: { report: report$2, ruleMessages: ruleMessages$2, validateOptions: validateOptions$2 }, } = stylelint;
7
+ const ruleName$2 = '@taiga-ui/no-mask-shorthand';
8
+ const messages$2 = ruleMessages$2(ruleName$2, {
9
+ expected: 'Expected "mask" shorthand to be expanded into longhand properties',
10
+ });
11
+ const meta$2 = {
12
+ fixable: true,
13
+ url: 'https://github.com/taiga-family/toolkit/tree/main/projects/stylelint-config',
14
+ };
15
+ const cssWideKeywords = new Set([
16
+ 'inherit',
17
+ 'initial',
18
+ 'revert',
19
+ 'revert-layer',
20
+ 'unset',
21
+ ]);
22
+ const geometryBoxes = new Set([
23
+ 'border-box',
24
+ 'content-box',
25
+ 'fill-box',
26
+ 'margin-box',
27
+ 'padding-box',
28
+ 'stroke-box',
29
+ 'view-box',
30
+ ]);
31
+ const imageFunctions = new Set([
32
+ '-webkit-gradient',
33
+ 'conic-gradient',
34
+ 'cross-fade',
35
+ 'element',
36
+ 'image',
37
+ 'image-set',
38
+ 'linear-gradient',
39
+ 'paint',
40
+ 'radial-gradient',
41
+ 'repeating-conic-gradient',
42
+ 'repeating-linear-gradient',
43
+ 'repeating-radial-gradient',
44
+ 'url',
45
+ ]);
46
+ const positionSizeFunctions = new Set([
47
+ 'anchor',
48
+ 'anchor-size',
49
+ 'calc',
50
+ 'clamp',
51
+ 'env',
52
+ 'max',
53
+ 'min',
54
+ 'round',
55
+ ]);
56
+ const maskModes = new Set(['alpha', 'luminance', 'match-source']);
57
+ const maskComposites = new Set(['add', 'exclude', 'intersect', 'subtract']);
58
+ const dimensionPattern = /^-?(?:\d+|\d*\.\d+)(?:%|[a-z]+)?$/i;
59
+ const positionKeywords = new Set([
60
+ 'block-end',
61
+ 'block-start',
62
+ 'bottom',
63
+ 'center',
64
+ 'end',
65
+ 'inline-end',
66
+ 'inline-start',
67
+ 'left',
68
+ 'right',
69
+ 'start',
70
+ 'top',
71
+ 'x-end',
72
+ 'x-start',
73
+ 'y-end',
74
+ 'y-start',
75
+ ]);
76
+ const sizeKeywords = new Set(['auto', 'contain', 'cover']);
77
+ const repeatKeywords = new Set(['no-repeat', 'repeat', 'round', 'space']);
78
+ const singleRepeatKeywords = new Set([
79
+ 'repeat-block',
80
+ 'repeat-inline',
81
+ 'repeat-x',
82
+ 'repeat-y',
83
+ ]);
84
+ const longhandDefinitions = [
85
+ { always: true, initial: 'none', key: 'image', prop: 'mask-image' },
86
+ { initial: 'repeat', key: 'repeat', prop: 'mask-repeat' },
87
+ { initial: '0% 0%', key: 'position', prop: 'mask-position' },
88
+ { initial: 'auto', key: 'size', prop: 'mask-size' },
89
+ { initial: 'border-box', key: 'origin', prop: 'mask-origin' },
90
+ { initial: 'border-box', key: 'clip', prop: 'mask-clip' },
91
+ { initial: 'match-source', key: 'mode', prop: 'mask-mode' },
92
+ { initial: 'add', key: 'composite', prop: 'mask-composite' },
93
+ ];
94
+ function stringifyNodes(nodes) {
95
+ return valueParser.stringify(nodes).trim();
96
+ }
97
+ function containsVar(nodes) {
98
+ return nodes.some((node) => {
99
+ if (node.type !== 'function') {
100
+ return false;
101
+ }
102
+ return node.value.toLowerCase() === 'var' ? true : containsVar(node.nodes);
103
+ });
104
+ }
105
+ function splitLayers(nodes) {
106
+ const layers = [];
107
+ let current = [];
108
+ for (const node of nodes) {
109
+ if (node.type === 'div' && node.value === ',') {
110
+ layers.push(current);
111
+ current = [];
112
+ continue;
113
+ }
114
+ current.push(node);
115
+ }
116
+ layers.push(current);
117
+ return layers.filter((layer) => stringifyNodes(layer));
118
+ }
119
+ function pushTerm(terms, nodes) {
120
+ if (nodes.length === 0) {
121
+ return;
122
+ }
123
+ terms.push({
124
+ nodes,
125
+ type: 'value',
126
+ value: stringifyNodes(nodes),
127
+ });
128
+ }
129
+ function createTerms(nodes) {
130
+ const terms = [];
131
+ let current = [];
132
+ for (const node of nodes) {
133
+ if (node.type === 'comment') {
134
+ return null;
135
+ }
136
+ if (node.type === 'space') {
137
+ pushTerm(terms, current);
138
+ current = [];
139
+ continue;
140
+ }
141
+ if (node.type === 'div') {
142
+ if (node.value !== '/') {
143
+ return null;
144
+ }
145
+ pushTerm(terms, current);
146
+ current = [];
147
+ terms.push({ type: 'slash' });
148
+ continue;
149
+ }
150
+ current.push(node);
151
+ }
152
+ pushTerm(terms, current);
153
+ return terms;
154
+ }
155
+ function getWord(term) {
156
+ if (!term || term.type === 'slash' || term.nodes.length !== 1) {
157
+ return null;
158
+ }
159
+ const node = term.nodes[0];
160
+ return node?.type === 'word' ? node.value.toLowerCase() : null;
161
+ }
162
+ function getFunctionName(term) {
163
+ if (!term || term.type === 'slash' || term.nodes.length !== 1) {
164
+ return null;
165
+ }
166
+ const node = term.nodes[0];
167
+ return node?.type === 'function' ? node.value.toLowerCase() : null;
168
+ }
169
+ function isImage(term) {
170
+ const word = getWord(term);
171
+ if (word === 'none' || word?.startsWith('@') || word?.startsWith('$')) {
172
+ return true;
173
+ }
174
+ const functionName = getFunctionName(term);
175
+ return Boolean(functionName && imageFunctions.has(functionName));
176
+ }
177
+ function isPreprocessorValue(word) {
178
+ return word.startsWith('@') || word.startsWith('$') || word.startsWith('~');
179
+ }
180
+ function isPositionSizeFunction(term) {
181
+ const functionName = getFunctionName(term);
182
+ return Boolean(functionName && positionSizeFunctions.has(functionName));
183
+ }
184
+ function isPosition(term) {
185
+ const word = getWord(term);
186
+ return word
187
+ ? isPreprocessorValue(word) ||
188
+ positionKeywords.has(word) ||
189
+ dimensionPattern.test(word)
190
+ : isPositionSizeFunction(term);
191
+ }
192
+ function isSize(term) {
193
+ const word = getWord(term);
194
+ return word
195
+ ? isPreprocessorValue(word) ||
196
+ sizeKeywords.has(word) ||
197
+ dimensionPattern.test(word)
198
+ : isPositionSizeFunction(term);
199
+ }
200
+ function getRepeat(terms, index) {
201
+ const word = getWord(terms[index]);
202
+ if (!word) {
203
+ return null;
204
+ }
205
+ if (singleRepeatKeywords.has(word)) {
206
+ return { consumed: 1, value: word };
207
+ }
208
+ if (!repeatKeywords.has(word)) {
209
+ return null;
210
+ }
211
+ const nextWord = getWord(terms[index + 1]);
212
+ return nextWord && repeatKeywords.has(nextWord)
213
+ ? { consumed: 2, value: `${word} ${nextWord}` }
214
+ : { consumed: 1, value: word };
215
+ }
216
+ function assignGeometry(layer, geometry) {
217
+ if (geometry.length === 0) {
218
+ return true;
219
+ }
220
+ const boxes = geometry.filter((value) => value !== 'no-clip');
221
+ const clips = geometry.filter((value) => value === 'no-clip');
222
+ const hasTooManyGeometryValues = boxes.length > 2 || clips.length > 1;
223
+ if (hasTooManyGeometryValues) {
224
+ return false;
225
+ }
226
+ if (clips.length > 0) {
227
+ layer.clip = 'no-clip';
228
+ if (boxes.length > 0) {
229
+ const origin = boxes[0];
230
+ if (!origin) {
231
+ return false;
232
+ }
233
+ layer.origin = origin;
234
+ }
235
+ return true;
236
+ }
237
+ if (boxes.length === 1) {
238
+ const box = boxes[0];
239
+ if (!box) {
240
+ return false;
241
+ }
242
+ layer.clip = box;
243
+ layer.origin = box;
244
+ return true;
245
+ }
246
+ const origin = boxes[0];
247
+ const clip = boxes[1];
248
+ if (!origin || !clip) {
249
+ return false;
250
+ }
251
+ layer.origin = origin;
252
+ layer.clip = clip;
253
+ return true;
254
+ }
255
+ function assignValue(layer, key, value) {
256
+ if (layer[key]) {
257
+ return false;
258
+ }
259
+ layer[key] = value;
260
+ return true;
261
+ }
262
+ function parseLayer(nodes) {
263
+ const terms = createTerms(nodes);
264
+ if (!terms) {
265
+ return null;
266
+ }
267
+ const layer = {
268
+ clip: null,
269
+ composite: null,
270
+ image: null,
271
+ mode: null,
272
+ origin: null,
273
+ position: null,
274
+ repeat: null,
275
+ size: null,
276
+ };
277
+ const geometry = [];
278
+ const position = [];
279
+ const size = [];
280
+ let isParsingSize = false;
281
+ for (let index = 0; index < terms.length; index++) {
282
+ const term = terms[index];
283
+ if (!term) {
284
+ return null;
285
+ }
286
+ if (term.type === 'slash') {
287
+ if (isParsingSize) {
288
+ return null;
289
+ }
290
+ isParsingSize = true;
291
+ continue;
292
+ }
293
+ const word = getWord(term);
294
+ if (word && maskModes.has(word)) {
295
+ if (!assignValue(layer, 'mode', word)) {
296
+ return null;
297
+ }
298
+ continue;
299
+ }
300
+ if (word && maskComposites.has(word)) {
301
+ if (!assignValue(layer, 'composite', word)) {
302
+ return null;
303
+ }
304
+ continue;
305
+ }
306
+ const repeat = getRepeat(terms, index);
307
+ if (repeat) {
308
+ if (!assignValue(layer, 'repeat', repeat.value)) {
309
+ return null;
310
+ }
311
+ index += repeat.consumed - 1;
312
+ continue;
313
+ }
314
+ if (word && (geometryBoxes.has(word) || word === 'no-clip')) {
315
+ geometry.push(word);
316
+ continue;
317
+ }
318
+ if (!isParsingSize && !layer.image && isImage(term)) {
319
+ layer.image = term.value;
320
+ continue;
321
+ }
322
+ if (isParsingSize) {
323
+ if (!isSize(term)) {
324
+ return null;
325
+ }
326
+ size.push(term.value);
327
+ }
328
+ else {
329
+ if (!isPosition(term)) {
330
+ return null;
331
+ }
332
+ position.push(term.value);
333
+ }
334
+ }
335
+ if (!assignGeometry(layer, geometry)) {
336
+ return null;
337
+ }
338
+ if (position.length > 0) {
339
+ layer.position = position.join(' ');
340
+ }
341
+ if (size.length > 0) {
342
+ layer.size = size.join(' ');
343
+ }
344
+ if (!layer.image) {
345
+ layer.image = 'none';
346
+ }
347
+ return layer;
348
+ }
349
+ function isCssWideKeyword(value) {
350
+ return cssWideKeywords.has(value.trim().toLowerCase());
351
+ }
352
+ function getLonghandValue(layers, definition) {
353
+ const values = layers.map((layer) => layer[definition.key] || definition.initial);
354
+ const firstValue = values[0];
355
+ if (firstValue === undefined) {
356
+ return definition.initial;
357
+ }
358
+ const hasSameValue = values.every((value) => value === firstValue);
359
+ return hasSameValue ? firstValue : values.join(', ');
360
+ }
361
+ function isMaskLayer(layer) {
362
+ return layer !== null;
363
+ }
364
+ function hasExplicitLonghandValue(layers, definition) {
365
+ return definition.always === true || layers.some((layer) => layer[definition.key]);
366
+ }
367
+ function buildLonghands(value) {
368
+ if (isCssWideKeyword(value)) {
369
+ return null;
370
+ }
371
+ const nodes = valueParser(value).nodes;
372
+ if (containsVar(nodes)) {
373
+ return null;
374
+ }
375
+ const parsedLayers = splitLayers(nodes).map(parseLayer);
376
+ const hasUnparseableLayer = parsedLayers.some((layer) => !layer);
377
+ if (hasUnparseableLayer || parsedLayers.length === 0) {
378
+ return null;
379
+ }
380
+ const layers = parsedLayers.filter(isMaskLayer);
381
+ return [
382
+ ...longhandDefinitions
383
+ .filter((definition) => hasExplicitLonghandValue(layers, definition))
384
+ .map((definition) => ({
385
+ prop: definition.prop,
386
+ value: getLonghandValue(layers, definition),
387
+ })),
388
+ ];
389
+ }
390
+ function replaceDeclaration(decl, longhands) {
391
+ for (const longhand of longhands) {
392
+ decl.cloneBefore({
393
+ important: decl.important,
394
+ prop: longhand.prop,
395
+ value: longhand.value,
396
+ });
397
+ }
398
+ decl.remove();
399
+ }
400
+ const ruleFunction$2 = (primary) => (root, result) => {
401
+ const validOptions = validateOptions$2(result, ruleName$2, {
402
+ actual: primary,
403
+ possible: [true],
404
+ });
405
+ if (!validOptions) {
406
+ return;
407
+ }
408
+ root.walkDecls('mask', (decl) => {
409
+ const longhands = buildLonghands(decl.value);
410
+ report$2({
411
+ fix: longhands
412
+ ? () => {
413
+ replaceDeclaration(decl, longhands);
414
+ }
415
+ : undefined,
416
+ message: messages$2.expected,
417
+ node: decl,
418
+ result,
419
+ ruleName: ruleName$2,
420
+ });
421
+ });
422
+ };
423
+ ruleFunction$2.ruleName = ruleName$2;
424
+ ruleFunction$2.messages = messages$2;
425
+ ruleFunction$2.meta = meta$2;
426
+ const plugin$2 = Object.assign(createPlugin$2(ruleName$2, ruleFunction$2), {
427
+ messages: messages$2,
428
+ meta: meta$2,
429
+ ruleName: ruleName$2,
430
+ });
431
+
432
+ const { createPlugin: createPlugin$1, utils: { report: report$1, ruleMessages: ruleMessages$1, validateOptions: validateOptions$1 }, } = stylelint;
433
+ const ruleName$1 = '@taiga-ui/no-webkit-box-orient-block-axis';
434
+ const messages$1 = ruleMessages$1(ruleName$1, {
435
+ expected: 'Expected "-webkit-box-orient: block-axis" to be "-webkit-box-orient: vertical"',
436
+ });
437
+ const meta$1 = {
438
+ fixable: true,
439
+ url: 'https://github.com/taiga-family/toolkit/tree/main/projects/stylelint-config',
440
+ };
441
+ const ruleFunction$1 = (primary) => (root, result) => {
442
+ const validOptions = validateOptions$1(result, ruleName$1, {
443
+ actual: primary,
444
+ possible: [true],
445
+ });
446
+ if (!validOptions) {
447
+ return;
448
+ }
449
+ root.walkDecls('-webkit-box-orient', (decl) => {
450
+ if (decl.value.trim().toLowerCase() !== 'block-axis') {
451
+ return;
452
+ }
453
+ report$1({
454
+ fix: () => {
455
+ decl.value = 'vertical';
456
+ },
457
+ message: messages$1.expected,
458
+ node: decl,
459
+ result,
460
+ ruleName: ruleName$1,
461
+ });
462
+ });
463
+ };
464
+ ruleFunction$1.ruleName = ruleName$1;
465
+ ruleFunction$1.messages = messages$1;
466
+ ruleFunction$1.meta = meta$1;
467
+ const plugin$1 = Object.assign(createPlugin$1(ruleName$1, ruleFunction$1), {
468
+ messages: messages$1,
469
+ meta: meta$1,
470
+ ruleName: ruleName$1,
471
+ });
472
+
473
+ const { createPlugin, utils: { report, ruleMessages, validateOptions }, } = stylelint;
474
+ const ruleName = '@taiga-ui/relative-less-import-extension';
475
+ const messages = ruleMessages(ruleName, {
476
+ expected: (actual, expected) => `Expected "${actual}" to be "${expected}"`,
477
+ });
478
+ const meta = {
479
+ fixable: true,
480
+ url: 'https://github.com/taiga-family/toolkit/tree/main/projects/stylelint-config',
481
+ };
482
+ function getExpectedExtension(root) {
483
+ const file = root.source?.input.file;
484
+ if (!file) {
485
+ return '.less';
486
+ }
487
+ const ext = extname(file).toLowerCase();
488
+ return ext === '.scss' || ext === '.css' || ext === '.less' ? ext : '.less';
489
+ }
490
+ function hasKnownStyleExtension(value) {
491
+ return /\.(?:less|scss|css)(?:\?.*)?$/i.test(value);
492
+ }
493
+ function isExternalImport(value) {
494
+ return (value.startsWith('@') ||
495
+ value.startsWith('~') ||
496
+ value.startsWith('/') ||
497
+ value.startsWith('//') ||
498
+ /^https?:/i.test(value) ||
499
+ /^data:/i.test(value));
500
+ }
501
+ function isUrlImport(params) {
502
+ return /^url\(/i.test(params.trim());
503
+ }
504
+ function isLocalImportPath(value) {
505
+ if (!value || isExternalImport(value)) {
506
+ return false;
507
+ }
508
+ return true;
509
+ }
510
+ function splitQueryAndHash(value) {
511
+ const match = /^([^?#]+)([?#].*)?$/.exec(value);
512
+ return {
513
+ pathname: match?.[1] ?? value,
514
+ suffix: match?.[2] ?? '',
515
+ };
516
+ }
517
+ const ruleFunction = (primary) => (root, result) => {
518
+ const validOptions = validateOptions(result, ruleName, {
519
+ actual: primary,
520
+ possible: [true],
521
+ });
522
+ if (!validOptions) {
523
+ return;
524
+ }
525
+ const expectedExtension = getExpectedExtension(root);
526
+ root.walkAtRules('import', (atRule) => {
527
+ const params = atRule.params.trim();
528
+ if (isUrlImport(params)) {
529
+ return;
530
+ }
531
+ const match = /^(['"])([^'"]+)\1(.*)$/.exec(params);
532
+ if (!match) {
533
+ return;
534
+ }
535
+ const quote = match[1];
536
+ const rawImportPath = match[2];
537
+ const tail = match[3] ?? '';
538
+ if (!quote || !rawImportPath || !isLocalImportPath(rawImportPath)) {
539
+ return;
540
+ }
541
+ const { pathname, suffix } = splitQueryAndHash(rawImportPath);
542
+ if (hasKnownStyleExtension(pathname)) {
543
+ return;
544
+ }
545
+ const fixedPath = `${pathname}${expectedExtension}${suffix}`;
546
+ const fixedParams = `${quote}${fixedPath}${quote}${tail}`;
547
+ report({
548
+ fix: () => {
549
+ atRule.params = fixedParams;
550
+ },
551
+ message: messages.expected(rawImportPath, fixedPath),
552
+ node: atRule,
553
+ result,
554
+ ruleName,
555
+ });
556
+ });
557
+ };
558
+ ruleFunction.ruleName = ruleName;
559
+ ruleFunction.messages = messages;
560
+ ruleFunction.meta = meta;
561
+ const plugin = Object.assign(createPlugin(ruleName, ruleFunction), {
562
+ messages,
563
+ meta,
564
+ ruleName,
565
+ });
566
+
567
+ const { defaults: browserslist } = browserslistConfig;
568
+ const config = {
569
+ $schema: 'https://raw.githubusercontent.com/SchemaStore/schemastore/master/src/schemas/json/stylelintrc.json',
570
+ plugins: [
571
+ plugin$2,
572
+ plugin$1,
573
+ plugin,
574
+ 'stylelint-order',
575
+ 'stylelint-rem-over-px',
576
+ 'stylelint-use-logical',
577
+ 'stylelint-plugin-logical-css',
578
+ '@stylistic/stylelint-plugin',
579
+ 'stylelint-plugin-use-baseline',
580
+ 'stylelint-no-unsupported-browser-features',
581
+ ],
582
+ extends: [
583
+ '@stylistic/stylelint-config',
584
+ 'stylelint-plugin-logical-css/configs/recommended',
585
+ ],
586
+ allowEmptyInput: true,
587
+ customSyntax: 'postcss-less',
588
+ defaultSeverity: 'error',
589
+ ignoreFiles: [
590
+ `${process.cwd()}/**/dist/**`,
591
+ `${process.cwd()}/**/coverage/**`,
592
+ `${process.cwd()}/**/node_modules/**`,
593
+ `${process.cwd()}/**/tests-report/**`,
594
+ ],
595
+ reportDescriptionlessDisables: true,
596
+ reportNeedlessDisables: true,
597
+ reportUnscopedDisables: false,
598
+ validate: true,
599
+ rules: {
600
+ '@stylistic/declaration-block-trailing-semicolon': null,
601
+ '@stylistic/declaration-colon-newline-after': null,
602
+ '@stylistic/declaration-colon-space-after': null,
603
+ '@stylistic/indentation': null,
604
+ '@stylistic/max-line-length': null,
605
+ '@stylistic/no-extra-semicolons': null,
606
+ '@stylistic/selector-descendant-combinator-no-non-space': null,
607
+ '@stylistic/selector-pseudo-class-parentheses-space-inside': null,
608
+ '@stylistic/string-quotes': 'single',
609
+ '@stylistic/value-list-comma-newline-after': null,
610
+ '@taiga-ui/no-mask-shorthand': true,
611
+ '@taiga-ui/no-webkit-box-orient-block-axis': true,
612
+ '@taiga-ui/relative-less-import-extension': true,
613
+ 'alpha-value-notation': 'number',
614
+ 'annotation-no-unknown': true,
615
+ 'at-rule-allowed-list': [
616
+ 'extend',
617
+ 'keyframes',
618
+ 'import',
619
+ 'media',
620
+ 'supports',
621
+ 'font-face',
622
+ 'property', // CSS Houdini
623
+ ],
624
+ 'at-rule-empty-line-before': [
625
+ 'always',
626
+ {
627
+ except: ['first-nested'],
628
+ ignore: ['after-comment', 'blockless-after-same-name-blockless'],
629
+ },
630
+ ],
631
+ 'at-rule-no-unknown': true,
632
+ 'at-rule-no-vendor-prefix': true,
633
+ 'block-no-empty': true,
634
+ 'color-function-notation': ['legacy', { ignore: ['with-var-inside'] }],
635
+ 'color-hex-alpha': 'never',
636
+ 'color-hex-length': 'short',
637
+ 'color-named': ['never', { ignoreProperties: ['mask', 'mask-image'] }],
638
+ 'color-no-invalid-hex': true,
639
+ 'comment-no-empty': true,
640
+ 'comment-whitespace-inside': 'always',
641
+ 'csstools/use-logical': [
642
+ 'always',
643
+ {
644
+ direction: 'ltr',
645
+ except: [
646
+ 'float', // Safari 15+
647
+ /^margin/i,
648
+ /^padding/i,
649
+ /^border-/i,
650
+ ],
651
+ },
652
+ ],
653
+ 'custom-property-empty-line-before': [
654
+ 'always',
655
+ {
656
+ except: ['after-custom-property', 'first-nested'],
657
+ ignore: ['after-comment'],
658
+ },
659
+ ],
660
+ 'custom-property-no-missing-var-function': null, // TODO: https://github.com/stylelint/stylelint/issues/9163
661
+ 'declaration-block-no-duplicate-custom-properties': true,
662
+ 'declaration-block-no-duplicate-properties': [
663
+ true,
664
+ { ignore: ['consecutive-duplicates'] },
665
+ ],
666
+ 'declaration-block-no-redundant-longhand-properties': [
667
+ true,
668
+ {
669
+ ignoreShorthands: [
670
+ 'inset',
671
+ 'mask',
672
+ 'overflow',
673
+ 'margin-inline',
674
+ 'margin-block',
675
+ 'padding-inline',
676
+ 'padding-block',
677
+ 'inset-inline',
678
+ 'inset-block',
679
+ ],
680
+ },
681
+ ],
682
+ 'declaration-block-no-shorthand-property-overrides': true,
683
+ 'declaration-empty-line-before': [
684
+ 'always',
685
+ {
686
+ except: ['first-nested', 'after-declaration'],
687
+ ignore: ['after-comment'],
688
+ },
689
+ ],
690
+ 'declaration-no-important': null,
691
+ 'declaration-property-value-disallowed-list': {
692
+ '/^(?:min|max)-(?:block-size|height)$/': [
693
+ /\bfit-content\b/i, // Firefox bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1672559
694
+ ],
695
+ 'inline-size': ['stretch'],
696
+ width: ['stretch'],
697
+ },
698
+ 'font-family-name-quotes': null,
699
+ 'font-family-no-duplicate-names': true,
700
+ 'font-family-no-missing-generic-family-keyword': true,
701
+ 'font-weight-notation': 'named-where-possible',
702
+ 'function-calc-no-unspaced-operator': true,
703
+ 'function-linear-gradient-no-nonstandard-direction': true,
704
+ 'function-name-case': 'lower',
705
+ 'function-no-unknown': [true, { ignoreFunctions: ['fade', 'lighten', 'darken'] }],
706
+ 'function-url-no-scheme-relative': true,
707
+ 'function-url-quotes': 'always',
708
+ 'keyframe-block-no-duplicate-selectors': true,
709
+ 'keyframe-declaration-no-important': true,
710
+ 'length-zero-no-unit': [true, { ignore: ['custom-properties'] }],
711
+ 'lightness-notation': 'percentage',
712
+ 'logical-css/require-logical-keywords': [
713
+ true,
714
+ {
715
+ ignore: [
716
+ 'clear',
717
+ 'float',
718
+ 'resize',
719
+ 'caption-side',
720
+ 'box-orient', // Legacy line clamping depends on vertical orientation, issue: https://github.com/taiga-family/toolkit/issues/1651
721
+ ],
722
+ },
723
+ ],
724
+ 'logical-css/require-logical-properties': [
725
+ true,
726
+ {
727
+ ignore: [
728
+ 'scroll-margin-bottom',
729
+ 'scroll-margin-top',
730
+ 'scroll-margin-left',
731
+ 'scroll-margin-right',
732
+ 'scroll-padding-bottom',
733
+ 'scroll-padding-top',
734
+ 'scroll-padding-left',
735
+ 'scroll-padding-right',
736
+ 'border-bottom-left-radius',
737
+ 'border-bottom-right-radius',
738
+ 'border-top-left-radius',
739
+ 'border-top-right-radius',
740
+ 'overscroll-behavior-x',
741
+ 'overscroll-behavior-y',
742
+ 'contain-intrinsic-height',
743
+ 'contain-intrinsic-width',
744
+ 'overflow-y',
745
+ 'overflow-x',
746
+ ],
747
+ },
748
+ ],
749
+ 'logical-css/require-logical-units': null, // Safari 15+ supports logical properties but not logical units
750
+ 'media-feature-name-no-unknown': true,
751
+ 'media-feature-name-no-vendor-prefix': null,
752
+ 'media-feature-name-value-no-unknown': true,
753
+ 'named-grid-areas-no-invalid': true,
754
+ 'no-descending-specificity': null,
755
+ 'no-duplicate-at-import-rules': true,
756
+ 'no-duplicate-selectors': true,
757
+ 'no-empty-source': true,
758
+ 'no-invalid-double-slash-comments': true,
759
+ 'no-invalid-position-at-import-rule': null,
760
+ 'no-irregular-whitespace': true,
761
+ 'no-unknown-animations': null,
762
+ 'no-unknown-custom-media': true,
763
+ 'order/properties-order': [
764
+ [
765
+ 'all',
766
+ 'content',
767
+ 'position',
768
+ 'inset',
769
+ {
770
+ order: 'flexible',
771
+ properties: ['top', 'left', 'right', 'bottom'],
772
+ },
773
+ 'z-index',
774
+ 'display',
775
+ ],
776
+ { unspecified: 'bottom' },
777
+ ],
778
+ 'plugin/no-unsupported-browser-features': [
779
+ true,
780
+ {
781
+ browsers: browserslist,
782
+ ignore: [
783
+ 'css-resize',
784
+ 'css3-cursors',
785
+ 'css3-attr',
786
+ 'css-selection',
787
+ 'css-nth-child-of',
788
+ 'css3-cursors-grab',
789
+ 'css-has', // Safari 15.4+
790
+ 'css-nesting', // Safari 17.2+
791
+ 'css-overscroll-behavior', // Safari 16+
792
+ 'css-scroll-behavior', // Safari 15.4+
793
+ 'css-focus-visible', // Safari 15.4+
794
+ 'css-containment', // Safari 15.4+
795
+ 'css-grid-animation', // Safari 16+
796
+ 'css-autofill', // Safari 15+
797
+ 'css-text-align-last', // Safari 16+
798
+ 'css-scrollbar', // Safari 18.2+
799
+ 'css-touch-action', // Safari NaN
800
+ 'css-content-visibility', // Safari 18+
801
+ 'viewport-unit-variants', // Safari 16+
802
+ ],
803
+ ignorePartialSupport: true,
804
+ },
805
+ ],
806
+ 'plugin/use-baseline': [
807
+ true,
808
+ {
809
+ available: 2021, // Safari 14.5 was released by Apple in May 2021
810
+ ignoreAtRules: ['view-transition', 'property', '/^font-/', '/^supports/'],
811
+ ignoreFunctions: [
812
+ 'color-mix', // Safari 16+
813
+ 'rect', // Safari 17+
814
+ 'anchor', // Safari 26+
815
+ 'anchor-size', // Safari 26+
816
+ ],
817
+ ignoreProperties: {
818
+ '/^anchor-/': ['/^.+$/'], // Safari 26+
819
+ '/^animation-/': ['/^.+$/'],
820
+ '/^mask-/': ['/^.+$/'],
821
+ '/^scroll-snap-/': ['/^.+$/'], // Safari 15+
822
+ 'accent-color': ['/^.+$/'], // Safari NaN
823
+ appearance: ['/^.+$/'], // Safari 15+
824
+ 'backdrop-filter': ['/^.+$/'],
825
+ 'backface-visibility': ['/^.+$/'],
826
+ 'box-decoration-break': ['/^.+$/'], // Safari NaN
827
+ clip: ['/^.+$/'],
828
+ 'clip-path': ['/^.+$/'],
829
+ 'color-scheme': ['/^.+$/'],
830
+ contain: ['/^.+$/'], // Safari 15+
831
+ 'contain-intrinsic-block-size': ['/^.+$/'], // Safari 18+
832
+ 'content-visibility': ['/^.+$/'], // Safari 18+
833
+ hyphens: ['auto'],
834
+ 'line-clamp': ['/^.+$/'],
835
+ mask: ['/^.+$/'],
836
+ 'mix-blend-mode': ['/^.+$/'],
837
+ outline: ['/^.+$/'],
838
+ overflow: ['clip'], // Safari 16+
839
+ 'overflow-clip-margin': ['/^.+$/'], // Safari NaN
840
+ 'overflow-wrap': ['anywhere'], // Safari 15+
841
+ 'overscroll-behavior': ['/^.+$/'], // Safari 16+
842
+ 'overscroll-behavior-x': ['/^.+$/'], // Safari 16+
843
+ 'position-anchor': ['/^.+$/'],
844
+ resize: ['/^.+$/'],
845
+ rotate: ['/^.+$/'],
846
+ scale: ['/^.+$/'],
847
+ 'scroll-behavior': ['/^.+$/'], // Safari 15+
848
+ 'scrollbar-width': ['/^.+$/'], // Safari 18.2+
849
+ 'text-decoration': ['currentColor'],
850
+ 'text-wrap': ['/^.+$/'], // Safari 17+
851
+ 'timeline-scope': ['/^.+$/'], // Safari 26+
852
+ translate: ['/^.+$/'],
853
+ 'user-select': ['none', 'auto'],
854
+ 'view-timeline': ['/^.+$/'], // Safari 26+
855
+ 'word-break': ['break-word'],
856
+ 'writing-mode': ['tb'],
857
+ zoom: ['/^.+$/'],
858
+ },
859
+ ignoreSelectors: [
860
+ 'nesting',
861
+ 'host-context',
862
+ 'selection',
863
+ 'has', // Safari 15.4+
864
+ 'focus-visible', // Safari 15+
865
+ 'fullscreen', // Safari 16+
866
+ ],
867
+ ignoreUnits: ['svh'],
868
+ },
869
+ ],
870
+ 'property-disallowed-list': [
871
+ '/^word-wrap$/', // The word-wrap property was renamed to overflow-wrap in CSS3
872
+ ],
873
+ 'property-no-unknown': [true, { ignoreProperties: ['interpolate-size'] }],
874
+ 'property-no-vendor-prefix': null,
875
+ 'rem-over-px/rem-over-px': [
876
+ true,
877
+ {
878
+ fontSize: 16,
879
+ ignore: [
880
+ '-2px',
881
+ '-1px',
882
+ '0.1px',
883
+ '0.2px',
884
+ '0.3px',
885
+ '0.4px',
886
+ '0.5px',
887
+ '0.6px',
888
+ '0.7px',
889
+ '0.8px',
890
+ '0.9px',
891
+ '1px',
892
+ '2px',
893
+ 'font 16px',
894
+ ],
895
+ ignoreAtRules: ['media'],
896
+ ignoreFunctions: ['url'],
897
+ },
898
+ ],
899
+ 'rule-empty-line-before': [
900
+ 'always',
901
+ {
902
+ except: ['first-nested'],
903
+ ignore: ['after-comment'],
904
+ },
905
+ ],
906
+ 'selector-anb-no-unmatchable': true,
907
+ 'selector-attribute-quotes': 'always',
908
+ 'selector-max-id': null,
909
+ 'selector-max-specificity': null,
910
+ 'selector-max-type': null,
911
+ 'selector-no-qualifying-type': null,
912
+ 'selector-no-vendor-prefix': true,
913
+ 'selector-pseudo-class-no-unknown': true,
914
+ 'selector-pseudo-element-colon-notation': 'double',
915
+ 'selector-pseudo-element-no-unknown': [true, { ignorePseudoElements: ['ng-deep'] }],
916
+ 'selector-type-case': 'lower',
917
+ 'selector-type-no-unknown': [
918
+ true,
919
+ {
920
+ ignoreTypes: [
921
+ /^app$/,
922
+ /^markdown$/,
923
+ '/^my-/',
924
+ '/^cdk-/',
925
+ '/^app-/',
926
+ '/^tui-/',
927
+ '/^ng-/',
928
+ ],
929
+ },
930
+ ],
931
+ 'shorthand-property-no-redundant-values': true,
932
+ 'string-no-newline': true,
933
+ 'time-min-milliseconds': null,
934
+ 'unit-allowed-list': [
935
+ 'px',
936
+ 'rem',
937
+ 'em',
938
+ 'deg',
939
+ 's',
940
+ 'ms',
941
+ 'dpcm',
942
+ 'turn',
943
+ 'ch',
944
+ '%',
945
+ 'vh',
946
+ 'vw',
947
+ 'fr',
948
+ 'svh',
949
+ 'lh',
950
+ ],
951
+ 'unit-no-unknown': true,
952
+ 'value-keyword-case': [
953
+ 'lower',
954
+ {
955
+ ignoreKeywords: ['currentColor', 'backgroundColor', 'optimizeLegibility'],
956
+ ignoreProperties: ['/^--/', String.raw `/^\$/`],
957
+ },
958
+ ],
959
+ 'value-no-vendor-prefix': true,
960
+ },
961
+ };
962
+
963
+ export { config as default };
964
+ //# sourceMappingURL=index.esm.js.map