package stylelint import ( "list" "net" ) // JSON schema for the Stylelint configuration files #Schema: { @jsonschema(schema="http://json-schema.org/draft-07/schema#") @jsonschema(id="https://json.schemastore.org/stylelintrc.json") "extends"?: #simpleStringOrArrayStringRule "plugins"?: #simpleArrayStringRule // Specify a custom syntax to use on your code. "customSyntax"?: string // Provide rule and behavior overrides for files that match // particular glob patterns. "overrides"?: [...{ "files"?: [...string] "customSyntax"?: string "rules"?: #allRules ... }] // Processors are functions that hook into stylelint's pipeline, // modifying code on its way into stylelint and modifying results // on their way out "processors"?: [...matchN(>=1, [string, [string, ...{ ... }]])] // Ignore stylelint-disable (e.g. /* stylelint-disable // block-no-empty */) comments. "ignoreDisables"?: bool "ignoreFiles"?: #simpleStringOrArrayStringRule // The default severity level for all rules that do not have a // severity specified in their secondary options "defaultSeverity"?: "warning" | "error" "reportDescriptionlessDisables"?: #booleanRule "reportInvalidScopeDisables"?: #booleanRule "reportNeedlessDisables"?: #booleanRule "rules"?: #allRules ... #allRules: 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: matchN(1, [null, "always" | "always-multi-line", list.MaxItems(2) & list.UniqueItems() & [_, _, ...] & [...matchN(>=1, ["always" | "always-multi-line", #coreRule & (string | { ... })])]]) #alwaysNeverRule: matchN(1, [null, "always" | "never", list.MaxItems(2) & list.UniqueItems() & [_, _, ...] & [...matchN(>=1, ["always" | "never", #coreRule & (string | { ... })])]]) #arrayStringRule: matchN(1, [null | string, list.UniqueItems() & [_, ...] & [...matchN(>=1, [#simpleArrayStringRule & (string | [...] | { ... }), #coreRule & (string | [...] | { ... })])]]) #atRule: 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.MaxItems(2) & list.UniqueItems() & [_, _, ...] & [...matchN(>=1, ["always" | "never", #coreRule & { ... } & { "except"?: list.UniqueItems() & [_, ...] & [..."all-nested" | "after-same-name" | "inside-block" | "blockless-after-same-name-blockless" | "blockless-after-blockless" | "first-nested"] "ignore"?: list.UniqueItems() & [_, ...] & [..."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.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.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.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 ... } #block: 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.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.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 ... } #booleanRule: matchN(1, [null, bool, list.MaxItems(2) & list.UniqueItems() & [_, _, ...] & [...matchN(>=1, [bool, #coreRule & (bool | { ... })])]]) #color: 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.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.MaxItems(2) & list.UniqueItems() & [_, _, ...] & [...matchN(>=1, ["always-where-possible" | "never", #coreRule & { ... } & { "ignore"?: #simpleArrayStringRule ... }])]]) "color-no-hex"?: #booleanRule "color-no-invalid-hex"?: #booleanRule ... } #comment: null | bool | number | string | [...] | { // Require or disallow an empty line before comments "comment-empty-line-before"?: matchN(1, [null, "always" | "never", 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() & [_, ...] & [..."first-nested"] // Don't require an empty line between comments "ignore"?: list.UniqueItems() & [_, ...] & [..."between-comments" | "after-comment" | "stylelint-command" | "stylelint-commands"] ... }])]]) "comment-no-empty"?: #booleanRule "comment-whitespace-inside"?: #alwaysNeverRule "comment-word-blacklist"?: #arrayStringRule ... } #coreRule: { "disableFix"?: bool // Custom message that will be used in errors and warnings "message"?: string "reportDisables"?: bool // Message status "severity"?: "warning" | "error" "url"?: net.AbsURL ... } #customMedia: 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]), #coreRule, ...]]) ... } #customProperty: null | bool | number | string | [...] | { // Require or disallow an empty line before custom properties "custom-property-empty-line-before"?: matchN(1, [null, "always" | "never", 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() & [_, ...] & [..."after-comment" | "after-custom-property" | "first-nested"] // Ignore custom properties that are preceded by comments or // inside single-line blocks "ignore"?: list.UniqueItems() & [_, ...] & [..."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]), #coreRule, ...]]) ... } #declaration: 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.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.MaxItems(2) & list.UniqueItems() & [_, _, ...] & [...matchN(>=1, ["always" | "never", #coreRule & { ... } & { "except"?: list.UniqueItems() & [_, ...] & [..."after-comment" | "after-declaration" | "first-nested"] "ignore"?: 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]), #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 ... } #declarationBlock: null | bool | number | string | [...] | { // Disallow duplicate properties within declaration blocks "declaration-block-no-duplicate-properties"?: matchN(1, [null, true, list.MaxItems(2) & list.UniqueItems() & [_, _, ...] & [...matchN(>=1, [true, #coreRule & { ... } & { "ignore"?: 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.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.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 ... } #font: 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.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.MaxItems(2) & list.UniqueItems() & [_, _, ...] & [...matchN(>=1, ["numeric" | "named-where-possible", #coreRule & { ... } & { "ignore"?: list.UniqueItems() & [_, ...] & [..."relative"] ... }])]]) ... } #function: 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.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 ... } #generalSheet: null | bool | number | string | [...] | { // Specify indentation "indentation"?: matchN(1, [null | int, "tab", list.UniqueItems() & [_, ...] & [...int], 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() & [_, ...] & [..."block" | "param" | "value"] // Ignore the indentation inside parentheses "ignore"?: list.UniqueItems() & [_, ...] & [..."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.MaxItems(2) & list.UniqueItems() & [_, _, ...] & [...matchN(>=1, [int, #coreRule & { ... } & { "ignore"?: matchN(>=1, ["non-comments" | "comments", list.UniqueItems() & [_, ...] & [..."non-comments" | "comments"]]) ... }]) & (int | { ... })]]) & (null | int | [...]) // Limit the allowed nesting depth "max-nesting-depth"?: matchN(1, [null | int, list.MaxItems(2) & list.UniqueItems() & [_, _, ...] & [...matchN(>=1, [int, #coreRule & { ... } & { "ignore"?: list.UniqueItems() & [_, ...] & [..."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.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.MaxItems(2) & list.UniqueItems() & [_, _, ...] & [...matchN(>=1, [true, #coreRule & { ... } & { "ignore"?: list.UniqueItems() & [_, ...] & [..."empty-lines"] ... }])]]) "no-extra-semicolons"?: #booleanRule // Disallow colors that are suspiciously close to being identical "no-indistinguishable-colors"?: matchN(1, [null, true, 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() & [_, ...] & [...#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.MaxItems(2) & list.UniqueItems() & [_, _, ...] & [...matchN(>=1, [true, #coreRule & { ... } & { "browsers"?: string "ignore"?: #simpleStringOrArrayStringRule ... }])]]) ... } #integerRule: matchN(1, [null | int, list.MaxItems(2) & list.UniqueItems() & [_, _, ...] & [...#coreRule & (number | { ... }) & (int | { ... })]]) & (null | int | [...]) #keyframeDeclaration: null | bool | number | string | [...] | { "keyframe-declaration-no-important"?: #booleanRule ... } #length: null | bool | number | string | [...] | { "length-zero-no-unit"?: #booleanRule ... } #lightness: 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]), #coreRule, ...]]) ... } #lowerUpperRule: matchN(1, [null, "lower" | "upper", list.MaxItems(2) & list.UniqueItems() & [_, _, ...] & [...matchN(>=1, ["lower" | "upper", #coreRule & (string | { ... })])]]) #mediaFeature: 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.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]), #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]), #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]), #coreRule, ...]]) "media-feature-range-operator-space-after"?: #alwaysNeverRule "media-feature-range-operator-space-before"?: #alwaysNeverRule ... } #mediaQuery: 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]), #coreRule, ...]]) ... } #mediaQueryList: 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 ... } #newlineRule: matchN(1, [null, "always" | "always-multi-line" | "never-multi-line", list.MaxItems(2) & list.UniqueItems() & [_, _, ...] & [...matchN(>=1, ["always" | "always-multi-line" | "never-multi-line", #coreRule & (string | { ... })])]]) #newlineSpaceRule: matchN(1, [null, "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line", list.MaxItems(2) & list.UniqueItems() & [_, _, ...] & [...matchN(>=1, ["always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line", #coreRule & (string | { ... })])]]) #newlineSpaceWithIgnoreRule: matchN(1, [null, "always" | "never" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line", list.MaxItems(2) & list.UniqueItems() & [_, _, ...] & [...matchN(>=1, ["always" | "always-single-line" | "never-single-line" | "always-multi-line" | "never-multi-line", #coreRule & { ... } & { "ignoreAtRules"?: #simpleStringOrArrayStringRule ... }])]]) #number: null | bool | number | string | [...] | { "number-leading-zero"?: #alwaysNeverRule "number-max-precision"?: #integerRule "number-no-trailing-zeros"?: #booleanRule ... } #objectRule: matchN(1, [null, { [string]: #simpleStringOrArrayStringRule }, list.MaxItems(2) & [_, _, ...] & [{ [string]: #simpleStringOrArrayStringRule }, #coreRule, ...]]) #property: null | bool | number | string | [...] | { "property-blacklist"?: #arrayStringRule "property-case"?: #lowerUpperRule // Disallow unknown properties "property-no-unknown"?: matchN(1, [null, true, 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 ... } #rootRule: null | bool | number | string | [...] | { "root-no-standard-properties"?: #booleanRule ... } #rule: 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.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() & [_, ...] & [..."first-nested"] // Ignore rules that come after a comment "ignore"?: list.UniqueItems() & [_, ...] & [..."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.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() & [_, ...] & [..."after-single-line-comment"] // Ignore rules that come after a comment "ignore"?: list.UniqueItems() & [_, ...] & [..."after-comment"] ... }])]]) ... } #selector: 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]), #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.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.MaxItems(2) & list.UniqueItems() & [_, _, ...] & [...matchN(>=1, [true, #coreRule & { ... } & { "ignore"?: list.UniqueItems() & [_, ...] & [..."attribute" | "class" | "id"] ... }])]]) // Disallow type selectors "selector-no-type"?: matchN(1, [null, true, list.MaxItems(2) & list.UniqueItems() & [_, _, ...] & [...matchN(>=1, [true, #coreRule & { ... } & { "ignore"?: list.UniqueItems() & [_, ...] & [..."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.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.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.MaxItems(2) & list.UniqueItems() & [_, _, ...] & [...matchN(>=1, [true, #coreRule & { ... } & { "ignoreTypes"?: #simpleArrayStringRule ... }])]]) "selector-max-empty-lines"?: #integerRule ... } #selectorList: 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 ... } #shorthandProperty: null | bool | number | string | [...] | { "shorthand-property-no-redundant-values"?: #booleanRule ... } #simpleArrayStringRule: list.UniqueItems() & [...string] #simpleStringOrArrayStringRule: matchN(1, [string, #simpleArrayStringRule & (string | [...])]) #singleDoubleRule: matchN(1, [null, "single" | "double", list.MaxItems(2) & list.UniqueItems() & [_, _, ...] & [...matchN(>=1, ["single" | "double", #coreRule & (string | { ... })])]]) #spaceRule: matchN(1, [null, "always" | "never" | "always-single-line" | "never-single-line", 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 ... } #stringRule: matchN(1, [null | string, list.MaxItems(2) & list.UniqueItems() & [_, _, ...] & [...matchN(>=1, [string, #coreRule & (string | { ... })])]]) #stylelintDisableComment: 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.MaxItems(2) & list.UniqueItems() & [_, _, ...] & [...matchN(>=1, ["always-before" | "always-after", #coreRule & (string | { ... })])]]) ... } #time: null | bool | number | string | [...] | { "time-no-imperceptible"?: #booleanRule ... } #unit: null | bool | number | string | [...] | { "unit-blacklist"?: #unitRule "unit-case"?: #lowerUpperRule // Disallow unknown units "unit-no-unknown"?: matchN(1, [null, true, list.MaxItems(2) & list.UniqueItems() & [_, _, ...] & [...matchN(>=1, [true, #coreRule & { ... } & { "ignoreUnits"?: #simpleArrayStringRule ... }])]]) "unit-whitelist"?: #unitRule ... } #unitRule: 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.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() & [_, ...] & [..."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: null | bool | number | string | [...] | { // Specify lowercase or uppercase for keywords values "value-keyword-case"?: matchN(1, [null, "lower" | "upper", list.MaxItems(2) & list.UniqueItems() & [_, _, ...] & [...matchN(>=1, ["lower" | "upper", #coreRule & { ... } & { "ignoreKeywords"?: #simpleArrayStringRule ... }])]]) "value-no-vendor-prefix"?: #booleanRule ... } #valueList: 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 ... } }