Skip to content

Commit df276d1

Browse files
committed
feat: add at-rule-descriptor-value-no-unknown rule
1 parent 5dd4057 commit df276d1

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import type { RuleConfig } from '../rule-config'
2+
3+
export type AtRuleDescriptorValueNoUnknownOptions = RuleConfig<true, {
4+
message?: string | ((descriptor: string, value: string) => string)
5+
}>

src/rules/stylelint/index.d.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import type { AlphaValueNotationOptions } from './alpha-value-notation'
22
import type { AnnotationNoUnknownOptions } from './annotation-no-unknown'
33
import type { AtRuleAllowedListOptions } from './at-rule-allowed-list'
44
import type { AtRuleDescriptorNoUnknownOptions } from './at-rule-descriptor-no-unknown'
5+
import type { AtRuleDescriptorValueNoUnknownOptions } from './at-rule-descriptor-value-no-unknown'
56
import type { AtRuleDisallowedListOptions } from './at-rule-disallowed-list'
67
import type { AtRuleEmptyLineBeforeOptions } from './at-rule-empty-line-before'
78
import type { AtRuleNoUnknownOptions } from './at-rule-no-unknown'
@@ -212,6 +213,23 @@ export interface StyleLintRules {
212213
*/
213214
'at-rule-descriptor-no-unknown': AtRuleDescriptorNoUnknownOptions
214215

216+
/**
217+
* Disallow unknown values for descriptors within at-rules.
218+
*
219+
* >``` scss
220+
* >@counter-style foo {
221+
* > system: unknown;
222+
* >// ^^^^^^^
223+
* >// Values like this
224+
* >}
225+
* >```
226+
*
227+
* This rule considers descriptors and values defined in the CSS Specifications, up to and including Editor's Drafts, to be known.
228+
*
229+
* @see [at-rule-descriptor-value-no-unknown](https://stylelint.io/user-guide/rules/at-rule-descriptor-value-no-unknown)
230+
*/
231+
'at-rule-descriptor-value-no-unknown': AtRuleDescriptorValueNoUnknownOptions
232+
215233
/**
216234
* Specify a list of disallowed at-rules.
217235
*

0 commit comments

Comments
 (0)