erb-lint

A tool to help lint your ERB or HTML files using the included linters or by writing your own.
Icons/chart bar
Used 23 times
Created by
A Andrew Mason

Usage

Run this command in your Rails app directory in the terminal:

rails app:template LOCATION="https://railsbytes.com/script/VAjsD6"
Template Source

Review the code before running this template on your machine.

def do_bundle
  Bundler.with_unbundled_env { run "bundle install" }
end

gem_group :development do
  gem "erb_lint", require: false
end
do_bundle
run "bundle binstubs erb_lint"
file ".erb-lint.yml", <<-CODE
---
# https://github.com/Shopify/erb-lint#linters

glob: "**/*.html{+*,}.erb"
EnableDefaultLinters: true
linters:
  ErbSafety:
    enabled: false
  Rubocop:
    enabled: false
CODE
Comments

Sign up or Login to leave a comment.