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 Proposal: Disallow multiple empty lines #1015

Open
0xGuybrush opened this issue Feb 9, 2017 · 10 comments
Open

New Rule Proposal: Disallow multiple empty lines #1015

0xGuybrush opened this issue Feb 9, 2017 · 10 comments
Labels

Comments

@0xGuybrush
Copy link

Hello,

I'd like to propose a rule to disallow multiple consecutive empty lines in a file. E.g.:

/* Allowed */
.foo {
    margin: 5px;
}

.bar {
    padding: 10px;
}

/* Disallowed */
.foo {
    margin: 5px;
}



.bar {
    padding: 10px;
}

For JavaScript, we're using ESLint's no-multiple-empty-lines rule which allows for:

  • Max number of allowed consecutive empty lines.
  • Separate max configurable for start & end of files.

I'd be happy to try and submit a PR / test cases for same, but wanted to first check if it sounded like a feature others would want to.

Please let me know if I can give more relevant details.

Thanks!
Dave

@DanPurdy
Copy link
Member

Hi sorry for the delay in getting back to you, had no free time it seems recently. I'd be happy to see a PR submitted for this. Thanks!

@fiso
Copy link

fiso commented Mar 19, 2017

I would love this too.

@0xGuybrush
Copy link
Author

Cool, great! I'll try to look into this this week & see if I can get something raised for it.

@DanPurdy DanPurdy added the rule label Sep 25, 2017
@alfaproject
Copy link

I would love this as well. (:

@fiso
Copy link

fiso commented May 8, 2019

For anyone else who feel like they need this rule, I now have a fork where this rule is implemented: https://github.com/fiso/sass-lint

You can try it out by changing your dependency import line to say "sass-lint": "fiso/sass-lint#develop" and then running npm install.

I'd be happy to submit a PR for it but I feel like I'd want some eyes on my take before I do that, seeing as how I'm completely new to this codebase and all.

@fiso
Copy link

fiso commented May 24, 2019

FWIW my team has been using the forked version for a couple of weeks now and encountered no problems with it.

@Potherca
Copy link

There seems to be some overlap between this suggested rule and the one suggested in #1073.

@fiso
Copy link

fiso commented Jul 16, 2019

FWIW the rule I implemented in my fork (linked above) supports the suggestion from #1073 as well (optionally).

@Potherca
Copy link

@fiso Awesome! So.. Do you think we should consider #1093 and #1073 as duplicates of this issue?

Also... it might be high time to open that PR! 👍

@fiso
Copy link

fiso commented Aug 12, 2019

@Potherca Yes that would make sense.

As for the pull request, yes, I've been meaning to do that since forever. I keep putting it off since the checklist for submitting PRs to the project seems kind of daunting. But I'll make time for it.

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

No branches or pull requests

5 participants