Discover modules > cue.dev/x/npmjs/stylelint
v0.7.0
#Schema: ¶

JSON schema for the Stylelint configuration files

"extends"?: #simpleStringOrArrayStringRule ¶
"plugins"?: #simpleArrayStringRule ¶
"customSyntax"?: string ¶

Specify a custom syntax to use on your code.

"overrides"?: [...{"files"?: [...string], "customSyntax"?: string, "rules"?: #allRules, ...}] ¶

Provide rule and behavior overrides for files that match particular glob patterns.

[...]:
"files"?: [...string]
[...]: string
"customSyntax"?: string
"rules"?: #allRules
"processors"?: [...matchN(>=1, [string, {[...], [0]: string, [>=1]: {...}}])] ¶

Processors are functions that hook into stylelint's pipeline, modifying code on its way into stylelint and modifying results on their way out

[...]: matchN(>=1, [string, {[...], [0]: string, [>=1]: {...}}])
"ignoreDisables"?: bool ¶

Ignore stylelint-disable (e.g. /* stylelint-disable block-no-empty */) comments.

"ignoreFiles"?: #simpleStringOrArrayStringRule ¶
"defaultSeverity"?: "warning" | "error" ¶

The default severity level for all rules that do not have a severity specified in their secondary options

"reportDescriptionlessDisables"?: #booleanRule ¶
"reportInvalidScopeDisables"?: #booleanRule ¶
"reportNeedlessDisables"?: #booleanRule ¶
"rules"?: #allRules ¶
#allRules:
click to see definition
matchN(30, [
	#atRule & {...},
	#block & {...},
	#color & {...},
	#comment & {...},
	#customMedia & {...},
	#customProperty & {...},
	#declaration & {...},
	#declarationBlock & {...},
	#font & {...},
	#function & {...},
	#generalSheet & {...},
	#keyframeDeclaration & {...},
	#length & {...},
	#lightness & {...},
	#mediaFeature & {...},
	#mediaQuery & {...},
	#mediaQueryList & {...},
	#number & {...},
	#property & {...},
	#rootRule & {...},
	#rule & {...},
	#selector & {...},
	#selectorList & {...},
	#shorthandProperty & {...},
	#string & {...},
	#stylelintDisableComment & {...},
	#time & {...},
	#unit & {...},
	#value & {...},
	#valueList & {...},
])
¶
#alwaysMultiLineRule:
click to see definition
matchN(1, [
	null,
	"always" | "always-multi-line",
	list.MinItems(2) & list.MaxItems(2) & list.UniqueItems() & [
		...matchN(>=1, ["always" | "always-multi-line", #coreRule & (string | {...})])
	],
])
¶
#alwaysNeverRule:
click to see definition
matchN(1, [
	null,
	"always" | "never",
	list.MinItems(2) & list.MaxItems(2) & list.UniqueItems() & [
		...matchN(>=1, ["always" | "never", #coreRule & (string | {...})])
	],
])
¶
#arrayStringRule:
click to see definition
matchN(1, [
	null | string,
	list.MinItems(1) & list.UniqueItems() & [
		...matchN(>=1, [#simpleArrayStringRule & (string | [...] | {...}), #coreRule & (string | [...] | {...})])
	],
])
¶
#atRule:
click to see definition
null | bool | number | string | [...] | {
	"at-rule-blacklist"?: #arrayStringRule

	// Require or disallow an empty line before at-rules
	"at-rule-empty-line-before"?: matchN(1, [
		null,
		"always" | "never",
		list.MinItems(2) & list.MaxItems(2) & list.UniqueItems() & [...matchN(>=1, [
			"always" | "never",
			#coreRule & {...} & {
				"except"?: list.UniqueItems() & list.MinItems(1) & [
					..."all-nested" |
						"after-same-name" |
						"inside-block" |
						"blockless-after-same-name-blockless" |
						"blockless-after-blockless" |
						"first-nested"
				]
				"ignore"?: list.UniqueItems() & list.MinItems(1) & [
					..."after-comment" |
						"first-nested" |
						"inside-block" |
						"blockless-after-same-name-blockless" |
						"blockless-after-blockless"
				]
				"ignoreAtRules"?: #simpleStringOrArrayStringRule
				...
			},
		])],
	])
	"at-rule-name-case"?:          #lowerUpperRule
	"at-rule-name-newline-after"?: #alwaysMultiLineRule

	// Require a single space after at-rule names
	"at-rule-name-space-after"?: matchN(1, [
		null,
		"always" | "always-single-line",
		list.MinItems(2) & list.MaxItems(2) & list.UniqueItems() & [
			...matchN(>=1, ["always" | "always-single-line", #coreRule & (string | {...})])
		],
	])

	// Disallow unknown at-rules
	"at-rule-no-unknown"?: matchN(1, [
		null,
		true,
		list.MinItems(2) & list.MaxItems(2) & list.UniqueItems() & [...matchN(>=1, [
			true,
			#coreRule & {...} & {
				"ignoreAtRules"?: #simpleArrayStringRule
				...
			},
		])],
	])
	"at-rule-no-vendor-prefix"?: #booleanRule

	// Require a newline after the semicolon of at-rules
	"at-rule-semicolon-newline-after"?: matchN(1, [
		null,
		"always",
		list.MinItems(2) & list.MaxItems(2) & list.UniqueItems() & [
			...matchN(>=1, ["always", #coreRule & (string | {...})])
		],
	])

	// Require a single space or disallow whitespace before the semicolons of at-rules
	"at-rule-semicolon-space-before"?: _
	"at-rule-whitelist"?:              #arrayStringRule
	...
}
¶
"at-rule-blacklist"?: #arrayStringRule ¶
"at-rule-empty-line-before"?:
click to see definition
matchN(1, [
	null,
	"always" | "never",
	list.MinItems(2) & list.MaxItems(2) & list.UniqueItems() & [...matchN(>=1, [
		"always" | "never",
		#coreRule & {...} & {
			"except"?: list.UniqueItems() & list.MinItems(1) & [
				..."all-nested" |
					"after-same-name" |
					"inside-block" |
					"blockless-after-same-name-blockless" |
					"blockless-after-blockless" |
					"first-nested"
			]
			"ignore"?: list.UniqueItems() & list.MinItems(1) & [
				..."after-comment" |
					"first-nested" |
					"inside-block" |
					"blockless-after-same-name-blockless" |
					"blockless-after-blockless"
			]
			"ignoreAtRules"?: #simpleStringOrArrayStringRule
			...
		},
	])],
])
¶

Require or disallow an empty line before at-rules

"at-rule-name-case"?: #lowerUpperRule ¶
"at-rule-name-newline-after"?: #alwaysMultiLineRule ¶
"at-rule-name-space-after"?:
click to see definition
matchN(1, [
	null,
	"always" | "always-single-line",
	list.MinItems(2) & list.MaxItems(2) & list.UniqueItems() & [
		...matchN(>=1, ["always" | "always-single-line", #coreRule & (string | {...})])
	],
])
¶

Require a single space after at-rule names

"at-rule-no-unknown"?:
click to see definition
matchN(1, [
	null,
	true,
	list.MinItems(2) & list.MaxItems(2) & list.UniqueItems() & [...matchN(>=1, [
		true,
		#coreRule & {...} & {
			"ignoreAtRules"?: #simpleArrayStringRule
			...
		},
	])],
])
¶

Disallow unknown at-rules

"at-rule-no-vendor-prefix"?: #booleanRule ¶
"at-rule-semicolon-newline-after"?:
click to see definition
matchN(1, [
	null,
	"always",
	list.MinItems(2) & list.MaxItems(2) & list.UniqueItems() & [
		...matchN(>=1, ["always", #coreRule & (string | {...})])
	],
])
¶

Require a newline after the semicolon of at-rules

"at-rule-semicolon-space-before"?: _ ¶

Require a single space or disallow whitespace before the semicolons of at-rules

"at-rule-whitelist"?: #arrayStringRule ¶
#block:
click to see definition
null | bool | number | string | [...] | {
	// Require or disallow an empty line before the closing brace of blocks
	"block-closing-brace-empty-line-before"?: matchN(1, [
		null,
		"always-multi-line" | "never",
		list.MinItems(2) & list.MaxItems(2) & list.UniqueItems() & [
			...matchN(>=1, ["always-multi-line" | "never", #coreRule & (string | {...})])
		],
	])
	"block-closing-brace-newline-after"?:  #newlineSpaceWithIgnoreRule
	"block-closing-brace-newline-before"?: #newlineRule
	"block-closing-brace-space-after"?:    #newlineSpaceRule
	"block-closing-brace-space-before"?:   #newlineSpaceRule
	"block-no-empty"?:                     #booleanRule
	"block-no-single-line"?:               #booleanRule
	"block-opening-brace-newline-after"?:  #newlineRule

	// Require a newline or disallow whitespace before the opening brace of blocks
	"block-opening-brace-newline-before"?: matchN(1, [
		null,
		"always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line",
		list.MinItems(2) & list.MaxItems(2) & list.UniqueItems() & [
			...matchN(>=1, [
				"always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line",
				#coreRule & (string | {...}),
			])
		],
	])
	"block-opening-brace-space-after"?:  #newlineSpaceRule
	"block-opening-brace-space-before"?: #newlineSpaceWithIgnoreRule
	...
}
¶
"block-closing-brace-empty-line-before"?:
click to see definition
matchN(1, [
	null,
	"always-multi-line" | "never",
	list.MinItems(2) & list.MaxItems(2) & list.UniqueItems() & [
		...matchN(>=1, ["always-multi-line" | "never", #coreRule & (string | {...})])
	],
])
¶

Require or disallow an empty line before the closing brace of blocks

"block-closing-brace-newline-after"?: #newlineSpaceWithIgnoreRule ¶
"block-closing-brace-newline-before"?: #newlineRule ¶
"block-closing-brace-space-after"?: #newlineSpaceRule ¶
"block-closing-brace-space-before"?: #newlineSpaceRule ¶
"block-no-empty"?: #booleanRule ¶
"block-no-single-line"?: #booleanRule ¶
"block-opening-brace-newline-after"?: #newlineRule ¶
"block-opening-brace-newline-before"?:
click to see definition
matchN(1, [
	null,
	"always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line",
	list.MinItems(2) & list.MaxItems(2) & list.UniqueItems() & [
		...matchN(>=1, [
			"always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line",
			#coreRule & (string | {...}),
		])
	],
])
¶

Require a newline or disallow whitespace before the opening brace of blocks

"block-opening-brace-space-after"?: #newlineSpaceRule ¶
"block-opening-brace-space-before"?: #newlineSpaceWithIgnoreRule ¶
#booleanRule:
click to see definition
matchN(1, [
	null,
	bool,
	list.MinItems(2) & list.MaxItems(2) & list.UniqueItems() & [...matchN(>=1, [bool, #coreRule & (bool | {...})])],
])
¶
#color:
click to see definition
null | bool | number | string | [...] | {
	"color-hex-case"?: #lowerUpperRule

	// Specify short or long notation for hex colors
	"color-hex-length"?: matchN(1, [
		null,
		"short" | "long",
		list.MinItems(2) & list.MaxItems(2) & list.UniqueItems() & [
			...matchN(>=1, ["short" | "long", #coreRule & (string | {...})])
		],
	])

	// Require (where possible) or disallow named colors
	"color-named"?: matchN(1, [
		null,
		"always-where-possible" | "never",
		list.MinItems(2) & list.MaxItems(2) & list.UniqueItems() & [...matchN(>=1, [
			"always-where-possible" | "never",
			#coreRule & {...} & {
				"ignore"?: #simpleArrayStringRule
				...
			},
		])],
	])
	"color-no-hex"?:         #booleanRule
	"color-no-invalid-hex"?: #booleanRule
	...
}
¶
"color-hex-case"?: #lowerUpperRule ¶
"color-hex-length"?:
click to see definition
matchN(1, [
	null,
	"short" | "long",
	list.MinItems(2) & list.MaxItems(2) & list.UniqueItems() & [
		...matchN(>=1, ["short" | "long", #coreRule & (string | {...})])
	],
])
¶

Specify short or long notation for hex colors

"color-named"?:
click to see definition
matchN(1, [
	null,
	"always-where-possible" | "never",
	list.MinItems(2) & list.MaxItems(2) & list.UniqueItems() & [...matchN(>=1, [
		"always-where-possible" | "never",
		#coreRule & {...} & {
			"ignore"?: #simpleArrayStringRule
			...
		},
	])],
])
¶

Require (where possible) or disallow named colors

"color-no-hex"?: #booleanRule ¶
"color-no-invalid-hex"?: #booleanRule ¶
#comment:
click to see definition
null | bool | number | string | [...] | {
	// Require or disallow an empty line before comments
	"comment-empty-line-before"?: matchN(1, [
		null,
		"always" | "never",
		list.MinItems(2) & list.MaxItems(2) & list.UniqueItems() & [...matchN(>=1, [
			"always" | "never",
			#coreRule & {...} & {
				// Reverse the primary option for comments that are nested and the first child of their parent node
				"except"?: list.UniqueItems() & list.MinItems(1) & [..."first-nested"]

				// Don't require an empty line between comments
				"ignore"?: list.UniqueItems() & list.MinItems(1) & [
					..."between-comments" | "after-comment" | "stylelint-command" | "stylelint-commands"
				]
				...
			},
		])],
	])
	"comment-no-empty"?:          #booleanRule
	"comment-whitespace-inside"?: #alwaysNeverRule
	"comment-word-blacklist"?:    #arrayStringRule
	...
}
¶
"comment-empty-line-before"?:
click to see definition
matchN(1, [
	null,
	"always" | "never",
	list.MinItems(2) & list.MaxItems(2) & list.UniqueItems() & [...matchN(>=1, [
		"always" | "never",
		#coreRule & {...} & {
			// Reverse the primary option for comments that are nested and the first child of their parent node
			"except"?: list.UniqueItems() & list.MinItems(1) & [..."first-nested"]

			// Don't require an empty line between comments
			"ignore"?: list.UniqueItems() & list.MinItems(1) & [
				..."between-comments" | "after-comment" | "stylelint-command" | "stylelint-commands"
			]
			...
		},
	])],
])
¶

Require or disallow an empty line before comments

"comment-no-empty"?: #booleanRule ¶
"comment-whitespace-inside"?: #alwaysNeverRule ¶
"comment-word-blacklist"?: #arrayStringRule ¶
#coreRule: ¶
"disableFix"?: bool ¶
"message"?: string ¶

Custom message that will be used in errors and warnings

"reportDisables"?: bool ¶
"severity"?: "warning" | "error" ¶

Message status

"url"?: net.AbsURL ¶
#customMedia:
click to see definition
null | bool | number | string | [...] | {
	"custom-media-pattern"?: #stringRule

	// Disallow unknown custom media queries
	"no-unknown-custom-media"?: matchN(1, [
		matchN(1, [true, null]),
		list.MaxItems(2) & {
			[matchN(1, [true, null]), ...]
			[1]: #coreRule
		},
	])
	...
}
¶
"custom-media-pattern"?: #stringRule ¶
"no-unknown-custom-media"?: matchN(1, [matchN(1, [true, null]), list.MaxItems(2) & {[matchN(1, [true, null]), ...], [1]: #coreRule}]) ¶

Disallow unknown custom media queries

#customProperty:
click to see definition
null | bool | number | string | [...] | {
	// Require or disallow an empty line before custom properties
	"custom-property-empty-line-before"?: matchN(1, [
		null,
		"always" | "never",
		list.MinItems(2) & list.MaxItems(2) & list.UniqueItems() & [...matchN(>=1, [
			"always" | "never",
			#coreRule & {...} & {
				// Reverse the primary option for custom properties that come after a comment,
				// custom property or first child of their parent node
				"except"?: list.UniqueItems() & list.MinItems(1) & [
					..."after-comment" | "after-custom-property" | "first-nested"
				]

				// Ignore custom properties that are preceded by comments or inside single-line blocks
				"ignore"?: list.UniqueItems() & list.MinItems(1) & [..."after-comment" | "inside-single-line-block"]
				...
			},
		])],
	])
	"custom-property-no-outside-root"?: #booleanRule
	"custom-property-pattern"?:         #stringRule

	// Disallow unknown custom properties
	"no-unknown-custom-properties"?: matchN(1, [
		matchN(1, [true, null]),
		list.MaxItems(2) & {
			[matchN(1, [true, null]), ...]
			[1]: #coreRule
		},
	])
	...
}
¶
"custom-property-empty-line-before"?:
click to see definition
matchN(1, [
	null,
	"always" | "never",
	list.MinItems(2) & list.MaxItems(2) & list.UniqueItems() & [...matchN(>=1, [
		"always" | "never",
		#coreRule & {...} & {
			// Reverse the primary option for custom properties that come after a comment,
			// custom property or first child of their parent node
			"except"?: list.UniqueItems() & list.MinItems(1) & [
				..."after-comment" | "after-custom-property" | "first-nested"
			]

			// Ignore custom properties that are preceded by comments or inside single-line blocks
			"ignore"?: list.UniqueItems() & list.MinItems(1) & [..."after-comment" | "inside-single-line-block"]
			...
		},
	])],
])
¶

Require or disallow an empty line before custom properties

"custom-property-no-outside-root"?: #booleanRule ¶
"custom-property-pattern"?: #stringRule ¶
"no-unknown-custom-properties"?: matchN(1, [matchN(1, [true, null]), list.MaxItems(2) & {[matchN(1, [true, null]), ...], [1]: #coreRule}]) ¶

Disallow unknown custom properties

#declaration:
click to see definition
null | bool | number | string | [...] | {
	"declaration-bang-space-after"?:    #alwaysNeverRule
	"declaration-bang-space-before"?:   #alwaysNeverRule
	"declaration-colon-newline-after"?: #alwaysMultiLineRule

	// Require a single space or disallow whitespace after the colon of declarations
	"declaration-colon-space-after"?: matchN(1, [
		null,
		"always" | "never" | "always-single-line",
		list.MinItems(2) & list.MaxItems(2) & list.UniqueItems() & [
			...matchN(>=1, ["always" | "never" | "always-single-line", #coreRule & (string | {...})])
		],
	])
	"declaration-colon-space-before"?: #alwaysNeverRule

	// Require or disallow an empty line before declarations
	"declaration-empty-line-before"?: matchN(1, [
		null,
		"always" | "never",
		list.MinItems(2) & list.MaxItems(2) & list.UniqueItems() & [...matchN(>=1, [
			"always" | "never",
			#coreRule & {...} & {
				"except"?: list.MinItems(1) & list.UniqueItems() & [
					..."after-comment" | "after-declaration" | "first-nested"
				]
				"ignore"?: list.MinItems(1) & list.UniqueItems() & [
					..."after-comment" | "after-declaration" | "first-nested" | "inside-single-line-block"
				]
				...
			},
		])],
	])
	"declaration-no-important"?:             #booleanRule
	"declaration-property-unit-blacklist"?:  #objectRule
	"declaration-property-unit-whitelist"?:  #objectRule
	"declaration-property-value-blacklist"?: #objectRule

	// Disallow unknown values for properties within declarations
	"declaration-property-value-no-unknown"?: matchN(1, [
		matchN(1, [true, null]),
		list.MaxItems(2) & {
			[matchN(1, [true, null]), ...]
			[1]: #coreRule & {...} & {
				"ignoreProperties"?: [string]: matchN(>=1, [matchN(1, [string, [...string]]), matchN(1, [
					matchN(1, [{...}, =~"^\\/.+\\/i?$"]), [...matchN(>=1, [{...}, =~"^\\/.+\\/i?$"])],
				])])
				"propertiesSyntax"?: [string]: matchN(1, [string, [...string]])
				"typesSyntax"?: [string]:      matchN(1, [string, [...string]])
				...
			}
		},
	])
	"declaration-property-value-whitelist"?: #objectRule
	...
}
¶
"declaration-bang-space-after"?: #alwaysNeverRule ¶
"declaration-bang-space-before"?: #alwaysNeverRule ¶
"declaration-colon-newline-after"?: #alwaysMultiLineRule ¶
"declaration-colon-space-after"?:
click to see definition
matchN(1, [
	null,
	"always" | "never" | "always-single-line",
	list.MinItems(2) & list.MaxItems(2) & list.UniqueItems() & [
		...matchN(>=1, ["always" | "never" | "always-single-line", #coreRule & (string | {...})])
	],
])
¶

Require a single space or disallow whitespace after the colon of declarations

"declaration-colon-space-before"?: #alwaysNeverRule ¶
"declaration-empty-line-before"?:
click to see definition
matchN(1, [
	null,
	"always" | "never",
	list.MinItems(2) & list.MaxItems(2) & list.UniqueItems() & [...matchN(>=1, [
		"always" | "never",
		#coreRule & {...} & {
			"except"?: list.MinItems(1) & list.UniqueItems() & [
				..."after-comment" | "after-declaration" | "first-nested"
			]
			"ignore"?: list.MinItems(1) & list.UniqueItems() & [
				..."after-comment" | "after-declaration" | "first-nested" | "inside-single-line-block"
			]
			...
		},
	])],
])
¶

Require or disallow an empty line before declarations

"declaration-no-important"?: #booleanRule ¶
"declaration-property-unit-blacklist"?: #objectRule ¶
"declaration-property-unit-whitelist"?: #objectRule ¶
"declaration-property-value-blacklist"?: #objectRule ¶
"declaration-property-value-no-unknown"?:
click to see definition
matchN(1, [
	matchN(1, [true, null]),
	list.MaxItems(2) & {
		[matchN(1, [true, null]), ...]
		[1]: #coreRule & {...} & {
			"ignoreProperties"?: [string]: matchN(>=1, [matchN(1, [string, [...string]]), matchN(1, [
				matchN(1, [{...}, =~"^\\/.+\\/i?$"]), [...matchN(>=1, [{...}, =~"^\\/.+\\/i?$"])],
			])])
			"propertiesSyntax"?: [string]: matchN(1, [string, [...string]])
			"typesSyntax"?: [string]:      matchN(1, [string, [...string]])
			...
		}
	},
])
¶

Disallow unknown values for properties within declarations

"declaration-property-value-whitelist"?: #objectRule ¶
#declarationBlock:
click to see definition
null | bool | number | string | [...] | {
	// Disallow duplicate properties within declaration blocks
	"declaration-block-no-duplicate-properties"?: matchN(1, [
		null,
		true,
		list.MinItems(2) & list.MaxItems(2) & list.UniqueItems() & [...matchN(>=1, [
			true,
			#coreRule & {...} & {
				"ignore"?: list.MinItems(1) & list.UniqueItems() & [
					..."consecutive-duplicates" |
						"consecutive-duplicates-with-different-values" |
						"consecutive-duplicates-with-different-syntaxes" |
						"consecutive-duplicates-with-same-prefixless-values"
				]
				"ignoreProperties"?: #simpleArrayStringRule
				...
			},
		])],
	])
	"declaration-block-no-ignored-properties"?: #booleanRule

	// Disallow longhand properties that can be combined into one shorthand property
	"declaration-block-no-redundant-longhand-properties"?: matchN(1, [
		null,
		true,
		list.MinItems(2) & list.MaxItems(2) & list.UniqueItems() & [...matchN(>=1, [
			true,
			#coreRule & {...} & {
				"ignoreShorthands"?: #simpleArrayStringRule
				...
			},
		])],
	])
	"declaration-block-no-shorthand-property-overrides"?: #booleanRule

	// Specify the order of properties within declaration blocks
	"declaration-block-properties-order"?: matchN(1, [
		null,
		"alphabetical",
		list.MinItems(1) & list.UniqueItems() & [...matchN(>=1, [
			"alphabetical",
			string,
			#simpleArrayStringRule & (string | [...] | {...}),
			#coreRule & {...} & {
				order?: _
				if order != _|_ {
					"properties"!: _
				}
				properties?: _
				if properties != _|_ {
					"order"!: _
				}
				{}

				// These options only apply if you've defined your own array of properties
				"unspecified"?: "top" | "bottom" | "bottomAlphabetical" | "ignore"
				"order"?:       "strict" | "flexible"
				"properties"?:  #simpleArrayStringRule
				...
			},
		])],
	])
	"declaration-block-semicolon-newline-after"?:      #newlineRule
	"declaration-block-semicolon-newline-before"?:     #newlineRule
	"declaration-block-semicolon-space-after"?:        #spaceRule
	"declaration-block-semicolon-space-before"?:       #spaceRule
	"declaration-block-single-line-max-declarations"?: #integerRule
	"declaration-block-trailing-semicolon"?:           #alwaysNeverRule
	...
}
¶
"declaration-block-no-duplicate-properties"?:
click to see definition
matchN(1, [
	null,
	true,
	list.MinItems(2) & list.MaxItems(2) & list.UniqueItems() & [...matchN(>=1, [
		true,
		#coreRule & {...} & {
			"ignore"?: list.MinItems(1) & list.UniqueItems() & [
				..."consecutive-duplicates" |
					"consecutive-duplicates-with-different-values" |
					"consecutive-duplicates-with-different-syntaxes" |
					"consecutive-duplicates-with-same-prefixless-values"
			]
			"ignoreProperties"?: #simpleArrayStringRule
			...
		},
	])],
])
¶

Disallow duplicate properties within declaration blocks

"declaration-block-no-ignored-properties"?: #booleanRule ¶
"declaration-block-no-redundant-longhand-properties"?:
click to see definition
matchN(1, [
	null,
	true,
	list.MinItems(2) & list.MaxItems(2) & list.UniqueItems() & [...matchN(>=1, [
		true,
		#coreRule & {...} & {
			"ignoreShorthands"?: #simpleArrayStringRule
			...
		},
	])],
])
¶

Disallow longhand properties that can be combined into one shorthand property

"declaration-block-no-shorthand-property-overrides"?: #booleanRule ¶
"declaration-block-properties-order"?:
click to see definition
matchN(1, [
	null,
	"alphabetical",
	list.MinItems(1) & list.UniqueItems() & [...matchN(>=1, [
		"alphabetical",
		string,
		#simpleArrayStringRule & (string | [...] | {...}),
		#coreRule & {...} & {
			order?: _
			if order != _|_ {
				"properties"!: _
			}
			properties?: _
			if properties != _|_ {
				"order"!: _
			}
			{}

			// These options only apply if you've defined your own array of properties
			"unspecified"?: "top" | "bottom" | "bottomAlphabetical" | "ignore"
			"order"?:       "strict" | "flexible"
			"properties"?:  #simpleArrayStringRule
			...
		},
	])],
])
¶

Specify the order of properties within declaration blocks

"declaration-block-semicolon-newline-after"?: #newlineRule ¶
"declaration-block-semicolon-newline-before"?: #newlineRule ¶
"declaration-block-semicolon-space-after"?: #spaceRule ¶
"declaration-block-semicolon-space-before"?: #spaceRule ¶
"declaration-block-single-line-max-declarations"?: #integerRule ¶
"declaration-block-trailing-semicolon"?: #alwaysNeverRule ¶
#font:
click to see definition
null | bool | number | string | [...] | {
	// Specify whether or not quotation marks should be used around font family names
	"font-family-name-quotes"?: matchN(1, [
		null,
		"always-where-required" | "always-where-recommended" | "always-unless-keyword",
		list.MinItems(2) & list.MaxItems(2) & list.UniqueItems() & [
			...matchN(>=1, [
				"always-where-required" | "always-where-recommended" | "always-unless-keyword",
				#coreRule & (string | {...}),
			])
		],
	])

	// Require numeric or named (where possible) `font-weight` values. Also, when
	// named values are expected, require only valid names
	"font-weight-notation"?: matchN(1, [
		null,
		"numeric" | "named-where-possible",
		list.MinItems(2) & list.MaxItems(2) & list.UniqueItems() & [...matchN(>=1, [
			"numeric" | "named-where-possible",
			#coreRule & {...} & {
				"ignore"?: list.UniqueItems() & list.MinItems(1) & [..."relative"]
				...
			},
		])],
	])
	...
}
¶
"font-family-name-quotes"?:
click to see definition
matchN(1, [
	null,
	"always-where-required" | "always-where-recommended" | "always-unless-keyword",
	list.MinItems(2) & list.MaxItems(2) & list.UniqueItems() & [
		...matchN(>=1, [
			"always-where-required" | "always-where-recommended" | "always-unless-keyword",
			#coreRule & (string | {...}),
		])
	],
])
¶

Specify whether or not quotation marks should be used around font family names

"font-weight-notation"?:
click to see definition
matchN(1, [
	null,
	"numeric" | "named-where-possible",
	list.MinItems(2) & list.MaxItems(2) & list.UniqueItems() & [...matchN(>=1, [
		"numeric" | "named-where-possible",
		#coreRule & {...} & {
			"ignore"?: list.UniqueItems() & list.MinItems(1) & [..."relative"]
			...
		},
	])],
])
¶

Require numeric or named (where possible) `font-weight` values. Also, when named values are expected, require only valid names

#function:
click to see definition
null | bool | number | string | [...] | {
	"function-blacklist"?:                                #arrayStringRule
	"function-calc-no-unspaced-operator"?:                #booleanRule
	"function-comma-newline-after"?:                      #newlineRule
	"function-comma-newline-before"?:                     #newlineRule
	"function-comma-space-after"?:                        #spaceRule
	"function-comma-space-before"?:                       #spaceRule
	"function-linear-gradient-no-nonstandard-direction"?: #booleanRule
	"function-max-empty-lines"?:                          #integerRule

	// Specify lowercase or uppercase for function names
	"function-name-case"?: matchN(1, [
		null,
		"lower" | "upper",
		list.MinItems(2) & list.MaxItems(2) & list.UniqueItems() & [...matchN(>=1, [
			"lower" | "upper",
			#coreRule & {...} & {
				"ignoreFunctions"?: #simpleArrayStringRule
				...
			},
		])],
	])
	"function-parentheses-newline-inside"?: #newlineRule
	"function-parentheses-space-inside"?:   #spaceRule
	"function-url-data-uris"?:              #alwaysNeverRule
	"function-url-no-scheme-relative"?:     #booleanRule
	"function-url-quotes"?:                 #alwaysNeverRule
	"function-url-scheme-whitelist"?:       #arrayStringRule
	"function-whitelist"?:                  #arrayStringRule
	"function-whitespace-after"?:           #alwaysNeverRule
	...
}
¶
"function-blacklist"?: #arrayStringRule ¶
"function-calc-no-unspaced-operator"?: #booleanRule ¶
"function-comma-newline-after"?: #newlineRule ¶
"function-comma-newline-before"?: #newlineRule ¶
"function-comma-space-after"?: #spaceRule ¶
"function-comma-space-before"?: #spaceRule ¶
"function-linear-gradient-no-nonstandard-direction"?: #booleanRule ¶
"function-max-empty-lines"?: #integerRule ¶
"function-name-case"?:
click to see definition
matchN(1, [
	null,
	"lower" | "upper",
	list.MinItems(2) & list.MaxItems(2) & list.UniqueItems() & [...matchN(>=1, [
		"lower" | "upper",
		#coreRule & {...} & {
			"ignoreFunctions"?: #simpleArrayStringRule
			...
		},
	])],
])
¶

Specify lowercase or uppercase for function names

"function-parentheses-newline-inside"?: #newlineRule ¶
"function-parentheses-space-inside"?: #spaceRule ¶
"function-url-data-uris"?: #alwaysNeverRule ¶
"function-url-no-scheme-relative"?: #booleanRule ¶
"function-url-quotes"?: #alwaysNeverRule ¶
"function-url-scheme-whitelist"?: #arrayStringRule ¶
"function-whitelist"?: #arrayStringRule ¶
"function-whitespace-after"?: #alwaysNeverRule ¶
#generalSheet:
click to see definition
null | bool | number | string | [...] | {
	// Specify indentation
	"indentation"?: matchN(1, [
		null | int,
		"tab",
		list.MinItems(1) & list.UniqueItems() & [...int],
		list.MinItems(2) & list.MaxItems(2) & list.UniqueItems() & [...matchN(>=1, [
			int,
			"tab",
			#coreRule & {...} & {
				// If `true`, the closing brace of a block (rule or at-rule) will be expected at
				// the same indentation level as the block's inner nodes
				"indentInsideParens"?: "twice" | "once-at-root-twice-in-block"

				// Do not indent for these things
				"except"?: list.UniqueItems() & list.MinItems(1) & [..."block" | "param" | "value"]

				// Ignore the indentation inside parentheses
				"ignore"?: list.UniqueItems() & list.MinItems(1) & [..."inside-parens" | "param" | "value"]
				...
			},
		]) &
			(int | string | {...})],
	]) &
		(null | int | string | [...])

	// Specify unix or windows linebreaks
	"linebreaks"?:      _
	"max-empty-lines"?: #integerRule

	// Limit the length of a line
	"max-line-length"?: matchN(1, [
		null | int,
		list.MinItems(2) & list.MaxItems(2) & list.UniqueItems() & [...matchN(>=1, [
			int,
			#coreRule & {...} & {
				"ignore"?: matchN(>=1, [
					"non-comments" | "comments",
					list.UniqueItems() & list.MinItems(1) & [..."non-comments" | "comments"],
				])
				...
			},
		]) &
			(int | {...})],
	]) &
		(null | int | [...])

	// Limit the allowed nesting depth
	"max-nesting-depth"?: matchN(1, [
		null | int,
		list.MinItems(2) & list.MaxItems(2) & list.UniqueItems() & [...matchN(>=1, [
			int,
			#coreRule & {...} & {
				"ignore"?: list.UniqueItems() & list.MinItems(1) & [
					..."at-rules-without-declaration-blocks" | "blockless-at-rules" | "pseudo-classes"
				]
				"ignoreAtRules"?: #simpleArrayStringRule
				...
			},
		]) &
			(int | {...})],
	]) &
		(null | int | [...])

	// Disallow browser hacks that are irrelevant to the browsers you are targeting
	"no-browser-hacks"?: matchN(1, [
		null,
		true,
		list.MinItems(2) & list.MaxItems(2) & list.UniqueItems() & [...matchN(>=1, [
			true,
			#coreRule & {...} & {
				"browsers"?: #simpleStringOrArrayStringRule
				...
			},
		])],
	])
	"no-descending-specificity"?: #booleanRule
	"no-duplicate-selectors"?:    #booleanRule

	// Disallow empty first lines
	"no-empty-first-line"?: _
	"no-empty-source"?:     #booleanRule

	// Disallow end-of-line whitespace
	"no-eol-whitespace"?: matchN(1, [
		null,
		true,
		list.MinItems(2) & list.MaxItems(2) & list.UniqueItems() & [...matchN(>=1, [
			true,
			#coreRule & {...} & {
				"ignore"?: list.UniqueItems() & list.MinItems(1) & [..."empty-lines"]
				...
			},
		])],
	])
	"no-extra-semicolons"?: #booleanRule

	// Disallow colors that are suspiciously close to being identical
	"no-indistinguishable-colors"?: matchN(1, [
		null,
		true,
		list.MinItems(2) & list.MaxItems(2) & list.UniqueItems() & [...matchN(>=1, [
			true,
			#coreRule & {...} & {
				"threshold"?: int & >=0 & <=100
				"ignore"?:    #simpleArrayStringRule

				// An array of color pairs to ignore. Each pair is an array with two items
				"whitelist"?: list.UniqueItems() & list.MinItems(1) & [...#simpleArrayStringRule]
				...
			},
		])],
	])
	"no-invalid-double-slash-comments"?: #booleanRule
	"no-missing-end-of-source-newline"?: #booleanRule
	"no-unknown-animations"?:            #booleanRule
	"unicode-bom"?:                      #alwaysNeverRule

	// Disallow features that are unsupported by the browsers that you are targeting
	"no-unsupported-browser-features"?: matchN(1, [
		null,
		true,
		list.MinItems(2) & list.MaxItems(2) & list.UniqueItems() & [...matchN(>=1, [
			true,
			#coreRule & {...} & {
				"browsers"?: string
				"ignore"?:   #simpleStringOrArrayStringRule
				...
			},
		])],
	])
	...
}
¶
"indentation"?:
click to see definition
matchN(1, [
	null | int,
	"tab",
	list.MinItems(1) & list.UniqueItems() & [...int],
	list.MinItems(2) & list.MaxItems(2) & list.UniqueItems() & [...matchN(>=1, [
		int,
		"tab",
		#coreRule & {...} & {
			// If `true`, the closing brace of a block (rule or at-rule) will be expected at
			// the same indentation level as the block's inner nodes
			"indentInsideParens"?: "twice" | "once-at-root-twice-in-block"

			// Do not indent for these things
			"except"?: list.UniqueItems() & list.MinItems(1) & [..."block" | "param" | "value"]

			// Ignore the indentation inside parentheses
			"ignore"?: list.UniqueItems() & list.MinItems(1) & [..."inside-parens" | "param" | "value"]
			...
		},
	]) &
		(int | string | {...})],
]) &
	(null | int | string | [...])
¶

Specify indentation

"linebreaks"?: _ ¶

Specify unix or windows linebreaks

"max-empty-lines"?: #integerRule ¶
"max-line-length"?:
click to see definition
matchN(1, [
	null | int,
	list.MinItems(2) & list.MaxItems(2) & list.UniqueItems() & [...matchN(>=1, [
		int,
		#coreRule & {...} & {
			"ignore"?: matchN(>=1, [
				"non-comments" | "comments",
				list.UniqueItems() & list.MinItems(1) & [..."non-comments" | "comments"],
			])
			...
		},
	]) &
		(int | {...})],
]) &
	(null | int | [...])
¶

Limit the length of a line

"max-nesting-depth"?:
click to see definition
matchN(1, [
	null | int,
	list.MinItems(2) & list.MaxItems(2) & list.UniqueItems() & [...matchN(>=1, [
		int,
		#coreRule & {...} & {
			"ignore"?: list.UniqueItems() & list.MinItems(1) & [
				..."at-rules-without-declaration-blocks" | "blockless-at-rules" | "pseudo-classes"
			]
			"ignoreAtRules"?: #simpleArrayStringRule
			...
		},
	]) &
		(int | {...})],
]) &
	(null | int | [...])
¶

Limit the allowed nesting depth

"no-browser-hacks"?:
click to see definition
matchN(1, [
	null,
	true,
	list.MinItems(2) & list.MaxItems(2) & list.UniqueItems() & [...matchN(>=1, [
		true,
		#coreRule & {...} & {
			"browsers"?: #simpleStringOrArrayStringRule
			...
		},
	])],
])
¶

Disallow browser hacks that are irrelevant to the browsers you are targeting

"no-descending-specificity"?: #booleanRule ¶
"no-duplicate-selectors"?: #booleanRule ¶
"no-empty-first-line"?: _ ¶

Disallow empty first lines

"no-empty-source"?: #booleanRule ¶
"no-eol-whitespace"?:
click to see definition
matchN(1, [
	null,
	true,
	list.MinItems(2) & list.MaxItems(2) & list.UniqueItems() & [...matchN(>=1, [
		true,
		#coreRule & {...} & {
			"ignore"?: list.UniqueItems() & list.MinItems(1) & [..."empty-lines"]
			...
		},
	])],
])
¶

Disallow end-of-line whitespace

"no-extra-semicolons"?: #booleanRule ¶
"no-indistinguishable-colors"?:
click to see definition
matchN(1, [
	null,
	true,
	list.MinItems(2) & list.MaxItems(2) & list.UniqueItems() & [...matchN(>=1, [
		true,
		#coreRule & {...} & {
			"threshold"?: int & >=0 & <=100
			"ignore"?:    #simpleArrayStringRule

			// An array of color pairs to ignore. Each pair is an array with two items
			"whitelist"?: list.UniqueItems() & list.MinItems(1) & [...#simpleArrayStringRule]
			...
		},
	])],
])
¶

Disallow colors that are suspiciously close to being identical

"no-invalid-double-slash-comments"?: #booleanRule ¶
"no-missing-end-of-source-newline"?: #booleanRule ¶
"no-unknown-animations"?: #booleanRule ¶
"unicode-bom"?: #alwaysNeverRule ¶
"no-unsupported-browser-features"?:
click to see definition
matchN(1, [
	null,
	true,
	list.MinItems(2) & list.MaxItems(2) & list.UniqueItems() & [...matchN(>=1, [
		true,
		#coreRule & {...} & {
			"browsers"?: string
			"ignore"?:   #simpleStringOrArrayStringRule
			...
		},
	])],
])
¶

Disallow features that are unsupported by the browsers that you are targeting

#integerRule:
click to see definition
matchN(1, [
	null | int,
	list.MinItems(2) & list.MaxItems(2) & list.UniqueItems() & [...#coreRule & (number | {...}) & (int | {...})],
]) &
	(null | int | [...])
¶
#keyframeDeclaration: null | bool | number | string | [...] | {"keyframe-declaration-no-important"?: #booleanRule, ...} ¶
"keyframe-declaration-no-important"?: #booleanRule ¶
#length: null | bool | number | string | [...] | {"length-zero-no-unit"?: #booleanRule, ...} ¶
"length-zero-no-unit"?: #booleanRule ¶
#lightness:
click to see definition
null | bool | number | string | [...] | {
	// Specify number or percentage notation for lightness
	"lightness-notation"?: matchN(1, [
		matchN(1, ["percentage" | "number", null]),
		list.MaxItems(2) & {
			[matchN(1, ["percentage" | "number", null]), ...]
			[1]: #coreRule
		},
	])
	...
}
¶
"lightness-notation"?:
click to see definition
matchN(1, [
	matchN(1, ["percentage" | "number", null]),
	list.MaxItems(2) & {
		[matchN(1, ["percentage" | "number", null]), ...]
		[1]: #coreRule
	},
])
¶

Specify number or percentage notation for lightness

#lowerUpperRule:
click to see definition
matchN(1, [
	null,
	"lower" | "upper",
	list.MinItems(2) & list.MaxItems(2) & list.UniqueItems() & [
		...matchN(>=1, ["lower" | "upper", #coreRule & (string | {...})])
	],
])
¶
#mediaFeature:
click to see definition
null | bool | number | string | [...] | {
	"media-feature-colon-space-after"?:  #alwaysNeverRule
	"media-feature-colon-space-before"?: #alwaysNeverRule
	"media-feature-name-case"?:          #lowerUpperRule

	// Disallow unknown media feature names
	"media-feature-name-no-unknown"?: matchN(1, [
		null,
		true,
		list.MinItems(2) & list.MaxItems(2) & list.UniqueItems() & [...matchN(>=1, [
			true,
			#coreRule & {...} & {
				"ignoreMediaFeatureNames"?: #simpleArrayStringRule
				...
			},
		])],
	])

	// Disallow unknown values for media features
	"media-feature-name-value-no-unknown"?: matchN(1, [
		matchN(1, [true, null]),
		list.MaxItems(2) & {
			[matchN(1, [true, null]), ...]
			[1]: #coreRule
		},
	])
	"media-feature-name-no-vendor-prefix"?: #booleanRule

	// Specify a list of allowed name and unit pairs within media features
	"media-feature-name-unit-allowed-list"?: matchN(1, [
		matchN(1, [{[string]: matchN(1, [string, [...string]])}, null]),
		list.MaxItems(2) & {
			[matchN(1, [{[string]: matchN(1, [string, [...string]])}, null]), ...]
			[1]: #coreRule
		},
	])
	"media-feature-no-missing-punctuation"?:   #booleanRule
	"media-feature-parentheses-space-inside"?: #alwaysNeverRule

	// Specify context or prefix notation for media feature ranges
	"media-feature-range-notation"?: matchN(1, [
		matchN(1, ["prefix" | "context", null]),
		list.MaxItems(2) & {
			[matchN(1, ["prefix" | "context", null]), ...]
			[1]: #coreRule
		},
	])
	"media-feature-range-operator-space-after"?:  #alwaysNeverRule
	"media-feature-range-operator-space-before"?: #alwaysNeverRule
	...
}
¶
"media-feature-colon-space-after"?: #alwaysNeverRule ¶
"media-feature-colon-space-before"?: #alwaysNeverRule ¶
"media-feature-name-case"?: #lowerUpperRule ¶
"media-feature-name-no-unknown"?:
click to see definition
matchN(1, [
	null,
	true,
	list.MinItems(2) & list.MaxItems(2) & list.UniqueItems() & [...matchN(>=1, [
		true,
		#coreRule & {...} & {
			"ignoreMediaFeatureNames"?: #simpleArrayStringRule
			...
		},
	])],
])
¶

Disallow unknown media feature names

"media-feature-name-value-no-unknown"?: matchN(1, [matchN(1, [true, null]), list.MaxItems(2) & {[matchN(1, [true, null]), ...], [1]: #coreRule}]) ¶

Disallow unknown values for media features

"media-feature-name-no-vendor-prefix"?: #booleanRule ¶
"media-feature-name-unit-allowed-list"?:
click to see definition
matchN(1, [
	matchN(1, [{[string]: matchN(1, [string, [...string]])}, null]),
	list.MaxItems(2) & {
		[matchN(1, [{[string]: matchN(1, [string, [...string]])}, null]), ...]
		[1]: #coreRule
	},
])
¶

Specify a list of allowed name and unit pairs within media features

"media-feature-no-missing-punctuation"?: #booleanRule ¶
"media-feature-parentheses-space-inside"?: #alwaysNeverRule ¶
"media-feature-range-notation"?:
click to see definition
matchN(1, [
	matchN(1, ["prefix" | "context", null]),
	list.MaxItems(2) & {
		[matchN(1, ["prefix" | "context", null]), ...]
		[1]: #coreRule
	},
])
¶

Specify context or prefix notation for media feature ranges

"media-feature-range-operator-space-after"?: #alwaysNeverRule ¶
"media-feature-range-operator-space-before"?: #alwaysNeverRule ¶
#mediaQuery:
click to see definition
null | bool | number | string | [...] | {
	// Disallow invalid media queries
	"media-query-no-invalid"?: matchN(1, [
		matchN(1, [true, null]),
		list.MaxItems(2) & {
			[matchN(1, [true, null]), ...]
			[1]: #coreRule
		},
	])
	...
}
¶
"media-query-no-invalid"?: matchN(1, [matchN(1, [true, null]), list.MaxItems(2) & {[matchN(1, [true, null]), ...], [1]: #coreRule}]) ¶

Disallow invalid media queries

#mediaQueryList:
click to see definition
null | bool | number | string | [...] | {
	"media-query-list-comma-newline-after"?:  #newlineRule
	"media-query-list-comma-newline-before"?: #newlineRule
	"media-query-list-comma-space-after"?:    #spaceRule
	"media-query-list-comma-space-before"?:   #spaceRule
	...
}
¶
"media-query-list-comma-newline-after"?: #newlineRule ¶
"media-query-list-comma-newline-before"?: #newlineRule ¶
"media-query-list-comma-space-after"?: #spaceRule ¶
"media-query-list-comma-space-before"?: #spaceRule ¶
#newlineRule:
click to see definition
matchN(1, [
	null,
	"always" | "always-multi-line" | "never-multi-line",
	list.MinItems(2) & list.MaxItems(2) & list.UniqueItems() & [
		...matchN(>=1, ["always" | "always-multi-line" | "never-multi-line", #coreRule & (string | {...})])
	],
])
¶
#newlineSpaceRule:
click to see definition
matchN(1, [
	null,
	"always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line",
	list.MinItems(2) & list.MaxItems(2) & list.UniqueItems() & [
		...matchN(>=1, [
			"always" |
				"never" |
				"always-single-line" |
				"never-single-line" |
				"always-multi-line" |
				"never-multi-line",
			#coreRule & (string | {...}),
		])
	],
])
¶
#newlineSpaceWithIgnoreRule:
click to see definition
matchN(1, [
	null,
	"always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line",
	list.MinItems(2) & list.MaxItems(2) & list.UniqueItems() & [...matchN(>=1, [
		"always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line",
		#coreRule & {...} & {
			"ignoreAtRules"?: #simpleStringOrArrayStringRule
			...
		},
	])],
])
¶
#number:
click to see definition
null | bool | number | string | [...] | {
	"number-leading-zero"?:      #alwaysNeverRule
	"number-max-precision"?:     #integerRule
	"number-no-trailing-zeros"?: #booleanRule
	...
}
¶
"number-leading-zero"?: #alwaysNeverRule ¶
"number-max-precision"?: #integerRule ¶
"number-no-trailing-zeros"?: #booleanRule ¶
#objectRule:
click to see definition
matchN(1, [
	null,
	{[string]: #simpleStringOrArrayStringRule},
	list.MaxItems(2) & [{[string]: #simpleStringOrArrayStringRule}, #coreRule, ...],
])
¶
#property:
click to see definition
null | bool | number | string | [...] | {
	"property-blacklist"?: #arrayStringRule
	"property-case"?:      #lowerUpperRule

	// Disallow unknown properties
	"property-no-unknown"?: matchN(1, [
		null,
		true,
		list.MinItems(2) & list.MaxItems(2) & list.UniqueItems() & [...matchN(>=1, [
			true,
			#coreRule & {...} & {
				"ignoreProperties"?: #simpleArrayStringRule

				// If `true`, this rule will check vendor-prefixed properties
				"checkPrefixed"?: bool
				...
			},
		])],
	])
	"property-no-vendor-prefix"?: #booleanRule
	"property-whitelist"?:        #arrayStringRule
	...
}
¶
"property-blacklist"?: #arrayStringRule ¶
"property-case"?: #lowerUpperRule ¶
"property-no-unknown"?:
click to see definition
matchN(1, [
	null,
	true,
	list.MinItems(2) & list.MaxItems(2) & list.UniqueItems() & [...matchN(>=1, [
		true,
		#coreRule & {...} & {
			"ignoreProperties"?: #simpleArrayStringRule

			// If `true`, this rule will check vendor-prefixed properties
			"checkPrefixed"?: bool
			...
		},
	])],
])
¶

Disallow unknown properties

"property-no-vendor-prefix"?: #booleanRule ¶
"property-whitelist"?: #arrayStringRule ¶
#rootRule: null | bool | number | string | [...] | {"root-no-standard-properties"?: #booleanRule, ...} ¶
"root-no-standard-properties"?: #booleanRule ¶
#rule:
click to see definition
null | bool | number | string | [...] | {
	// Require or disallow an empty line before nested rules
	"rule-nested-empty-line-before"?: matchN(1, [
		null,
		"always" | "never" | "always-multi-line" | "never-multi-line",
		list.MinItems(2) & list.MaxItems(2) & list.UniqueItems() & [...matchN(>=1, [
			"always" | "never" | "always-multi-line" | "never-multi-line",
			#coreRule & {...} & {
				// Reverse the primary option if the rule is the first in a block
				"except"?: list.UniqueItems() & list.MinItems(1) & [..."first-nested"]

				// Ignore rules that come after a comment
				"ignore"?: list.UniqueItems() & list.MinItems(1) & [..."after-comment"]
				...
			},
		])],
	])

	// Require or disallow an empty line before non-nested rules
	"rule-non-nested-empty-line-before"?: matchN(1, [
		null,
		"always" | "never" | "always-multi-line" | "never-multi-line",
		list.MinItems(2) & list.MaxItems(2) & list.UniqueItems() & [...matchN(>=1, [
			"always" | "never" | "always-multi-line" | "never-multi-line",
			#coreRule & {...} & {
				// Reverse the primary option if the rule is the first in a block
				"except"?: list.UniqueItems() & list.MinItems(1) & [..."after-single-line-comment"]

				// Ignore rules that come after a comment
				"ignore"?: list.UniqueItems() & list.MinItems(1) & [..."after-comment"]
				...
			},
		])],
	])
	...
}
¶
"rule-nested-empty-line-before"?:
click to see definition
matchN(1, [
	null,
	"always" | "never" | "always-multi-line" | "never-multi-line",
	list.MinItems(2) & list.MaxItems(2) & list.UniqueItems() & [...matchN(>=1, [
		"always" | "never" | "always-multi-line" | "never-multi-line",
		#coreRule & {...} & {
			// Reverse the primary option if the rule is the first in a block
			"except"?: list.UniqueItems() & list.MinItems(1) & [..."first-nested"]

			// Ignore rules that come after a comment
			"ignore"?: list.UniqueItems() & list.MinItems(1) & [..."after-comment"]
			...
		},
	])],
])
¶

Require or disallow an empty line before nested rules

"rule-non-nested-empty-line-before"?:
click to see definition
matchN(1, [
	null,
	"always" | "never" | "always-multi-line" | "never-multi-line",
	list.MinItems(2) & list.MaxItems(2) & list.UniqueItems() & [...matchN(>=1, [
		"always" | "never" | "always-multi-line" | "never-multi-line",
		#coreRule & {...} & {
			// Reverse the primary option if the rule is the first in a block
			"except"?: list.UniqueItems() & list.MinItems(1) & [..."after-single-line-comment"]

			// Ignore rules that come after a comment
			"ignore"?: list.UniqueItems() & list.MinItems(1) & [..."after-comment"]
			...
		},
	])],
])
¶

Require or disallow an empty line before non-nested rules

#selector:
click to see definition
null | bool | number | string | [...] | {
	// Disallow unmatchable An+B selectors
	"selector-anb-no-unmatchable"?: matchN(1, [
		matchN(1, [true, null]),
		list.MaxItems(2) & {
			[matchN(1, [true, null]), ...]
			[1]: #coreRule
		},
	])
	"selector-attribute-brackets-space-inside"?: #alwaysNeverRule
	"selector-attribute-operator-blacklist"?:    #arrayStringRule
	"selector-attribute-operator-space-after"?:  #alwaysNeverRule
	"selector-attribute-operator-space-before"?: #alwaysNeverRule
	"selector-attribute-operator-whitelist"?:    #arrayStringRule
	"selector-attribute-quotes"?:                #alwaysNeverRule

	// Specify a pattern for class selectors
	"selector-class-pattern"?: matchN(1, [
		null | string,
		list.MinItems(2) & list.MaxItems(2) & list.UniqueItems() & [...matchN(>=1, [
			string,
			#coreRule & {...} & {
				// This option will resolve nested selectors with `&` interpolation
				"resolveNestedSelectors"?: bool
				...
			},
		])],
	])
	"selector-combinator-space-after"?:             #alwaysNeverRule
	"selector-combinator-space-before"?:            #alwaysNeverRule
	"selector-descendant-combinator-no-non-space"?: #booleanRule
	"selector-id-pattern"?:                         #stringRule
	"selector-max-compound-selectors"?:             #integerRule
	"selector-max-specificity"?:                    #stringRule
	"selector-nested-pattern"?:                     #stringRule
	"selector-no-attribute"?:                       #booleanRule
	"selector-no-combinator"?:                      #booleanRule
	"selector-no-id"?:                              #booleanRule

	// Disallow qualifying a selector by type
	"selector-no-qualifying-type"?: matchN(1, [
		null,
		true,
		list.MinItems(2) & list.MaxItems(2) & list.UniqueItems() & [...matchN(>=1, [
			true,
			#coreRule & {...} & {
				"ignore"?: list.UniqueItems() & list.MinItems(1) & [..."attribute" | "class" | "id"]
				...
			},
		])],
	])

	// Disallow type selectors
	"selector-no-type"?: matchN(1, [
		null,
		true,
		list.MinItems(2) & list.MaxItems(2) & list.UniqueItems() & [...matchN(>=1, [
			true,
			#coreRule & {...} & {
				"ignore"?:      list.UniqueItems() & list.MinItems(1) & [..."compounded" | "descendant"]
				"ignoreTypes"?: #simpleArrayStringRule
				...
			},
		])],
	])
	"selector-no-universal"?:      #booleanRule
	"selector-no-vendor-prefix"?:  #booleanRule
	"selector-pseudo-class-case"?: #lowerUpperRule

	// Disallow unknown pseudo-class selectors
	"selector-pseudo-class-no-unknown"?: matchN(1, [
		null,
		true,
		list.MinItems(2) & list.MaxItems(2) & list.UniqueItems() & [...matchN(>=1, [
			true,
			#coreRule & {...} & {
				"ignorePseudoClasses"?: #simpleArrayStringRule
				...
			},
		])],
	])
	"selector-pseudo-class-parentheses-space-inside"?: #alwaysNeverRule
	"selector-pseudo-class-whitelist"?:                #arrayStringRule
	"selector-pseudo-element-case"?:                   #lowerUpperRule
	"selector-pseudo-element-colon-notation"?:         #singleDoubleRule

	// Disallow unknown pseudo-element selectors
	"selector-pseudo-element-no-unknown"?: matchN(1, [
		null,
		true,
		list.MinItems(2) & list.MaxItems(2) & list.UniqueItems() & [...matchN(>=1, [
			true,
			#coreRule & {...} & {
				"ignorePseudoElements"?: #simpleArrayStringRule
				...
			},
		])],
	])
	"selector-root-no-composition"?: #booleanRule
	"selector-type-case"?:           #lowerUpperRule

	// Disallow unknown type selectors
	"selector-type-no-unknown"?: matchN(1, [
		null,
		true,
		list.MinItems(2) & list.MaxItems(2) & list.UniqueItems() & [...matchN(>=1, [
			true,
			#coreRule & {...} & {
				"ignoreTypes"?: #simpleArrayStringRule
				...
			},
		])],
	])
	"selector-max-empty-lines"?: #integerRule
	...
}
¶
"selector-anb-no-unmatchable"?: matchN(1, [matchN(1, [true, null]), list.MaxItems(2) & {[matchN(1, [true, null]), ...], [1]: #coreRule}]) ¶

Disallow unmatchable An+B selectors

"selector-attribute-brackets-space-inside"?: #alwaysNeverRule ¶
"selector-attribute-operator-blacklist"?: #arrayStringRule ¶
"selector-attribute-operator-space-after"?: #alwaysNeverRule ¶
"selector-attribute-operator-space-before"?: #alwaysNeverRule ¶
"selector-attribute-operator-whitelist"?: #arrayStringRule ¶
"selector-attribute-quotes"?: #alwaysNeverRule ¶
"selector-class-pattern"?:
click to see definition
matchN(1, [
	null | string,
	list.MinItems(2) & list.MaxItems(2) & list.UniqueItems() & [...matchN(>=1, [
		string,
		#coreRule & {...} & {
			// This option will resolve nested selectors with `&` interpolation
			"resolveNestedSelectors"?: bool
			...
		},
	])],
])
¶

Specify a pattern for class selectors

"selector-combinator-space-after"?: #alwaysNeverRule ¶
"selector-combinator-space-before"?: #alwaysNeverRule ¶
"selector-descendant-combinator-no-non-space"?: #booleanRule ¶
"selector-id-pattern"?: #stringRule ¶
"selector-max-compound-selectors"?: #integerRule ¶
"selector-max-specificity"?: #stringRule ¶
"selector-nested-pattern"?: #stringRule ¶
"selector-no-attribute"?: #booleanRule ¶
"selector-no-combinator"?: #booleanRule ¶
"selector-no-id"?: #booleanRule ¶
"selector-no-qualifying-type"?:
click to see definition
matchN(1, [
	null,
	true,
	list.MinItems(2) & list.MaxItems(2) & list.UniqueItems() & [...matchN(>=1, [
		true,
		#coreRule & {...} & {
			"ignore"?: list.UniqueItems() & list.MinItems(1) & [..."attribute" | "class" | "id"]
			...
		},
	])],
])
¶

Disallow qualifying a selector by type

"selector-no-type"?:
click to see definition
matchN(1, [
	null,
	true,
	list.MinItems(2) & list.MaxItems(2) & list.UniqueItems() & [...matchN(>=1, [
		true,
		#coreRule & {...} & {
			"ignore"?:      list.UniqueItems() & list.MinItems(1) & [..."compounded" | "descendant"]
			"ignoreTypes"?: #simpleArrayStringRule
			...
		},
	])],
])
¶

Disallow type selectors

"selector-no-universal"?: #booleanRule ¶
"selector-no-vendor-prefix"?: #booleanRule ¶
"selector-pseudo-class-case"?: #lowerUpperRule ¶
"selector-pseudo-class-no-unknown"?:
click to see definition
matchN(1, [
	null,
	true,
	list.MinItems(2) & list.MaxItems(2) & list.UniqueItems() & [...matchN(>=1, [
		true,
		#coreRule & {...} & {
			"ignorePseudoClasses"?: #simpleArrayStringRule
			...
		},
	])],
])
¶

Disallow unknown pseudo-class selectors

"selector-pseudo-class-parentheses-space-inside"?: #alwaysNeverRule ¶
"selector-pseudo-class-whitelist"?: #arrayStringRule ¶
"selector-pseudo-element-case"?: #lowerUpperRule ¶
"selector-pseudo-element-colon-notation"?: #singleDoubleRule ¶
"selector-pseudo-element-no-unknown"?:
click to see definition
matchN(1, [
	null,
	true,
	list.MinItems(2) & list.MaxItems(2) & list.UniqueItems() & [...matchN(>=1, [
		true,
		#coreRule & {...} & {
			"ignorePseudoElements"?: #simpleArrayStringRule
			...
		},
	])],
])
¶

Disallow unknown pseudo-element selectors

"selector-root-no-composition"?: #booleanRule ¶
"selector-type-case"?: #lowerUpperRule ¶
"selector-type-no-unknown"?:
click to see definition
matchN(1, [
	null,
	true,
	list.MinItems(2) & list.MaxItems(2) & list.UniqueItems() & [...matchN(>=1, [
		true,
		#coreRule & {...} & {
			"ignoreTypes"?: #simpleArrayStringRule
			...
		},
	])],
])
¶

Disallow unknown type selectors

"selector-max-empty-lines"?: #integerRule ¶
#selectorList:
click to see definition
null | bool | number | string | [...] | {
	"selector-list-comma-newline-after"?:  #newlineRule
	"selector-list-comma-newline-before"?: #newlineRule
	"selector-list-comma-space-after"?:    #spaceRule
	"selector-list-comma-space-before"?:   #spaceRule
	...
}
¶
"selector-list-comma-newline-after"?: #newlineRule ¶
"selector-list-comma-newline-before"?: #newlineRule ¶
"selector-list-comma-space-after"?: #spaceRule ¶
"selector-list-comma-space-before"?: #spaceRule ¶
#shorthandProperty: null | bool | number | string | [...] | {"shorthand-property-no-redundant-values"?: #booleanRule, ...} ¶
"shorthand-property-no-redundant-values"?: #booleanRule ¶
#simpleArrayStringRule: list.UniqueItems() & [...string] ¶
[...]: string
#simpleStringOrArrayStringRule: matchN(1, [string, #simpleArrayStringRule & (string | [...])]) ¶
#singleDoubleRule:
click to see definition
matchN(1, [
	null,
	"single" | "double",
	list.MinItems(2) & list.MaxItems(2) & list.UniqueItems() & [
		...matchN(>=1, ["single" | "double", #coreRule & (string | {...})])
	],
])
¶
#spaceRule:
click to see definition
matchN(1, [
	null,
	"always" | "never" | "always-single-line" | "never-single-line",
	list.MinItems(2) & list.MaxItems(2) & list.UniqueItems() & [
		...matchN(>=1, [
			"always" | "never" | "always-single-line" | "never-single-line",
			#coreRule & (string | {...}),
		])
	],
])
¶
#string: null | bool | number | string | [...] | {"string-no-newline"?: #booleanRule, "string-quotes"?: #singleDoubleRule, ...} ¶
"string-no-newline"?: #booleanRule ¶
"string-quotes"?: #singleDoubleRule ¶
#stringRule:
click to see definition
matchN(1, [
	null | string,
	list.MinItems(2) & list.MaxItems(2) & list.UniqueItems() & [
		...matchN(>=1, [string, #coreRule & (string | {...})])
	],
])
¶
#stylelintDisableComment:
click to see definition
null | bool | number | string | [...] | {
	// Require a reason comment before or after `stylelint-disable` comments
	"stylelint-disable-reason"?: matchN(1, [
		null,
		"always-before" | "always-after",
		list.MinItems(2) & list.MaxItems(2) & list.UniqueItems() & [
			...matchN(>=1, ["always-before" | "always-after", #coreRule & (string | {...})])
		],
	])
	...
}
¶
"stylelint-disable-reason"?:
click to see definition
matchN(1, [
	null,
	"always-before" | "always-after",
	list.MinItems(2) & list.MaxItems(2) & list.UniqueItems() & [
		...matchN(>=1, ["always-before" | "always-after", #coreRule & (string | {...})])
	],
])
¶

Require a reason comment before or after `stylelint-disable` comments

#time: null | bool | number | string | [...] | {"time-no-imperceptible"?: #booleanRule, ...} ¶
"time-no-imperceptible"?: #booleanRule ¶
#unit:
click to see definition
null | bool | number | string | [...] | {
	"unit-blacklist"?: #unitRule
	"unit-case"?:      #lowerUpperRule

	// Disallow unknown units
	"unit-no-unknown"?: matchN(1, [
		null,
		true,
		list.MinItems(2) & list.MaxItems(2) & list.UniqueItems() & [...matchN(>=1, [
			true,
			#coreRule & {...} & {
				"ignoreUnits"?: #simpleArrayStringRule
				...
			},
		])],
	])
	"unit-whitelist"?: #unitRule
	...
}
¶
"unit-blacklist"?: #unitRule ¶
"unit-case"?: #lowerUpperRule ¶
"unit-no-unknown"?:
click to see definition
matchN(1, [
	null,
	true,
	list.MinItems(2) & list.MaxItems(2) & list.UniqueItems() & [...matchN(>=1, [
		true,
		#coreRule & {...} & {
			"ignoreUnits"?: #simpleArrayStringRule
			...
		},
	])],
])
¶

Disallow unknown units

"unit-whitelist"?: #unitRule ¶
#unitRule:
click to see definition
matchN(1, [
	null,
	"em" |
		"ex" |
		"px" |
		"%" |
		"rem" |
		"vw" |
		"vh" |
		"vm" |
		"vmin" |
		"vmax" |
		"ch" |
		"in" |
		"cm" |
		"mm" |
		"q" |
		"pt" |
		"pc" |
		"deg" |
		"grad" |
		"rad" |
		"turn" |
		"ms" |
		"s" |
		"Hz" |
		"kHz" |
		"dpi" |
		"dpcm" |
		"dppx" |
		"fr",
	list.MinItems(1) & list.UniqueItems() & [...matchN(>=1, [
		"em" |
			"ex" |
			"px" |
			"%" |
			"rem" |
			"vw" |
			"vh" |
			"vm" |
			"vmin" |
			"vmax" |
			"ch" |
			"in" |
			"cm" |
			"mm" |
			"q" |
			"pt" |
			"pc" |
			"deg" |
			"grad" |
			"rad" |
			"turn" |
			"ms" |
			"s" |
			"Hz" |
			"kHz" |
			"dpi" |
			"dpcm" |
			"dppx" |
			"fr",
		list.UniqueItems() & list.MinItems(1) & [
			..."em" |
				"ex" |
				"px" |
				"%" |
				"rem" |
				"vw" |
				"vh" |
				"vm" |
				"vmin" |
				"vmax" |
				"ch" |
				"in" |
				"cm" |
				"mm" |
				"q" |
				"pt" |
				"pc" |
				"deg" |
				"grad" |
				"rad" |
				"turn" |
				"ms" |
				"s" |
				"Hz" |
				"kHz" |
				"dpi" |
				"dpcm" |
				"dppx" |
				"fr"
		],
		#coreRule & {...} & {
			// Ignore units in the values of declarations with the specified properties
			"ignoreProperties"?: {
				{[=~"(em|ex|ch|vw|vh|cm|mm|in|pt|pc|px|rem|vmin|vmax|%)"]: #simpleArrayStringRule}
				...
			}
			...
		},
	])],
])
¶
#value:
click to see definition
null | bool | number | string | [...] | {
	// Specify lowercase or uppercase for keywords values
	"value-keyword-case"?: matchN(1, [
		null,
		"lower" | "upper",
		list.MinItems(2) & list.MaxItems(2) & list.UniqueItems() & [...matchN(>=1, [
			"lower" | "upper",
			#coreRule & {...} & {
				"ignoreKeywords"?: #simpleArrayStringRule
				...
			},
		])],
	])
	"value-no-vendor-prefix"?: #booleanRule
	...
}
¶
"value-keyword-case"?:
click to see definition
matchN(1, [
	null,
	"lower" | "upper",
	list.MinItems(2) & list.MaxItems(2) & list.UniqueItems() & [...matchN(>=1, [
		"lower" | "upper",
		#coreRule & {...} & {
			"ignoreKeywords"?: #simpleArrayStringRule
			...
		},
	])],
])
¶

Specify lowercase or uppercase for keywords values

"value-no-vendor-prefix"?: #booleanRule ¶
#valueList:
click to see definition
null | bool | number | string | [...] | {
	"value-list-comma-newline-after"?:  #newlineRule
	"value-list-comma-newline-before"?: #newlineRule
	"value-list-comma-space-after"?:    #spaceRule
	"value-list-comma-space-before"?:   #spaceRule
	"value-list-max-empty-lines"?:      #integerRule
	...
}
¶
"value-list-comma-newline-after"?: #newlineRule ¶
"value-list-comma-newline-before"?: #newlineRule ¶
"value-list-comma-space-after"?: #spaceRule ¶
"value-list-comma-space-before"?: #spaceRule ¶
"value-list-max-empty-lines"?: #integerRule ¶

Source files

  • schema.cue