-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: always wrap attributes when a multi-line attribute exists (#1)
- Loading branch information
Showing
3 changed files
with
94 additions
and
22 deletions.
There are no files selected for viewing
39 changes: 30 additions & 9 deletions
39
src/rules/__snapshots__/consistent-attribute-lines.test.ts.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,40 @@ | ||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html | ||
|
||
exports[`consistent-attribute-lines > invalid > <div | ||
baz foo bar="2">Text</div> 1`] = ` | ||
"<div | ||
baz | ||
exports[`consistent-attribute-lines > invalid > <div | ||
baz foo bar="2">Text</div> 1`] = ` | ||
"<div | ||
baz | ||
foo | ||
bar=\\"2\\">Text</div>" | ||
`; | ||
exports[`consistent-attribute-lines > invalid > <div baz | ||
foo | ||
bar="2">Text</div> 1`] = `"<div baz foo bar=\\"2\\">Text</div>"`; | ||
foo | ||
bar="2">Text</div> 1`] = `"<div baz foo bar=\\"2\\">Text</div>"`; | ||
exports[`consistent-attribute-lines > invalid > <div baz foo | ||
bar="2">Text</div> 1`] = `"<div baz foo bar=\\"2\\">Text</div>"`; | ||
exports[`consistent-attribute-lines > invalid > <div baz foo | ||
bar="2">Text</div> 1`] = `"<div baz foo bar=\\"2\\">Text</div>"`; | ||
exports[`consistent-attribute-lines > invalid > <div foo | ||
bar /> 1`] = `"<div foo bar />"`; | ||
bar /> 1`] = `"<div foo bar />"`; | ||
exports[`consistent-attribute-lines > invalid > <div foo use:baz={{ | ||
setting: 'value', | ||
}} /> 1`] = ` | ||
"<div | ||
foo | ||
use:baz={{ | ||
setting: 'value', | ||
}} />" | ||
`; | ||
exports[`consistent-attribute-lines > invalid > <div foo use:baz={{ | ||
setting: 'value', | ||
}} use:box /> 1`] = ` | ||
"<div | ||
foo | ||
use:baz={{ | ||
setting: 'value', | ||
}} | ||
use:box />" | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters