File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -60,6 +60,7 @@ import type { KeyframeBlockNoDuplicateSelectorsOptions } from './keyframe-block-
60
60
import type { KeyframeDeclarationNoImportantOptions } from './keyframe-declaration-no-important'
61
61
import type { KeyframeSelectorNotationOptions } from './keyframe-selector-notation'
62
62
import type { KeyframesNamePatternOptions } from './keyframes-name-pattern'
63
+ import type { LayerNamePatternOptions } from './layer-name-pattern'
63
64
import type { LengthZeroNoUnitOptions } from './length-zero-no-unit'
64
65
import type { LightnessNotationOptions } from './lightness-notation'
65
66
import type { MaxNestingDepthOptions } from './max-nesting-depth'
@@ -1457,6 +1458,26 @@ export interface StyleLintRules {
1457
1458
*/
1458
1459
'keyframes-name-pattern' : KeyframesNamePatternOptions
1459
1460
1461
+ /**
1462
+ * Specify a pattern for layer names.
1463
+ *
1464
+ * >```scss
1465
+ * >@layer foo {}
1466
+ * >// ^^^
1467
+ * >// This layer name
1468
+ * >```
1469
+ *
1470
+ * ### Primary Options
1471
+ * `string | RegExp`
1472
+ *
1473
+ * A string will be translated into a RegExp like so new RegExp(yourString) — so be sure to escape properly.
1474
+ *
1475
+ * Given the string: `"^[a-z][a-z0-9.-]*$"`
1476
+ *
1477
+ * @see [layer-name-pattern](https://stylelint.io/user-guide/rules/layer-name-pattern)
1478
+ */
1479
+ 'layer-name-pattern' : LayerNamePatternOptions
1480
+
1460
1481
/**
1461
1482
* Disallow units for zero lengths.
1462
1483
*
Original file line number Diff line number Diff line change
1
+ import type { RuleConfig } from '../rule-config'
2
+
3
+ export type LayerNamePatternOptions = RuleConfig < string | RegExp >
You can’t perform that action at this time.
0 commit comments