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