Skip to content

Conversation

@domingo2000
Copy link
Contributor

@domingo2000 domingo2000 commented Oct 1, 2025

Implements the ExtraNewLine rule from ERBLint.

This rules avoid having multiple extra consecutives new lines in one file.

Resolves #541

@domingo2000 domingo2000 force-pushed the add-erb-extra-new-line branch from e303205 to d0230ca Compare October 1, 2025 01:16
@domingo2000 domingo2000 changed the title Linter: Implement linter rule (#541) Oct 1, 2025
@domingo2000
Copy link
Contributor Author

I have the same thoughts of this rule as with SpaceInHtmlTag. This rules are "formatting rules", if the Herb formatter could (or can i don't know) verify that a file is correctly formatter, this rule should not be necessary and can be removed from the roadmap for ErbLint compatibility.

I left an implementation anyways if you belive it provide some value. Feel free to change the severity from error to warning, or to make this rule an optional rule instead of default.

@domingo2000 domingo2000 mentioned this pull request Oct 1, 2025
6 tasks
@marcoroth marcoroth changed the title Linter: Implement erb-extra-new-line linter rule (#541) Oct 5, 2025
@marcoroth marcoroth changed the title Linter: Implement erb-extra-new-line linter rule Oct 13, 2025
Copy link
Owner

@marcoroth marcoroth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @domingo2000! 🙏🏼

@marcoroth marcoroth merged commit fd3c625 into marcoroth:main Oct 13, 2025
1 check passed
asilano pushed a commit to fac/herb that referenced this pull request Oct 21, 2025
Implements the `ExtraNewLine` rule from
[ERBLint](https://github.com/Shopify/erb_lint).

This rules avoid having multiple extra consecutives new lines in one
file.

Resolves marcoroth#541

---------

Co-authored-by: Marco Roth <marco.roth@intergga.ch>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment