An interface for checking HTML ERB files using Shopify's Erblint tool.
The erblint
package is available on MELPA.
You can install it using M-x package-install RET erblint RET
Or, if you use use-package
, you can grab the snippet below that includes some configuration variables and their default values.
Setting them all is not necessary, and they are only listed here to encourage discoverability.
(use-package erblint
:config
(setq erblint-check-command "erblint")
(setq erblint-autocorrect-command "erblint -a")
(setq erblint-project-root-function 'vc-root-dir)
(setq erblint-prefer-system-executable nil))
Put erblint.el
in your extensions folder and add this folder to your load-path
like so:
(add-to-list 'load-path "~/.emacs.d/<YOUR-FOLDER>")
and then require it:
(require 'erblint)
Command | Description |
---|---|
erblint-check-current-file | Runs ErbLint on current file |
erblint-autocorrect-current-file | Runs auto-correct on current file |
erblint-check-directory | Prompts from a directory on which to run ErbLint |
erblint-autocorrect-directory | Prompts for a directory on which to run auto-correct |
erblint-check-project | Runs ErbLint on the entire project |
erblint-autocorrect-project | Runs auto-correct on the entire project |
Bug reports and suggestions for improvements are always welcome and so are Pull Requests.