close
Skip to content

NotGrm/pronto-herb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Pronto runner for the Herb ERB linter

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages