Today I was looking to improve the tooling around ERB templates in our project, get a linter at least.
I started with erb_lint gem, but soon discovered the HERB project.
The docs are a bit cryptic, but it's basically a gem that gives you a powerful linter a-la rubocop.
gem "herb" gives you a powerful, multi-function CLI tool:
-
bundle exec herb analyzeparses templates for HTML wellformedness -
bundle exec herb lintworks much like rubocop, check out the many rules available (and you can even write custom ones in JS!) https://herb-tools.dev/linter/rules/
Top comments (1)
Herb is really bringing the community back to using html.erb, now there's a good reason to use it and it is an awesome tool.