A Pronto runner for Herb, the HTML-aware ERB linter. Enables ERB template linting in pull request reviews.
Add this line to your application's Gemfile:
gem 'pronto-herb'And then execute:
bundle installOr install it yourself as:
gem install pronto-herbPronto-Herb uses the npm package @herb-tools/linter. Make sure it's available in your project:
npm install --save-dev @herb-tools/linter
# or
yarn add --dev @herb-tools/linterOnce installed, Pronto will automatically use pronto-herb when running on repositories with ERB files.
# Run on staged changes
pronto run --staged
# Run on a specific commit range
pronto run --commit origin/main
# Run on GitHub pull request
pronto run -f github_status github_pr_review.erb.html.erb.rhtml
You can customize severity mappings in your .pronto.yml:
herb:
severities:
error: error
warning: warning
info: info
hint: info| Herb Level | Default Pronto Level |
|---|---|
| error | :error |
| warning | :warning |
| info | :info |
| hint | :info |
After checking out the repo, run bundle install to install dependencies. Then, run bundle exec rake test to run the tests.
To install this gem onto your local machine, run bundle exec rake install.
Bug reports and pull requests are welcome on GitHub at https://github.com/NotGrm/pronto-herb.
The gem is available as open source under the terms of the MIT License.