ERB Lint – linter for ERB and HTML templates

ERB Lint is a command-line tool for checking ERB and HTML templates. It combines a collection of template-specific checks with support for additional linters, allowing projects to enforce consistent markup and catch common problems in Rails views and other ERB files.

It can operate with its default settings without requiring a configuration file, while projects that need finer control can define linting behaviour, exclusions and file patterns in a dedicated configuration. Custom linters can also be added for project-specific requirements.

This is free and open source software.

Key Features

  • Checks ERB and HTML templates recursively across a project or against explicitly selected files.
  • Ships with linters covering whitespace, indentation, ERB tag layout, HTML elements, JavaScript helpers, autocomplete attributes and other template issues.
  • Provides security-oriented checks for unsafe interpolation of Ruby data into JavaScript contexts.
  • Can enforce Content Security Policy nonce usage on script elements.
  • Includes a StrictLocals linter for enforcing strict locals in Rails partial templates.
  • Can run RuboCop rules against Ruby statements embedded inside ERB templates.
  • Supports project-wide and linter-specific file exclusion patterns and configurable file globs.
  • Allows individual rules to be disabled inline and can report unnecessary suppression comments.
  • Uses a YAML configuration file to enable, disable and customise individual linters.
  • Supports user-written linters, allowing organisations to enforce their own template conventions and requirements.

Website: github.com/Shopify/erb_lint
Support:
Developer: Shopify Inc.
License: MIT License

erb_lint is written in Ruby. Learn Ruby with our recommended free books and free tutorials.


Related Software

Ruby Linters
RuboCopRuby static code analyzer and formatter
ReekExamines Ruby classes, modules, and methods
Standard RubyProvides an opinionated, unconfigurable ruleset
HAML-LintRuby-based linter for HAML templates
Slim-LintConfigurable tool for analyzing Slim templates
ERB LintLint your ERB or HTML files
YARD-LintFor Ruby and Ruby on Rails projects that lint YARD documentation
oxicopFast Ruby linter

Read our verdict in the software roundup.


Best Free and Open Source Software Explore our carefully curated directory of recommended free and open source software, covering every major software category.

The directory forms part of our extensive collection of articles for Linux enthusiasts. It includes hundreds of detailed reviews, together with free and open source alternatives to proprietary software from companies such as Google, Microsoft, Apple, Adobe, IBM, Cisco, Oracle, and Autodesk.

LinuxLinks also covers interesting projects worth exploring, Linux-compatible hardware, free programming books and tutorials, and much more.

Know a useful free and open source Linux application that we haven’t covered? Tell us about it using our submission form.
Subscribe

Please read our Comment Policy before commenting.

Notify of
guest
0 Comments
Oldest
Newest Most Voted