-
-
Notifications
You must be signed in to change notification settings - Fork 679
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
Rule proposal: spaces around equal signs in HTML attributes #460
Comments
I like this and I'd actually add it to the style guide if it was more Vue-specific, rather than general to HTML. I'm thinking this would work well in the |
I don't see why people might want to use spaces here. And I personally think this rule should either forbid it totally or not so I think the current implementation is perfectly fine with no extra configuration :) |
I'd like to make more configurable by two reasons.
|
@michalsnik I think it's a matter of how difficult it would be to implement. While I personally don't do this, I can imagine a compelling argument for: rel= "stylesheet" or rel = "stylesheet" which are similar to these two styles that I've seen used in JavaScript: rel: 'stylesheet' or rel : 'stylesheet' I think the argument could easily be made that they even improve readability. |
@mysticatea Yeah, that's another good point around vertical alignment! I didn't think about that. 🙂 |
I'm not convinced with those arguments @mysticatea @chrisvfritz We can't compare everything to JavaScript, it's HTML after all. So if someone wants to not have spaces around equal signs - he could turn this rule on. Otherwise he could not use it and align attributes vertically instead - no problem (Although aligning attributes itself is also not very good idea, if you think about case with an I try to be not too opinionated, but I just don't see any real value in allowing this syntax:
|
Please describe what the rule should do:
Ensure there are no spaces around equal signs in HTML attribute definitions.
What category of rule is this? (place an "X" next to just one item)
[X] Enforces code style
[ ] Warns about a potential error
[ ] Suggests an alternate way of doing something
[ ] Other (please specify:)
Provide 2-3 code examples that this rule will warn about:
The text was updated successfully, but these errors were encountered: