We've been happily using @herb-tools/linter to check the correctness of our ERB templates in several Rails applications (e.g. unbalanced tags, invalid/missing attributes, etc.). However, the upgrade to Herb 0.9 has caused a large number of warnings and errors due to the new linting rules.
We don't necessarily agree with some of these rules, e.g. aggressively trying to prevent duplicate branch elements even if the repetition across conditional branches would be easier to read, preferring <script> over javascript_tag even if the latter automatically populates the nonce attributes, etc.
We do want to keep up-to-date with the latest version of the library and so are working around this by committing a .herb.yml generated by herb-lint --init on 0.8 so we default to opting out of the more opinionated rules.
Is there some balance here where use of herb-lint is more akin to Standard Ruby than Rubocop? Perhaps some classification of rules that lets us easily distinguish core "correctness" from more opinionated "style" rules?
We've been happily using @herb-tools/linter to check the correctness of our ERB templates in several Rails applications (e.g. unbalanced tags, invalid/missing attributes, etc.). However, the upgrade to Herb 0.9 has caused a large number of warnings and errors due to the new linting rules.
We don't necessarily agree with some of these rules, e.g. aggressively trying to prevent duplicate branch elements even if the repetition across conditional branches would be easier to read, preferring
<script>overjavascript_tageven if the latter automatically populates thenonceattributes, etc.We do want to keep up-to-date with the latest version of the library and so are working around this by committing a
.herb.ymlgenerated byherb-lint --initon 0.8 so we default to opting out of the more opinionated rules.Is there some balance here where use of herb-lint is more akin to Standard Ruby than Rubocop? Perhaps some classification of rules that lets us easily distinguish core "correctness" from more opinionated "style" rules?