File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -78,6 +78,7 @@ import type { MediaFeatureRangeNotationOptions } from './media-feature-range-not
78
78
import type { MediaQueryNoInvalidOptions } from './media-query-no-invalid'
79
79
import type { MediaTypeNoDeprecatedOptions } from './media-type-no-deprecated'
80
80
import type { NamedGridAreasNoInvalidOptions } from './named-grid-areas-no-invalid'
81
+ import type { NestingSelectorNoMissingScopingRootOptions } from './nesting-selector-no-missing-scoping-root'
81
82
import type { NoDescendingSpecificityOptions } from './no-descending-specificity'
82
83
import type { NoDuplicateAtImportRulesOptions } from './no-duplicate-at-import-rules'
83
84
import type { NoDuplicateSelectorsOptions } from './no-duplicate-selectors'
@@ -1845,6 +1846,23 @@ export interface StyleLintRules {
1845
1846
*/
1846
1847
'named-grid-areas-no-invalid' : NamedGridAreasNoInvalidOptions
1847
1848
1849
+ /**
1850
+ * Disallow missing scoping root for nesting selectors.
1851
+ *
1852
+ * ```scss
1853
+ * & {}
1854
+ * // ^
1855
+ * // This nesting selector
1856
+ * ```
1857
+ *
1858
+ * CSS nesting selectors (`&`) represent the parent selector in nested CSS.
1859
+ * When used at the top level or within certain at-rules without a scoping root,
1860
+ * they can cause unexpected behavior or indicate a mistake in the CSS structure.
1861
+ *
1862
+ * @see [nesting-selector-no-missing-scoping-root](https://stylelint.io/user-guide/rules/nesting-selector-no-missing-scoping-root)
1863
+ */
1864
+ 'nesting-selector-no-missing-scoping-root' : NestingSelectorNoMissingScopingRootOptions
1865
+
1848
1866
/**
1849
1867
* Disallow selectors of lower specificity from coming after overriding selectors of higher specificity.
1850
1868
*
Original file line number Diff line number Diff line change
1
+ import type { RuleConfig } from '../rule-config'
2
+
3
+ export type NestingSelectorNoMissingScopingRootOptions = RuleConfig < true , {
4
+ /**
5
+ * Ignore nesting selectors within specified at-rules.
6
+ */
7
+ ignoreAtRules ?: ( string | RegExp ) [ ]
8
+ } >
You can’t perform that action at this time.
0 commit comments