DEV Community

Augusts Bautra
Augusts Bautra

Posted on • Edited on

TIL: Html + ERB = HERB ❤️

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:

  1. bundle exec herb analyze parses templates for HTML wellformedness
  2. bundle exec herb lint works 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)

Collapse
 
davidslv profile image
David Silva

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.