UNPKG

@stylelint-types/stylelint-scss

Version:

TypeScript definitions for stylelint-define-config

939 lines (938 loc) 53.2 kB
import { Arrayable, AtRules, CSSPropertiesMap, LiteralUnion, RegExpLike, RuleConfig } from "stylelint-define-config"; //#region src/rules/at-each-key-value-single-line.d.ts type AtEachKeyValueSingleLineOptions = RuleConfig<true>; //#endregion //#region src/rules/at-else-closing-brace-newline-after.d.ts type AtElseClosingBraceNewlineAfterOptions = RuleConfig<'always-last-in-chain'>; //#endregion //#region src/rules/at-else-empty-line-before.d.ts type AtElseEmptyLineBeforeOptions = RuleConfig<'never'>; //#endregion //#region src/rules/at-else-if-parentheses-space-before.d.ts type AtElseIfParenthesesSpaceBeforeOptions = RuleConfig<'always' | 'never'>; //#endregion //#region src/rules/at-extend-no-missing-placeholder.d.ts type AtExtendNoMissingPlaceholderOptions = RuleConfig<true>; //#endregion //#region src/rules/at-function-named-arguments.d.ts type AtFunctionNamedArgumentsOptions = RuleConfig<'always' | 'never', [], { ignore?: LiteralUnion<'single-argument'>[]; /** * ["/regex/", "string"] */ ignoreFunctions?: string[]; }>; //#endregion //#region src/rules/at-function-parentheses-space-before.d.ts type AtFunctionParenthesesSpaceBeforeOptions = RuleConfig<'always' | 'never'>; //#endregion //#region src/rules/at-function-pattern.d.ts type AtFunctionPatternOptions = RuleConfig<RegExpLike, [functionName: string, pattern: RegExpLike]>; //#endregion //#region src/rules/at-if-closing-brace-newline-after.d.ts type AtIfClosingBraceNewlineAfterOptions = RuleConfig<'always-last-in-chain'>; //#endregion //#region src/rules/at-if-closing-brace-space-after.d.ts type AtIfClosingBraceSpaceAfterOptions = RuleConfig<'always-intermediate' | 'never-intermediate'>; //#endregion //#region src/rules/at-if-no-null.d.ts type AtIfNoNullOptions = RuleConfig<(LiteralUnion<'css' | 'less' | 'scss'> | RegExp)[]>; //#endregion //#region src/rules/at-import-partial-extension-allowed-list.d.ts type AtImportPartialExtensionAllowedListOptions = RuleConfig<(LiteralUnion<'css' | 'scss' | 'sass'> | RegExp)[]>; //#endregion //#region src/rules/at-import-partial-extension-disallowed-list.d.ts type AtImportPartialExtensionDisallowedListOptions = RuleConfig<(LiteralUnion<'css' | 'scss' | 'sass'> | RegExp)[]>; //#endregion //#region src/rules/at-mixin-argumentless-call-parentheses.d.ts type AtMixinArgumentlessCallParenthesesOptions = RuleConfig<'always' | 'never'>; //#endregion //#region src/rules/at-mixin-named-arguments.d.ts type AtMixinNamedArgumentsOptions = RuleConfig<'always' | 'never'>; //#endregion //#region src/rules/at-mixin-no-risky-nesting-selector.d.ts type AtMixinNoRiskyNestingSelectorOptions = RuleConfig<true>; //#endregion //#region src/rules/at-mixin-parentheses-space-before.d.ts type AtMixinParenthesesSpaceBeforeOptions = RuleConfig<'always' | 'never'>; //#endregion //#region src/rules/at-mixin-pattern.d.ts type AtMixinPatternOptions = RuleConfig<RegExpLike, [mixinName: string, pattern: RegExpLike]>; //#endregion //#region src/rules/at-root-no-redundant.d.ts type AtRootNoRedundantOptions = RuleConfig<true>; //#endregion //#region src/rules/at-rule-conditional-no-parentheses.d.ts type AtRuleConditionalNoParenthesesOptions = RuleConfig<true>; //#endregion //#region src/rules/at-rule-no-unknown.d.ts type AtRuleNoUnknownOptions = RuleConfig<true, [], { ignoreAtRules?: RegExpLike[]; }>; //#endregion //#region src/rules/at-use-no-redundant-alias.d.ts type AtUseNoRedundantAliasOptions = RuleConfig<true>; //#endregion //#region src/rules/at-use-no-unnamespaced.d.ts type AtUseNoUnnamespacedOptions = RuleConfig<true>; //#endregion //#region src/rules/block-no-redundant-nesting.d.ts type BlockNoRedundantNestingOptions = RuleConfig<true>; //#endregion //#region src/rules/comment-no-empty.d.ts type CommentNoEmptyOptions = RuleConfig<true>; //#endregion //#region src/rules/comment-no-loud.d.ts type CommentNoLoudOptions = RuleConfig<true>; //#endregion //#region src/rules/declaration-nested-properties.d.ts type DeclarationNestedPropertiesOptions = RuleConfig<'always' | 'never', [prop: string], { /** * Works only with `"always"` and reverses its effect for a property if it is the only one with the corresponding "namespace" (e.g. `margin` in `margin-top`) in a ruleset. */ except?: LiteralUnion<'only-of-namespace'>[]; }>; //#endregion //#region src/rules/declaration-nested-properties-no-divided-groups.d.ts type DeclarationNestedPropertiesNoDividedGroupsOptions = RuleConfig<true>; //#endregion //#region src/rules/declaration-property-value-no-unknown.d.ts type DeclarationPropertyValueNoUnknownOptions = RuleConfig<true, [], { /** * Ignore the specified property and value pairs. * Keys in the object indicate property names. * If a string in the object is surrounded with `"/"`, * it's interpreted as a regular expression. * * For example, `"/.+/"` matches any strings. */ ignoreProperties?: Record<CSSPropertiesMap, Arrayable<RegExpLike>>; /** * Extend or alter the properties syntax dictionary. * [CSS Value Definition Syntax](https://github.com/csstree/csstree/blob/master/docs/definition-syntax.md) is used to define a value's syntax. * If a definition starts with `|` it is added to the [existing definition value](https://csstree.github.io/docs/syntax/) if any. */ propertiesSyntax?: Record<CSSPropertiesMap, string>; /** * Extend or alter the types syntax dictionary. * [CSS Value Definition Syntax](https://github.com/csstree/csstree/blob/master/docs/definition-syntax.md) is used to define a value's syntax. * If a definition starts with `|` it is added to the [existing definition value](https://csstree.github.io/docs/syntax/) if any. * * Types are something like a preset which allows you to reuse a definition across other definitions. So, you'll likely want to also use the `propertiesSyntax` option when using this option. */ typesSyntax?: Record<string, string>; }>; //#endregion //#region src/rules/dimension-no-non-numeric-values.d.ts type DimensionNoNonNumericValuesOptions = RuleConfig<true>; //#endregion //#region src/rules/dollar-variable-colon-newline-after.d.ts type DollarVariableColonNewlineAfterOptions = RuleConfig<'always' | 'always-multi-line'>; //#endregion //#region src/rules/dollar-variable-colon-space-after.d.ts type DollarVariableColonSpaceAfterOptions = RuleConfig<'always' | 'never' | 'always-single-line' | 'at-least-one-space'>; //#endregion //#region src/rules/dollar-variable-colon-space-before.d.ts type DollarVariableColonSpaceBeforeOptions = RuleConfig<'always' | 'never'>; //#endregion //#region src/rules/dollar-variable-default.d.ts type DollarVariableDefaultOptions = RuleConfig<true, [], { ignore?: LiteralUnion<'local'>[]; }>; //#endregion //#region src/rules/dollar-variable-empty-line-after.d.ts type DollarVariableEmptyLineAfterOptions = RuleConfig<'always' | 'never', [], { except?: LiteralUnion<'last-nested' | 'before-comment' | 'before-dollar-variable'>[]; ignore?: LiteralUnion<'before-comment' | 'inside-single-line-block'>[]; }>; //#endregion //#region src/rules/dollar-variable-empty-line-before.d.ts type DollarVariableEmptyLineBeforeOptions = RuleConfig<'always' | 'never', [], { except?: LiteralUnion<'first-nested' | 'after-comment' | 'after-dollar-variable'>[]; ignore?: LiteralUnion<'after-comment' | 'inside-single-line-block' | 'after-dollar-variable'>[]; }>; //#endregion //#region src/rules/dollar-variable-first-in-block.d.ts type DollarVariableFirstInBlockOptions = RuleConfig<true, [], { expect?: LiteralUnion<'root' | 'at-rule' | 'function' | 'mixin' | 'if-else' | 'loops'>[]; ignore?: LiteralUnion<'comments' | 'imports'>[]; }>; //#endregion //#region src/rules/dollar-variable-no-missing-interpolation.d.ts type DollarVariableNoMissingInterpolationOptions = RuleConfig<true>; //#endregion //#region src/rules/dollar-variable-no-namespaced-assignment.d.ts type DollarVariableNoNamespacedAssignmentOptions = RuleConfig<true>; //#endregion //#region src/rules/dollar-variable-pattern.d.ts type DollarVariablePatternOptions = RuleConfig<RegExpLike, [variableName: string, pattern: RegExpLike], { ignore?: LiteralUnion<'local' | 'global'>; }>; //#endregion //#region src/rules/double-slash-comment-empty-line-before.d.ts type DoubleSlashCommentEmptyLineBeforeOptions = RuleConfig<'always' | 'never', [], { except?: LiteralUnion<'first-nested' | 'inside-block'>[]; ignore?: LiteralUnion<'between-comments' | 'stylelint-commands' | 'inside-block'>[]; }>; //#endregion //#region src/rules/double-slash-comment-inline.d.ts type DoubleSlashCommentInlineOptions = RuleConfig<'always' | 'never', [], { ignore?: LiteralUnion<'stylelint-commands'>[]; }>; //#endregion //#region src/rules/double-slash-comment-whitespace-inside.d.ts type DoubleSlashCommentWhitespaceInsideOptions = RuleConfig<'always' | 'never'>; //#endregion //#region src/rules/function-calculation-no-interpolation.d.ts type FunctionCalculationNoInterpolationOptions = RuleConfig<true>; //#endregion //#region src/rules/function-color-channel.d.ts type FunctionColorChannelOptions = RuleConfig<true>; //#endregion //#region src/rules/function-color-relative.d.ts type FunctionColorRelativeOptions = RuleConfig<true>; //#endregion //#region src/rules/function-disallowed-list.d.ts type FunctionDisallowedListOptions = RuleConfig<Arrayable<RegExpLike>>; //#endregion //#region src/rules/function-no-unknown.d.ts type FunctionNoUnknownOptions = RuleConfig<true, [], { ignoreFunctions: RegExpLike[]; }>; //#endregion //#region src/rules/function-quote-no-quoted-strings-inside.d.ts type FunctionQuoteNoQuotedStringsInsideOptions = RuleConfig<true>; //#endregion //#region src/rules/function-unquote-no-unquoted-strings-inside.d.ts type FunctionUnquoteNoUnquotedStringsInsideOptions = RuleConfig<true>; //#endregion //#region src/rules/load-no-partial-leading-underscore.d.ts type LoadNoPartialLeadingUnderscoreOptions = RuleConfig<true>; //#endregion //#region src/rules/load-partial-extension.d.ts type LoadPartialExtensionOptions = RuleConfig<'always' | 'never'>; //#endregion //#region src/rules/map-keys-quotes.d.ts type MapKeysQuotesOptions = RuleConfig<'always'>; //#endregion //#region src/rules/media-feature-value-dollar-variable.d.ts type MediaFeatureValueDollarVariableOptions = RuleConfig<'always' | 'never', [], { ignore?: LiteralUnion<'keywords'>[]; }>; //#endregion //#region src/rules/no-dollar-variables.d.ts type NoDollarVariablesOptions = RuleConfig<true>; //#endregion //#region src/rules/no-duplicate-dollar-variables.d.ts type NoDuplicateDollarVariablesOptions = RuleConfig<true, [], { ignoreInside?: LiteralUnion<'at-rule' | 'nested-at-rule'>[]; }>; //#endregion //#region src/rules/no-duplicate-load-rules.d.ts type NoDuplicateLoadRulesOptions = RuleConfig<true>; //#endregion //#region src/rules/no-duplicate-mixins.d.ts type NoDuplicateMixinsOptions = RuleConfig<true>; //#endregion //#region src/rules/no-global-function-names.d.ts type NoGlobalFunctionNamesOptions = RuleConfig<true>; //#endregion //#region src/rules/no-unused-private-members.d.ts type NoUnusedPrivateMembersOptions = RuleConfig<true>; //#endregion //#region src/rules/operator-no-newline-after.d.ts type OperatorNoNewlineAfterOptions = RuleConfig<true>; //#endregion //#region src/rules/operator-no-newline-before.d.ts type OperatorNoNewlineBeforeOptions = RuleConfig<true>; //#endregion //#region src/rules/operator-no-unspaced.d.ts type OperatorNoUnspacedOptions = RuleConfig<true>; //#endregion //#region src/rules/partial-no-import.d.ts type PartialNoImportOptions = RuleConfig<true>; //#endregion //#region src/rules/percent-placeholder-pattern.d.ts type PercentPlaceholderPatternOptions = RuleConfig<RegExpLike, [placeholderName: string, pattern: RegExpLike]>; //#endregion //#region src/rules/property-no-unknown.d.ts type PropertyNoUnknownOptions = RuleConfig<true, [], { ignoreProperties?: RegExpLike[]; /** * Skips checking properties of the given selectors against this rule. */ ignoreSelectors?: RegExpLike[]; /** * Ignores properties nested within specified at-rules. */ ignoreAtRules?: (AtRules | RegExp)[]; /** * If `true`, this rule will check vendor-prefixed properties. * @default false */ checkPrefixed?: boolean; }>; //#endregion //#region src/rules/selector-class-pattern.d.ts type SelectorClassPatternOptions = RuleConfig<RegExpLike, [], { resolveNestedSelectors?: boolean; }>; //#endregion //#region src/rules/selector-nest-combinators.d.ts type SelectorNestCombinatorsOptions = RuleConfig<'always' | 'never'>; //#endregion //#region src/rules/selector-no-redundant-nesting-selector.d.ts type SelectorNoRedundantNestingSelectorOptions = RuleConfig<true, [], { ignoreKeywords?: RegExpLike[]; }>; //#endregion //#region src/rules/selector-no-union-class-name.d.ts type SelectorNoUnionClassNameOptions = RuleConfig<true>; //#endregion //#region src/types.d.ts interface Extends { 'stylelint-config-standard-scss': void; 'stylelint-config-recommended-scss': void; 'stylelint-config-prettier-scss': void; } interface Plugins { 'stylelint-scss': void; } interface Syntax { 'postcss-scss': void; } interface RuleOptions { /** * This is a rule that checks for situations where users have: * - Done a loop using map-keys * - Grabbed the value for that key inside of the loop. * * @see [at-each-key-value-single-line](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/at-each-key-value-single-line) */ 'scss/at-each-key-value-single-line': AtEachKeyValueSingleLineOptions; /** * Require or disallow a newline after the closing brace of `@else` statements. * * This rule might have conflicts with Stylelint's core rule [`block-closing-brace-newline-after`](https://stylelint.io/user-guide/rules/block-closing-brace-newline-after) if it doesn't have `"ignoreAtRules": ["else"]` in a `.stylelintrc` config file. That's because an `@else { ... }` statement can be successfully parsed as an at-rule with a block. You might also want to set `"ignoreAtRules": ["else"]` for another Stylelint's core rule - [`at-rule-empty-line-before`](https://stylelint.io/user-guide/rules/at-rule-empty-line-before) that could be forcing empty lines before at-rules (including `@else`s that follow `@if`s or other `@else`s). * * This rule doesn't have usual `"always"` and `"never"` main option values, because if you don't need special behavior for `@if` and `@else` you could just use [`block-closing-brace-newline-after`](https://stylelint.io/user-guide/rules/block-closing-brace-newline-after) set to `"always"` or any other value. * * @see [at-else-closing-brace-newline-after](https://github.com/stylelint-scss/stylelint-scss/tree/master/src/rules/at-else-closing-brace-space-after) */ 'scss/at-else-closing-brace-newline-after': AtElseClosingBraceNewlineAfterOptions; /** * Require a single space or disallow whitespace after the closing brace of `@else` statements. * * This rule might have conflicts with Stylelint's core [`block-closing-brace-space-after`](https://stylelint.io/user-guide/rules/block-closing-brace-space-after) rule if the latter is set up in your `.stylelintrc` config file. * * @see [at-else-closing-brace-space-after](https://github.com/stylelint-scss/stylelint-scss/tree/master/src/rules/at-else-closing-brace-space-after) */ 'scss/at-else-closing-brace-space-after': AtElseClosingBraceNewlineAfterOptions; /** * Require an empty line or disallow empty lines before `@`-else. * * `@if` and `@else` statements might need to have different behavior than all the other at-rules. For that you might need to set `"ignoreAtRules": ["else"]` for Stylelint's core rule [`at-rule-empty-line-before`](https://stylelint.io/user-guide/rules/at-rule-empty-line-before). But that would make you unable to disallow empty lines before `@else` while forcing it to be on a new line. This rule is designed to solve exactly that. * * @see [at-else-empty-line-before](https://github.com/stylelint-scss/stylelint-scss/tree/master/src/rules/at-else-empty-line-before) */ 'scss/at-else-empty-line-before': AtElseEmptyLineBeforeOptions; /** * Require or disallow a space before `@else if` parentheses. * * @see [at-else-if-parentheses-space-before](https://github.com/stylelint-scss/stylelint-scss/tree/master/src/rules/at-else-if-parentheses-space-before) */ 'scss/at-else-if-parentheses-space-before': AtElseIfParenthesesSpaceBeforeOptions; /** * Disallow at-extends (`@extend`) with missing placeholders. * * Using a class selector with the `@extend` directive usually results in more generated CSS than when using a placeholder selector. Furthermore, Sass specifically introduced placeholder selectors in order to be used with `@extend`. * * @see [at-extend-no-missing-placeholder](https://github.com/stylelint-scss/stylelint-scss/tree/master/src/rules/at-extend-no-missing-placeholder) */ 'scss/at-extend-no-missing-placeholder': AtExtendNoMissingPlaceholderOptions; /** * Require named parameters in SCSS function call rule. * * @see [at-function-named-arguments](https://github.com/stylelint-scss/stylelint-scss/tree/master/src/rules/at-function-named-arguments) */ 'scss/at-function-named-arguments': AtFunctionNamedArgumentsOptions; /** * Require or disallow a space before `@function` parentheses. * * @see [at-function-parentheses-space-before](https://github.com/stylelint-scss/stylelint-scss/tree/master/src/rules/at-function-parentheses-space-before) */ 'scss/at-function-parentheses-space-before': AtFunctionParenthesesSpaceBeforeOptions; /** * Specify a pattern for Sass/SCSS-like function names. * * @see [at-function-pattern](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/at-function-pattern) */ 'scss/at-function-pattern': AtFunctionPatternOptions; /** * Require or disallow a newline after the closing brace of `@if` statements. * * This rule might have conflicts with Stylelint's core rule * [`block-closing-brace-newline-after`](https://stylelint.io/user-guide/rules/block-closing-brace-newline-after) * if it doesn't have `"ignoreAtRules": ["if"]` in a `.stylelintrc` config file. * That's because an `@if { ... }` statement can be successfully parsed as an at-rule with a block. * You might also want to set `"ignoreAtRules": ["else"]` for another stylelint's core rule - * [`at-rule-empty-line-before`](https://stylelint.io/user-guide/rules/at-rule-empty-line-before) * that could be forcing empty lines before at-rules (including `@else`s that follow `@if`s or other `@else`s). * * @see [at-if-closing-brace-newline-after](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/at-if-closing-brace-newline-after) */ 'scss/at-if-closing-brace-newline-after': AtIfClosingBraceNewlineAfterOptions; /** * Require a single space or disallow whitespace after the closing brace of `@if` statements. * * This rule might have conflicts with Stylelint's core * [`block-closing-brace-space-after`](https://stylelint.io/user-guide/rules/block-closing-brace-space-after) rule if the latter is set up in your `.stylelintrc` config file. * * @see [at-if-closing-brace-space-after](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/at-if-closing-brace-space-after) */ 'scss/at-if-closing-brace-space-after': AtIfClosingBraceSpaceAfterOptions; /** * Check for equality to null is unnecessarily explicit since `null` is falsey in Sass. * * @see [at-if-no-null](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/at-if-no-null) */ 'scss/at-if-no-null': AtIfNoNullOptions; /** * Specify a whitelist of allowed file extensions for partial names in `@import` commands. * * The rule ignores [cases](https://sass-lang.com/documentation/at-rules/import) when Sass considers an `@import` command just a plain CSS import: * - If the file’s extension is `.css`. * - If the filename begins with `http://` (or any other protocol). * - If the filename is a `url()`. * - If the `@import` has any media queries. * * @see [at-import-partial-extension-allowed-list](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/at-import-partial-extension-allowed-list) */ 'scss/at-import-partial-extension-allowed-list': AtImportPartialExtensionAllowedListOptions; /** * Specify a blacklist of disallowed file extensions for partial names in `@import` commands. * * The rule ignores [cases](https://sass-lang.com/documentation/at-rules/import) when Sass considers an `@import` command just a plain CSS import: * - If the file’s extension is `.css`. * - If the filename begins with `http://` (or any other protocol). * - If the filename is a `url()`. * - If the `@import` has any media queries. * * @see [at-import-partial-extension-disallowed-list](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/at-import-partial-extension-disallowed-list) */ 'scss/at-import-partial-extension-disallowed-list': AtImportPartialExtensionDisallowedListOptions; /** * Require or disallow parentheses in argumentless `@mixin` calls. * * @see [at-mixin-argumentless-call-parentheses](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/at-mixin-argumentless-call-parentheses) */ 'scss/at-mixin-argumentless-call-parentheses': AtMixinArgumentlessCallParenthesesOptions; /** * Require named parameters in at-mixin call rule. * * @see [at-mixin-named-arguments](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/at-mixin-named-arguments) */ 'scss/at-mixin-named-arguments': AtMixinNamedArgumentsOptions; /** * Disallow risky nesting selectors within a mixin. * * If a mixin contains a parent selector within another style rule, * and is used in a nested context, the output selector may include the outermost * parent selector in an unexpected way. * * This only occurs when a parent selector meets all of the following conditions: * - Is within a `@mixin` rule. * - Is nested within another style rule. * - Is not positioned at the beginning of a complex selector. * * @see [at-mixin-no-risky-nesting-selector](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/at-mixin-no-risky-nesting-selector) */ 'scss/at-mixin-no-risky-nesting-selector': AtMixinNoRiskyNestingSelectorOptions; /** * Require or disallow a space before `@mixin` parentheses. * * @see [at-mixin-parentheses-space-before](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/at-mixin-parentheses-space-before) */ 'scss/at-mixin-parentheses-space-before': AtMixinParenthesesSpaceBeforeOptions; /** * Specify a pattern for Sass/SCSS-like mixin names. * * @see [at-mixin-pattern](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/at-mixin-pattern) */ 'scss/at-mixin-pattern': AtMixinPatternOptions; /** * Disallow redundant `@at-root` rule. * * The `@at-root` rule is redundant in the following cases: * - If `@at-root` is already at the root of the document. * - If any `@at-root` selector contains the parent selector, [`&`](https://sass-lang.com/documentation/style-rules/parent-selector/), outside interpolation. * - If `@at-root` is nested within a `@keyframes` block. * * @see [at-root-no-redundant](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/at-root-no-redundant) */ 'scss/at-root-no-redundant': AtRootNoRedundantOptions; /** * Disallow parentheses in conditional @ rules (if, elsif, while) * * @see [at-rule-conditional-no-parentheses](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/at-rule-conditional-no-parentheses) */ 'scss/at-rule-conditional-no-parentheses': AtRuleConditionalNoParenthesesOptions; /** * Disallow unknown at-rules. Should be used **instead of** Stylelint's [at-rule-no-unknown](https://stylelint.io/user-guide/rules/at-rule-no-unknown). * * This rule is basically a wrapper around the mentioned core rule, * but with added SCSS-specific `@`-directives. So if you use the core rule, `@if`, * `@extend` and other Sass-y things will get warnings. You must disable Stylelint's core * rule to make this rule work: * ```json * { * "rules": { * "at-rule-no-unknown": null, * "scss/at-rule-no-unknown": true * } * } * ``` * * @see [at-rule-no-unknown](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/at-rule-no-unknown) */ 'scss/at-rule-no-unknown': AtRuleNoUnknownOptions; /** * Disallow redundant namespace aliases. * * @see [at-use-no-redundant-alias](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/at-use-no-redundant-alias) */ 'scss/at-use-no-redundant-alias': AtUseNoRedundantAliasOptions; /** * Disallow usage of `@use` without a namespace. * * @see [at-use-no-unnamespaced](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/at-use-no-unnamespaced) */ 'scss/at-use-no-unnamespaced': AtUseNoUnnamespacedOptions; /** * Disallow empty comments. Should be used **instead of** the Stylelint's [comment-no-empty](https://stylelint.io/user-guide/rules/comment-no-empty) because the core rule ignores SCSS-like comments. * * To avoid duplicate issues, you must disable the core rule as follows: * ```json * { * "rules": { * "comment-no-empty": null, * "scss/comment-no-empty": true * } * } * ``` * * @see [comment-no-empty](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/comment-no-empty) */ 'scss/comment-no-empty': CommentNoEmptyOptions; /** * Disallow nesting a single block if it could be merged with its parent block. * * @see [block-no-redundant-nesting](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/block-no-redundant-nesting) */ 'scss/block-no-redundant-nesting': BlockNoRedundantNestingOptions; /** * Require or disallow properties with `-` in their names to be in a form of a nested group. * * ```scss * //This is properties nesting: * font: { * size: 16px; * weight: 700; * } * ``` * [Sass official docs on nested properties](https://sass-lang.com/documentation/style-rules/declarations#nesting). * * @see [declaration-nested-properties](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/declaration-nested-properties) */ 'scss/declaration-nested-properties': DeclarationNestedPropertiesOptions; /** * Disallow unknown values for properties within declarations. * * ```scss * a { top: unknown; } * // ^^^ ^^^^^^^ * // property and value pairs like these * ``` * * This rule considers values for properties defined within the CSS specifications to be known. You can use the `propertiesSyntax` and `typesSyntax` secondary options to extend the syntax. * * This rule is only appropriate for CSS. You should not turn it on for CSS-like languages, such as Sass or Less, as they have their own syntaxes. * * This rule is experimental with some false negatives that we'll patch in minor releases. * * It sometimes overlaps with: * - [`color-no-invalid-hex`](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/color-no-invalid-hex/README.md) * - [`function-no-unknown`](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/function-no-unknown/README.md) * - [`string-no-newline`](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/string-no-newline/README.md) * - [`unit-no-unknown`](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/unit-no-unknown/README.md) * * If duplicate problems are flagged, you can turn off the corresponding rule. * * @see [declaration-property-value-no-unknown](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/declaration-property-value-no-unknown) */ 'scss/declaration-property-value-no-unknown': DeclarationPropertyValueNoUnknownOptions; /** * Disallow `/*`-comments. * * This rule only works on CSS comments (`\/* *\/`) and ignores all double-slash (`//`) comments. * * @see [comment-no-loud](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/comment-no-loud) */ 'scss/comment-no-loud': CommentNoLoudOptions; /** * Disallow nested properties of the same "namespace" be divided into multiple groups. * * A "namespace" is everything before the first `-` in property names, * e.g. `margin` in `margin-bottom`. It is the "namespace" that is used as a root identifier * for a nested properties group (`font` in the example above). * *[Sass official docs on nested properties](https://sass-lang.com/documentation/style-rules/declarations#nesting). * * @see [declaration-nested-properties-no-divided-groups](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/declaration-nested-properties-no-divided-groups) */ 'scss/declaration-nested-properties-no-divided-groups': DeclarationNestedPropertiesNoDividedGroupsOptions; /** * Interpolating a value with a unit (e.g. `#{$value}px`) results in a * _string_ value, not as numeric value. This value then cannot be used in * numerical operations. It is better to use arithmetic to apply a unit to a * number (e.g. `$value * 1px`). * * This rule requires that all interpolation for values should be in the format * `$value * 1<unit>` instead of `#{value}<unit>` * * @see [dimension-no-non-numeric-values](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/dimension-no-non-numeric-values) */ 'scss/dimension-no-non-numeric-values': DimensionNoNonNumericValuesOptions; /** * Require a newline after the colon in `$`-variable declarations. * * @see [dollar-variable-colon-newline-after](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/dollar-variable-colon-newline-after) */ 'scss/dollar-variable-colon-newline-after': DollarVariableColonNewlineAfterOptions; /** * Require or disallow whitespace after the colon in `$`-variable declarations. * * @see [dollar-variable-colon-space-after](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/dollar-variable-colon-space-after) */ 'scss/dollar-variable-colon-space-after': DollarVariableColonSpaceAfterOptions; /** * Require a single space or disallow whitespace before the colon in `$`-variable declarations. * * @see [dollar-variable-colon-space-before](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/dollar-variable-colon-space-before) */ 'scss/dollar-variable-colon-space-before': DollarVariableColonSpaceBeforeOptions; /** * Require `!default` flag for `$`-variable declarations * * @see [dollar-variable-default](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/dollar-variable-default) */ 'scss/dollar-variable-default': DollarVariableDefaultOptions; /** * Require an empty line or disallow empty lines after `$`-variable declarations. * * If the `$`-variable declaration is the last declaration in a file, it's ignored. * * @see [dollar-variable-empty-line-after](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/dollar-variable-empty-line-after) */ 'scss/dollar-variable-empty-line-after': DollarVariableEmptyLineAfterOptions; /** * Require `$`-variable declarations to be placed first in a block (root or a rule). * * @see [dollar-variable-first-in-block](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/dollar-variable-first-in-block) */ 'scss/dollar-variable-first-in-block': DollarVariableFirstInBlockOptions; /** * Require an empty line or disallow empty lines before `$`-variable declarations. * * If the `$`-variable declaration is the first declaration in a file, it's ignored. * * @see [dollar-variable-empty-line-before](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/dollar-variable-empty-line-before) */ 'scss/dollar-variable-empty-line-before': DollarVariableEmptyLineBeforeOptions; /** * This rule flags four situations in which Sass variables require interpolation: * * - String-valued variables with custom identifier properties, * - Variables in custom identifier at-rules, * - Variables in `@supports` conditions, and * - Variables in CSS custom properties. * * **Note**: For scenarios 1 and 3 regarding string-valued variables, this rule can only check variables that are defined in the same file where they are used, since it needs to determine if the variable's value is a string. Scenarios 2 and 4 check all variables regardless of where they are defined. * * @see [dollar-variable-no-missing-interpolation](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/dollar-variable-no-missing-interpolation) */ 'scss/dollar-variable-no-missing-interpolation': DollarVariableNoMissingInterpolationOptions; /** * Disallow assignment to namespaced variables. * * @see [dollar-variable-no-namespaced-assignment](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/dollar-variable-no-namespaced-assignment) */ 'scss/dollar-variable-no-namespaced-assignment': DollarVariableNoNamespacedAssignmentOptions; /** * Specify a pattern for Sass-like variables. * * @see [dollar-variable-pattern](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/dollar-variable-pattern) */ 'scss/dollar-variable-pattern': DollarVariablePatternOptions; /** * Require or disallow an empty line before `//`-comments. * * This rule only works with SCSS-like [single-line comments](https://sass-lang.com/documentation/syntax/comments) and ignores: * - comments that are the very first nodes in a file; * - CSS comments (`\/* *\/`); * - comments that are on the same line as some non-comment code (inline comments). * * @see [double-slash-comment-empty-line-before](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/double-slash-comment-empty-line-before) */ 'scss/double-slash-comment-empty-line-before': DoubleSlashCommentEmptyLineBeforeOptions; /** * Require or disallow `//`-comments to be inline comments. * * An inline comment in terms of this rule is a comment that is placed on the same line with any other code, either before or after it. * * This rule only works with SCSS-like [single-line comments](https://sass-lang.com/documentation/syntax/comments) and ignores CSS comments (`\/* *\/`). * * @see [double-slash-comment-inline](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/double-slash-comment-inline) */ 'scss/double-slash-comment-inline': DoubleSlashCommentInlineOptions; /** * Require or disallow whitespace after the `//` in `//`-comments * * This rule only works with SCSS-like [single-line comments](https://sass-lang.com/documentation/syntax/comments) and ignores CSS comments (`\/* *\/`). * * Any number of slashes are allowed at the beginning of the comment. So `/// comment` is treated the same way as `// comment`. * * Note that a newline is not possible as a whitespace in terms of this rule as `//` - comments are intended to be single - line. * * @see [double-slash-comment-whitespace-inside](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/double-slash-comment-whitespace-inside) */ 'scss/double-slash-comment-whitespace-inside': DoubleSlashCommentWhitespaceInsideOptions; /** * Disallow interpolation in `calc()`, `clamp()`, `min()`, and `max()` functions. * * Since the release of [first-class `calc()`](https://sass-lang.com/documentation/values/calculations/), * calculation functions `calc()`, `clamp()`, `min()`, and `max()` accept variables * nd function calls as arguments. This rule disallows interpolation to avoid * extra verbose or even invalid CSS. * * @see [function-calculation-no-interpolation](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/function-calculation-no-interpolation) */ 'scss/function-calculation-no-interpolation': FunctionCalculationNoInterpolationOptions; /** * Encourage the use of the [color.channel](https://sass-lang.com/documentation/modules/color#channel) function over related deprecated color functions: * * - [color.alpha](https://sass-lang.com/documentation/modules/color#alpha) / [alpha](https://sass-lang.com/documentation/modules/color#alpha) / [opacity](https://sass-lang.com/documentation/modules/color#opacity) * - [color.blackness](https://sass-lang.com/documentation/modules/color#blackness) / [blackness](https://sass-lang.com/documentation/modules/color#blackness) * - [color.blue](https://sass-lang.com/documentation/modules/color#blue) / [blue](https://sass-lang.com/documentation/modules/color#blue) * - [color.green](https://sass-lang.com/documentation/modules/color#green) / [green](https://sass-lang.com/documentation/modules/color#green) * - [color.hue](https://sass-lang.com/documentation/modules/color#hue) / [hue](https://sass-lang.com/documentation/modules/color#hue) * - [color.lightness](https://sass-lang.com/documentation/modules/color#lightness) / [lightness](https://sass-lang.com/documentation/modules/color#lightness) * - [color.red](https://sass-lang.com/documentation/modules/color#red) / [red](https://sass-lang.com/documentation/modules/color#red) * - [color.saturation](https://sass-lang.com/documentation/modules/color#saturation) / [saturation](https://sass-lang.com/documentation/modules/color#saturation) * - [color.whiteness](https://sass-lang.com/documentation/modules/color#whiteness) * * ```scss * p { * opacity: opacity(rgb(210, 225, 221, 0.4)); * // ^^^^^^^ * // This function should be color.channel * } * ``` * * @see [function-color-channel](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/function-color-channel) */ 'scss/function-color-channel': FunctionColorChannelOptions; /** * Encourage the use of the [scale-color](https://sass-lang.com/documentation/modules/color#scale-color) over: * * - [darken](https://sass-lang.com/documentation/modules/color#darken) * - [desaturate](https://sass-lang.com/documentation/modules/color#desaturate) * - [fade-in](https://sass-lang.com/documentation/modules/color#fade-in) * - [fade-out](https://sass-lang.com/documentation/modules/color#fade-out) * - [lighten](https://sass-lang.com/documentation/modules/color#lighten) * - [opacify](https://sass-lang.com/documentation/modules/color#opacify) * - [saturate](https://sass-lang.com/documentation/modules/color#saturate) * - [transparentize](https://sass-lang.com/documentation/modules/color#transparentize) * * @see [function-color-relative](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/function-color-relative) */ 'scss/function-color-relative': FunctionColorRelativeOptions; /** * Specify a list of disallowed functions. * * @see [function-disallowed-list](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/function-disallowed-list) */ 'scss/function-disallowed-list': FunctionDisallowedListOptions; /** * Disallow unknown functions. Should be used **instead of** Stylelint's [function-no-unknown](https://stylelint.io/user-guide/rules/function-no-unknown). * * ```scss * a { color: unknown(1); } * // ^^^^^^^ * // Functions like this * ``` * * This rule is basically a wrapper around the mentioned core rule. You must disable Stylelint's core rule to make this rule work: * ```json * { * "rules": { * "function-no-unknown": null, * "scss/function-no-unknown": true * } * } * ``` * * @see [function-no-unknown](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/function-no-unknown) */ 'scss/function-no-unknown': FunctionNoUnknownOptions; /** * Disallow quoted strings inside the [quote function](https://sass-lang.com/documentation/modules/string#quote) * * @see [function-quote-no-quoted-strings-inside](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/function-quote-no-quoted-strings-inside) */ 'scss/function-quote-no-quoted-strings-inside': FunctionQuoteNoQuotedStringsInsideOptions; /** * Disallow unquoted strings inside the [unquote function](https://sass-lang.com/documentation/modules/string#unquote) * * @see [function-unquote-no-unquoted-strings-inside](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/function-unquote-no-unquoted-strings-inside) */ 'scss/function-unquote-no-unquoted-strings-inside': FunctionUnquoteNoUnquotedStringsInsideOptions; /** * Disallow leading underscore in partial names in `@import`, `@use`, `@forward`, * and [`meta.load-css`](https://sass-lang.com/documentation/modules/meta/#load-css) `$url` parameter. * * The rule ignores [cases](https://sass-lang.com/documentation/at-rules/import) when Sass considers an `@import` command just a plain CSS import: * - If the file’s extension is `.css`. * - If the filename begins with `http://` (or any other protocol). * - If the filename is a `url()`. * - If the `@import` has any media queries. * * @see [load-no-partial-leading-underscore](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/load-no-partial-leading-underscore) */ 'scss/load-no-partial-leading-underscore': LoadNoPartialLeadingUnderscoreOptions; /** * Require or disallow extension in `@import`, `@use`, `@forward`, and `[meta.load-css]` commands. * * The [`fix` option](https://stylelint.io/user-guide/usage/options#fix) can automatically fix all of the problems reported by this rule only when `"never"` is given. * * The rule ignores [cases](https://sass-lang.com/documentation/at-rules/import) when Sass considers an `@import` command just a plain CSS import: * - If the file’s extension is `.css`. * - If the filename begins with `http://` (or any other protocol). * - If the filename is a `url()`. * - If the `@import` has any media queries. * * @see [load-partial-extension](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/load-partial-extension) */ 'scss/load-partial-extension': LoadPartialExtensionOptions; /** * Require quoted keys in Sass maps. * * @see [map-keys-quotes](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/map-keys-quotes) */ 'scss/map-keys-quotes': MapKeysQuotesOptions; /** * Require a media feature value be a `$`-variable or disallow `$`-variables in media feature values. * * @see [media-feature-value-dollar-variable](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/media-feature-value-dollar-variable) */ 'scss/media-feature-value-dollar-variable': MediaFeatureValueDollarVariableOptions; /** * Disallow dollar variables within a stylesheet. * * @see [no-dollar-variables](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/no-dollar-variables) */ 'scss/no-dollar-variables': NoDollarVariablesOptions; /** * Disallow duplicate dollar variables within a stylesheet. * * @see [no-duplicate-dollar-variables](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/no-duplicate-dollar-variables) */ 'scss/no-duplicate-dollar-variables': NoDuplicateDollarVariablesOptions; /** * Disallow duplicate `@import`, `@use` and `@forward` rules. * * @see [no-duplicate-load-rules](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/no-duplicate-load-rules) */ 'scss/no-duplicate-load-rules': NoDuplicateLoadRulesOptions; /** * Disallow duplicate mixins within a stylesheet. * * @see [no-duplicate-mixins](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/no-duplicate-mixins) */ 'scss/no-duplicate-mixins': NoDuplicateMixinsOptions; /** * Disallows the use of global function names, as these global functions are now located inside built-in Sass modules. * * A full list of disallowed names (and their alternatives) is located [here](https://github.com/sass/sass/blob/main/accepted/module-system.md#built-in-modules-1) * * It is recommended to use the [Sass migrator](https://sass-lang.com/documentation/cli/migrator) to change these global function names automatically. * * @see [no-global-function-names](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/no-global-function-names) */ 'scss/no-global-function-names': NoGlobalFunctionNamesOptions; /** * Disallow unused private members. * * [Private members](https://sass-lang.com/documentation/at-rules/use/#private-members), * such as functions, mixins, variables, and selector placeholders are defined with names that * start with either `-` or `_` (in the case of variables the name follows `$`, and the same * applies to the `%` prefix for selector placeholders). These private members remain confined * within the module, therefore, if they go unused within the module, they are considered unused. * * This rule ignores files using `@import` since all files loaded through it are consolidated * within the same module. This setup makes it tricky to ensure all usages of private members. * * @see [no-unused-private-members](https://github.com/stylelint-scss/stylelint-scss/tree/master/src/rules/no-unused-private-members) */ 'scss/no-unused-private-members': NoUnusedPrivateMembersOptions; /** * Disallow linebreaks after Sass operators. * * This rule checks math operators (`+`, `-`, `/`, `*`, `%`) and comparison operators (`>`, `<`, `!=`, `==`, `>=`, `<=`). * * Not all symbols that correspond to math operators are actually considered operators by Sass. Some of the exceptions are: * * - `+` and `-` as signs before values; * - `+` and `-` as signs in [space-delimited lists](https://sass-lang.com/documentation/operators/string); * - `-` as part of [a string](https://sass-lang.com/documentation/operators/string) or [a Sass identifier](https://sass-lang.com/documentation/operators/numeric#unary-operators), e.g. a variable; * - `/` as a CSS delimiter in property values like `font: 10px/1.2 Arial;` ([read more](https://sass-lang.com/documentation/operators/numeric#slash-separated-values)). * * For more details refer to [Sass official documentation](https://sass-lang.com/documentation). An online Sass compiler - [Sassmeister](https://www.sassmeister.com/) - could also come in handy. * * @see [operator-no-newline-after](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/operator-no-newline-after) */ 'scss/operator-no-newline-after': OperatorNoNewlineAfterOptions; /** * Disallow linebreaks before Sass operators. * * This rule checks math operators (`+`, `-`, `/`, `*`, `%`) and comparison operators (`>`, `<`, `!=`, `==`, `>=`, `<=`). * * Not all symbols that correspond to math operators are actually considered operators by Sass. Some of the exceptions are: * * - `+` and `-` as signs before values; * - `+` and `-` as signs in [space-delimited lists](https://sass-lang.com/documentation/operators/string); * - `-` as part of [a string](https://sass-lang.com/documentation/operators/string) or [a Sass identifier](https://sass-lang.com/documentation/operators/numeric#unary-operators), e.g. a variable; * - `/` as a CSS delimiter in property values like `font: 10px/1.2 Arial;` ([read more](https://sass-lang.com/documentation/operators/numeric#slash-separated-values)). * * For more details refer to [Sass official documentation](https://sass-lang.com/documentation). An online Sass compiler - [Sassmeister](https://www.sassmeister.com/) - could also come in handy. * * @see [operator-no-newline-before](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/operator-no-newline-before) */ 'scss/operator-no-newline-before': OperatorNoNewlineBeforeOptions; /** * Disallow unspaced operators in Sass operations. * * This rule checks math operators (`+`, `-`, `/`, `*`, `%`) and comparison operators (`>`, `<`, `!=`, `==`, `>=`, `<=`). * * Not all symbols that correspond to math operators are actually considered operators by Sass. Some of the exceptions are: * * - `+` and `-` as signs before values; * - `+` and `-` as signs in [space-delimited lists](https://sass-lang.com/documentation/operators/string); * - `-` as part of [a string](https://sass-lang.com/documentation/operators/string) or [a Sass identifier](https://sass-lang.com/documentation/operators/numeric#unary-operators), e.g. a variable; * - `/` as a CSS delimiter in property values like `font: 10px/1.2 Arial;` ([read more](https://sass-lang.com/documentation/operators/numeric#slash-separated-values)). * * For more details refer to [Sass official documentation](https://sass-lang.com/documentation/file.SASS_REFERENCE.html). An online Sass compiler - [Sassmeister](https://www.sassmeister.com/) - could also come in handy. * * @see [operator-no-unspaced](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/operator-no-unspaced) */ 'scss/operator-no-unsp