-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Linter for single/double quotes of html attribute values #259
Comments
You should be able to use Rubocop's rules for this: linters:
Rubocop:
enabled: true
rubocop_config:
AllCops:
Enabled: false
Style/StringLiterals:
Enabled: true
EnforcedStyle: double_quotes # or single_quotes |
toy
changed the title
Linter for single/double quotes
Linter for html attributes single/double quotes
Jul 4, 2022
toy
changed the title
Linter for html attributes single/double quotes
Linter for single/double quotes of html attribute values
Jul 4, 2022
Issue is not about ruby quotes, but about html attribute value quotes, I've clarified title and added example. |
I wrote a custom linter for this which can be used to enforce a quote style for HTML attributes (w/ auto-correction): https://owaiskhan.me/post/enforce-quote-style-html-attributes-erb-lint I can open a PR if there's interest to upstream this. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
While both single and double quotes are allowed for attribute values, it would be helpful for common style to have linter to force using only one of those.
The text was updated successfully, but these errors were encountered: