Skip to content

Allow empty lines between dollar variables (scss/dollar-variable-empty-line-before) #38

@and1-lt

Description

@and1-lt

It's sometimes useful to group different blocks of SCSS variables like this:

$fontWeightLight: 300;
$fontWeightRegular: 400;

$lineHeight: 400; // scss/dollar-variable-empty-line-before will complain about empty line before

But this is not allowed at the moment with scss/dollar-variable-empty-line-before rule. Latest stylelint-scss version supports 'after-dollar-variable' as an ignore option, so the rule could be written as this to support this case:

'scss/dollar-variable-empty-line-before': [
  'always',
    {
	except: ['after-dollar-variable', 'first-nested'],
	ignore: ['after-comment', 'after-dollar-variable', 'inside-single-line-block'],
   },
],

Related to: stylelint-scss/stylelint-scss#603

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions