Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
and1-lt opened this issue Nov 10, 2022 · 0 comments

Comments

@and1-lt
Copy link

and1-lt commented Nov 10, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant