Which are some of the most annoying things you see (or do yourself) in HTML+ERB files that you wish a linter/formatter would catch for you?

I'm trying to come up with Linter rules that the Herb Linter could ship with, so far I got these:

https://github.com/marcoroth/herb/issues?q=is%3Aissue%20state%3Aopen%20label%3Alinter

marcoroth/herb

🌿 Powerful and seamless HTML-aware ERB parsing and tooling. - marcoroth/herb

GitHub

@marcoroth that may represent a lot, but I would appreciate linter rules to enforce accessibility good practices would be helpful.

It’s something that I appreciated a lot when working on EmberJS projects to be guided on the a11y path

https://github.com/ember-template-lint/ember-template-lint

GitHub - ember-template-lint/ember-template-lint: Linter for Ember or Handlebars templates

Linter for Ember or Handlebars templates. Contribute to ember-template-lint/ember-template-lint development by creating an account on GitHub.

GitHub

@notgrm oh yes, 100%!

I think Rails developers usually aren't too aware of a11y issues (myself included).

I wasn't aware of this project, but this is definitely the kind of intelligence I want to have built-in, this is great! Thanks!

@marcoroth glad that you like my idea, I will try to open issues to support each of the a11y supported linter rules on Herb repo
@notgrm thanks for opening the issues! πŸ™πŸΌ

@marcoroth I still have a bunch that remains to open; sorry for the spam tho πŸ˜†

Next step will be to contribute πŸ’ͺ

@notgrm Absolutely no worries, this is great! Thank you! πŸ™
@notgrm @marcoroth This is great. We care about maintaining good reader support and it's easy to break.
@marcoroth When you need to break your code blocks into multiple lines to enforce some line length rule, it's sometimes hard to know how I should do it. Will try to find an example.

@remi ah yeah, this one is tricky.

I think I do have a generally applicable and opinionated rule of how I would write it, but I can also see how people would be upset with it πŸ˜…πŸ™ˆ

@marcoroth missing a closing </div> in a partial that breaks the entire page layout. That right there is the biggest reason why I mostly stopped using erb, and used HAML and now Components.
@Paul we should already cover that:
@marcoroth why not support all Rubocop rules like https://github.com/shopify/erb_lint tries to do?
@camertron I thought about it too, but I think that not all the rules apply the same way as they do to regular Ruby code. But yeah, maybe cherry-picking the one that make sense could be an option.
@marcoroth right yeah, not all of them apply, but probably 75% do?
@camertron @marcoroth haml-lint takes this approach