Why this matters
This improves readability, similar to splitting objects with multiple properties over multiple lines in JavaScript.
Elements with multiple attributes should span multiple lines, with one attribute per line.
This improves readability, similar to splitting objects with multiple properties over multiple lines in JavaScript.
Side-by-side examples engineers can pattern-match during review.
<img src="https://vuejs.org/images/logo.png" alt="Vue Logo">
<MyComponent foo="a" bar="b" baz="c"/><img
src="https://vuejs.org/images/logo.png"
alt="Vue Logo"
>
<MyComponent
foo="a"
bar="b"
baz="c"
/><img src="..." alt="..."><MyComponent foo="a" bar="b" baz="c"/><img
src="..."
alt="..."
><MyComponent
foo="a"
bar="b"
baz="c"
/>From the same buckets as this rule.
Check if loops use equality operators (== or !=) in termination conditions. These can lead to infinite loops if the condition is never met exactly. Instead, use relational operators like < or > for safer loop termination.