Skip to content

Commit 2c3d623

Browse files
authored
test (vue/max-attributes-per-line): add test for max value as object (#2072)
1 parent d339e2e commit 2c3d623

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

tests/lib/rules/max-attributes-per-line.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,27 @@ job="Vet"></component></template>`,
113113
options: [{ singleline: 3, multiline: 1 }],
114114
output: `<template><component
115115
name="John Doe"
116+
age="30"
117+
job="Vet">
118+
</component>
119+
</template>`,
120+
errors: [
121+
{
122+
message: "'age' should be on a new line.",
123+
type: 'VAttribute',
124+
line: 2
125+
}
126+
]
127+
},
128+
{
129+
code: `<template><component
130+
name="John Doe" age="30"
131+
job="Vet">
132+
</component>
133+
</template>`,
134+
options: [{ multiline: { max: 1 } }],
135+
output: `<template><component
136+
name="John Doe"
116137
age="30"
117138
job="Vet">
118139
</component>

0 commit comments

Comments
 (0)