erblint-github

Template style checking for GitHub's Ruby projects

Setup

  1. Update your Gemfile and run bundle install
gem "erb_lint", require: false
gem "erblint-github"
  1. Require the linters within the .erb-linters folder. This could be done by adding a file .erb-linters/erblint-github.rb with the following line.
require "erblint-github/linters"
  1. Update the erb-lint.yml to configure the rule.

.erb-lint.yml

---
linters:
  GitHub::Accessibility::AvoidBothDisabledAndAriaDisabled:
    enabled: true
  GitHub::Accessibility::IframeHasTitle:
    enabled: true
  GitHub::Accessibility::ImageHasAlt:
    enabled: true
  GitHub::Accessibility::NoAriaLabelMisuseCounter:
    enabled: true
  GitHub::Accessibility::NoPositiveTabIndex:
    enabled: true
  GitHub::Accessibility::NoRedundantImageAlt:
    enabled: true
  GitHub::Accessibility::NoTitleAttributeCounter:
    enabled: true

Rules

Testing

bundle install
bundle exec rake