Preprocessor to support .html.erb
files (Ruby on Rails, ERB)
#223
Labels
enhancement
New feature or request
.html.erb
files (Ruby on Rails, ERB)
#223
Hey there, thanks so much for creating this tool. I'm wondering how all the people programmed HTML all those years without a proper HTML linter? Like as if the W3C Validator is one of the top results when I search for "HTML linter" on the web 😂
I'd like to lint the HTML part of
.html.erb
files. ERB is a templating language used in Ruby on Rails projects. In order to lint.js.erb
files, I've written a customESLint plugin
, which is essentially a preprocessor (and then also a postprocessor) to strip away all the ERB parts in the code (replacing them with a dummy comment), while keeping track of the positions to correctly map line and colon numbers of ESLint messages. Here's what you can achieve with it (image should be animated):I was wondering if your project also supports some kind of mechanism such that I could use this preprocessor again (maybe with only slight changes) for
.html.erb
files. The recommended ESLint configuration basically just declares the processor.This would allow me to lint the HTML part of these files. I would then use a tool like
ERB Lint
to lint the ERB parts.The text was updated successfully, but these errors were encountered: