0.0
The project is in a healthy, maintained state
A Pronto runner for Herb, the HTML-aware ERB linter. Enables ERB template linting in pull request reviews.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Runtime

~> 0.11.0
 Project Readme

Pronto-Herb

Gem Version

A Pronto runner for Herb, the HTML-aware ERB linter. Enables ERB template linting in pull request reviews.

Installation

Add this line to your application's Gemfile:

gem 'pronto-herb'

And then execute:

bundle install

Or install it yourself as:

gem install pronto-herb

Prerequisites

Pronto-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/linter

Usage

Once 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

Supported File Extensions

  • .erb
  • .html.erb
  • .rhtml

Configuration

You can customize severity mappings in your .pronto.yml:

herb:
  severities:
    error: error
    warning: warning
    info: info
    hint: info

Severity Mapping

Herb Level Default Pronto Level
error :error
warning :warning
info :info
hint :info

Development

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.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/NotGrm/pronto-herb.

License

The gem is available as open source under the terms of the MIT License.