Template style checking for GitHub's Ruby projects
Перейти к файлу
github-actions[bot] 6afc4d3074
Merge pull request #166 from github/dependabot/bundler/rubocop-1.66.1
build(deps-dev): update rubocop requirement from = 1.66.0 to = 1.66.1
2024-09-09 03:43:01 +00:00
.erb-linters
.github build(deps): bump ruby/setup-ruby from 1.190.0 to 1.191.0 2024-09-09 03:35:51 +00:00
bin
config
docs
lib
test
.erb-lint.yml
.gitignore
.rubocop.yml
CODEOWNERS
Gemfile
Gemfile.lock build(deps-dev): update rubocop requirement from = 1.66.0 to = 1.66.1 2024-09-09 03:42:49 +00:00
LICENSE
README.md Update README.md 2024-07-31 09:37:54 +07:00
Rakefile
erblint-github.gemspec build(deps-dev): update rubocop requirement from = 1.66.0 to = 1.66.1 2024-09-09 03:42:49 +00:00

README.md

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 lint rules from this library. Currently, the only supported way is to add a new file in .erb-linters/erblint-github.rb with the line:
require "erblint-github/linters"
  1. Update your erb-lint.yml to pull in our recommended configs. This will ensure you are up-to-date with our recommendations.
---
inherit_gem:
  erblint-github:
    - config/accessibility.yml

Rules

Testing

bundle install
bundle exec rake

If you use VS Code, we highly encourage ERB Linter extension to see immediate feedback in your editor.

Note

This repo contains several accessibility-related linting rules to help surface accessibility issues that would otherwise go undetected until a later stage. Please note that due to the limitations of static code analysis, these ERB accessibility checks are NOT enough for ensuring the accessibility of your app. This shouldn't be the only tool you use to catch accessibility issues and should be supplemented with other tools that can check the runtime browser DOM output, as well as processes like accessibility design reviews, manual audits, user testing, etc.