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

Rule addition: "dollar-variable-empty-line-before" ignore: "after-dollar-variable" #105

Open
traverse opened this issue Mar 3, 2017 · 4 comments
Labels
Enhancement ✨ New feature or request Help wanted 🙋 Help is needed

Comments

@traverse
Copy link

traverse commented Mar 3, 2017

Would like to see this addition because sometimes I'd like to group variables which currently isn't possible with the available options.

Noticed that this is related to #94

@dryoma dryoma added the Enhancement ✨ New feature or request label Mar 6, 2017
@dryoma
Copy link
Collaborator

dryoma commented Mar 6, 2017

Hi @traverse

A legit suggestion. Just to clarify: do you think the #94 's between-groups, if/when implemented, will work for your case?

@traverse
Copy link
Author

traverse commented Mar 6, 2017

I think it should work for my case, it mostly depends on how it checks if something is a group or not because sometimes you might want to group variables even if they don't have a prefix that is similar etc.

Might be that my option is simpler / enough in most cases.

@jeddy3
Copy link
Collaborator

jeddy3 commented Mar 19, 2017

In stylelint@7.8.0 we standardised the options of the *-empty-line-before rules to use after-*. We removed the concept of groups. Now, each construct (in this instance, the dollar-variable construct) is only interested in the type of construct that precedes it. As such, I think adding an "ignore": ["after-dollar-variable"] option would be the idiomatic solution to this issue.

Might be that my option is simpler / enough in most cases.

Agreed.

@ArmorDarks
Copy link

Would be great to see this feature, since as for now scss/dollar-variable-empty-line-before indeed doesn't allow grouping in such style:

code {
  $test: 'value';
  $test2: 'value';

  $otherVar: 'value';
  $otherVar2: 'value';

  padding: 'value';
}

@kristerkari kristerkari added the Help wanted 🙋 Help is needed label Apr 26, 2018
@kristerkari kristerkari pinned this issue Jan 22, 2019
@kristerkari kristerkari unpinned this issue Mar 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement ✨ New feature or request Help wanted 🙋 Help is needed
Development

No branches or pull requests

5 participants