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

no-multiple-empty-lines fixer #6225

Closed
RRMoelker opened this issue May 19, 2016 · 4 comments
Closed

no-multiple-empty-lines fixer #6225

RRMoelker opened this issue May 19, 2016 · 4 comments
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion archived due to age This issue has been archived; please open a new issue for any further discussion enhancement This change enhances an existing feature of ESLint rule Relates to ESLint's core rules

Comments

@RRMoelker
Copy link
Contributor

The no-multiple-empty-lines rule does not yet have a fixer for auto removing extra lines. I would like to have a fixer to remove these lines where applicable.

I already made the code to solve this issue. I'll link the PR a.s.a.p.

@eslintbot eslintbot added the triage An ESLint team member will look at this issue soon label May 19, 2016
RRMoelker added a commit to RRMoelker/eslint that referenced this issue May 19, 2016
RRMoelker added a commit to RRMoelker/eslint that referenced this issue May 19, 2016
@nzakas nzakas added enhancement This change enhances an existing feature of ESLint rule Relates to ESLint's core rules accepted There is consensus among the team that this change meets the criteria for inclusion and removed triage An ESLint team member will look at this issue soon labels May 19, 2016
@nzakas
Copy link
Member

nzakas commented May 19, 2016

Sounds good!

RRMoelker added a commit to RRMoelker/eslint that referenced this issue May 28, 2016
RRMoelker added a commit to RRMoelker/eslint that referenced this issue May 30, 2016
RRMoelker added a commit to RRMoelker/eslint that referenced this issue Jun 11, 2016
@nzakas nzakas closed this as completed in 5122f73 Jun 13, 2016
@ThomasCrevoisier
Copy link

Hello ! I just had few problems today regarding the last version of eslint and found that it's related to this PR.

Should we also cover the case where the .match() call returns null ?

fullLines = sourceCode.text.match(/.*(\r\n|\r|\n|\u2028|\u2029)/g),

This would avoid error when executing this line :

var length = i < fullLines.length ? fullLines[i].length : 0,

What do you think about this ? :)

@vitorbal
Copy link
Member

vitorbal commented Jun 20, 2016

hey @ThomasCrvsr, thanks for reaching out! Indeed that's what we are doing now to prevent the problems you mention: 1e185b9
We are planning to do a patch-release today and this fix should be included, let us know if you still have any problems after that!

@ThomasCrevoisier
Copy link

@vitorbal Thanks your answer !

@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators Feb 6, 2018
@eslint-deprecated eslint-deprecated bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Feb 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion archived due to age This issue has been archived; please open a new issue for any further discussion enhancement This change enhances an existing feature of ESLint rule Relates to ESLint's core rules
Projects
None yet
Development

No branches or pull requests

5 participants