Skip to content

Commit 337ec5f

Browse files
committed
feat: add rule-nesting-at-rule-required-list rule
1 parent 8e29206 commit 337ec5f

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

src/rules/stylelint/index.d.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ import type { PropertyNoDeprecatedOptions } from './property-no-deprecated'
9797
import type { PropertyNoUnknownOptions } from './property-no-unknown'
9898
import type { PropertyNoVendorPrefixOptions } from './property-no-vendor-prefix'
9999
import type { RuleEmptyLineBeforeOptions } from './rule-empty-line-before'
100+
import type { RuleNestingAtRuleRequiredListOptions } from './rule-nesting-at-rule-required-list'
100101
import type { RuleSelectorPropertyDisallowedListOptions } from './rule-selector-property-disallowed-list'
101102
import type { SectorAnbNoUnmatchableOptions } from './selector-anb-no-unmatchable'
102103
import type { SelectorAttributeNameDisallowedListOptions } from './selector-attribute-name-disallowed-list'
@@ -2261,6 +2262,17 @@ export interface StyleLintRules {
22612262
*/
22622263
'rule-empty-line-before': RuleEmptyLineBeforeOptions
22632264

2265+
/**
2266+
* Require rules to be nested in specific at-rules.
2267+
*
2268+
* ```scss
2269+
* a { color: red; }
2270+
* // ^^^^^
2271+
* // This rule
2272+
* ```
2273+
*/
2274+
'rule-nesting-at-rule-required-list': RuleNestingAtRuleRequiredListOptions
2275+
22642276
/**
22652277
* Specify a list of disallowed properties for selectors within rules.
22662278
*
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import type { RuleConfig } from '../rule-config'
2+
3+
export type RuleNestingAtRuleRequiredListOptions = RuleConfig<(string | RegExp)[]>

0 commit comments

Comments
 (0)