Conversation
|
I signed in the CLA. |
seanpdoyle
left a comment
There was a problem hiding this comment.
Is it intentional that BetterHtml includes a set of acceptable values that is less strict than those declared by shopify/erb_lint? Is it intentional that they share overlapping responsibilities?
Is there an opportunity to replace one with the other?
If not, should ERBLint::Linters::AllowedScriptType be updated to include "module" as well?
I think it's a good point, but I'm not sure the relationship between erb-lint and better-html. Actually, I'm using erb-lint with linters:
AllowedScriptType:
enabled: true
allowed_types:
- 'application/json'
- 'module'
DeprecatedClasses:
enabled: true
ErbSafety:
enabled: true |
|
better-html is a HTML parser that can be also used to transform unsafe HTML to safe HTML. We use it as a security measurement. It isn't linter. It just happen to be used the erb-lint as the parser for HTML and ERB. The configuration of the linter should be independent from the list of allowed types in better-html. Their defaults can be the same though. |
|
Can you please rebase the PR so I can start the CI? |
|
Thank you. I rebased it. |
Recently, JavaScript module would be getting used because almost all browsers support it, so `module` could also be added in `VALID_JAVASCRIPT_TAG_TYPES` as a `type` of `<script>`.
|
I also rebased again. |
|
Merged in de1fe4d |
Recently, JavaScript module would be getting used because almost all browsers support it, so
modulecould also be added inVALID_JAVASCRIPT_TAG_TYPESas atypeof<script>.What do you think?