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

New Rule: blocks-no-empty-line #231

Open
zallek opened this issue Sep 28, 2015 · 5 comments
Open

New Rule: blocks-no-empty-line #231

zallek opened this issue Sep 28, 2015 · 5 comments

Comments

@zallek
Copy link
Contributor

zallek commented Sep 28, 2015

Hi,

I have a feature proposition: a rule to disallow empty lines in blocks.

The following would raise an error:

.comment {
  display: flex;

  padding: 20px;
}
@zallek zallek changed the title Feature blocks-no-empty-line New Rule: blocks-no-empty-line Sep 28, 2015
@glen-84
Copy link
Contributor

glen-84 commented Sep 30, 2015

👍

1 similar comment
@shaneog
Copy link

shaneog commented Sep 30, 2015

👍

@DanPurdy
Copy link
Member

DanPurdy commented Oct 7, 2015

Would you want any exceptions to this rule as an option?

@bgriffith
Copy link
Member

I think it depends on if we limit it to testing for spaces before two property declarations only or not.

If we don't, I can think of some instances where you might want to have a space between vars and property declarations:

.foo {
    $foo: orange;

    color: $foo;
    ...
}

@glen-84
Copy link
Contributor

glen-84 commented Oct 7, 2015

It would be good to break it down into options like:

  1. Blank line(s) block open (default: 0)
  2. Blank line(s) block close (default: 0)
  3. Blank line(s) between nested blocks (default: 1)
  4. Blank line(s) between consecutive properties, variables, @include, etc. (default: 0 for each)
  5. Blank line(s) between groups (f.e. when changing from @extend to @includes, @includes to vars, vars to properties, ..., and properties to the first nested block) (default: 0, 1 before first nested block)

@Snugug Snugug modified the milestones: 1.4.0, 1.5/0 Nov 16, 2015
@DanPurdy DanPurdy modified the milestones: 1.5.0, 1.6.0 Jan 28, 2016
@DanPurdy DanPurdy modified the milestone: 1.7.0 May 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants