',
- errors: ["'' cannot be keyed. Place the key on real elements instead."]
+ errors: [
+ "'' cannot be keyed. Place the key on real elements instead."
+ ]
},
{
filename: 'test.vue',
- code: '',
- errors: ["'' cannot be keyed. Place the key on real elements instead."]
+ code:
+ '',
+ errors: [
+ "'' cannot be keyed. Place the key on real elements instead."
+ ]
},
{
filename: 'test.vue',
code: '',
- errors: ["'' cannot be keyed. Place the key on real elements instead."]
+ errors: [
+ "'' cannot be keyed. Place the key on real elements instead."
+ ]
}
]
})
diff --git a/tests/lib/rules/no-template-shadow.js b/tests/lib/rules/no-template-shadow.js
index 08e0e03b6..9d819f348 100644
--- a/tests/lib/rules/no-template-shadow.js
+++ b/tests/lib/rules/no-template-shadow.js
@@ -24,7 +24,6 @@ const ruleTester = new RuleTester({
})
ruleTester.run('no-template-shadow', rule, {
-
valid: [
'',
'',
@@ -122,11 +121,14 @@ ruleTester.run('no-template-shadow', rule, {
invalid: [
{
filename: 'test.vue',
- code: '
',
- errors: [{
- message: "Variable 'i' is already declared in the upper scope.",
- type: 'Identifier'
- }]
+ code:
+ '
',
+ errors: [
+ {
+ message: "Variable 'i' is already declared in the upper scope.",
+ type: 'Identifier'
+ }
+ ]
},
{
filename: 'test.vue',
@@ -140,11 +142,13 @@ ruleTester.run('no-template-shadow', rule, {
}
}
`,
- errors: [{
- message: "Variable 'i' is already declared in the upper scope.",
- type: 'Identifier',
- line: 2
- }]
+ errors: [
+ {
+ message: "Variable 'i' is already declared in the upper scope.",
+ type: 'Identifier',
+ line: 2
+ }
+ ]
},
{
filename: 'test.vue',
@@ -159,15 +163,18 @@ ruleTester.run('no-template-shadow', rule, {
}
}
`,
- errors: [{
- message: "Variable 'i' is already declared in the upper scope.",
- type: 'Identifier',
- line: 2
- }, {
- message: "Variable 'i' is already declared in the upper scope.",
- type: 'Identifier',
- line: 3
- }]
+ errors: [
+ {
+ message: "Variable 'i' is already declared in the upper scope.",
+ type: 'Identifier',
+ line: 2
+ },
+ {
+ message: "Variable 'i' is already declared in the upper scope.",
+ type: 'Identifier',
+ line: 3
+ }
+ ]
},
{
filename: 'test.vue',
@@ -183,15 +190,18 @@ ruleTester.run('no-template-shadow', rule, {
}
}
`,
- errors: [{
- message: "Variable 'i' is already declared in the upper scope.",
- type: 'Identifier',
- line: 2
- }, {
- message: "Variable 'i' is already declared in the upper scope.",
- type: 'Identifier',
- line: 3
- }]
+ errors: [
+ {
+ message: "Variable 'i' is already declared in the upper scope.",
+ type: 'Identifier',
+ line: 2
+ },
+ {
+ message: "Variable 'i' is already declared in the upper scope.",
+ type: 'Identifier',
+ line: 3
+ }
+ ]
},
{
filename: 'test.vue',
@@ -209,15 +219,18 @@ ruleTester.run('no-template-shadow', rule, {
}
}
`,
- errors: [{
- message: "Variable 'i' is already declared in the upper scope.",
- type: 'Identifier',
- line: 2
- }, {
- message: "Variable 'f' is already declared in the upper scope.",
- type: 'Identifier',
- line: 3
- }]
+ errors: [
+ {
+ message: "Variable 'i' is already declared in the upper scope.",
+ type: 'Identifier',
+ line: 2
+ },
+ {
+ message: "Variable 'f' is already declared in the upper scope.",
+ type: 'Identifier',
+ line: 3
+ }
+ ]
},
{
filename: 'test.vue',
@@ -245,15 +258,18 @@ ruleTester.run('no-template-shadow', rule, {
}
}
`,
- errors: [{
- message: "Variable 'e' is already declared in the upper scope.",
- type: 'Identifier',
- line: 6
- }, {
- message: "Variable 'f' is already declared in the upper scope.",
- type: 'Identifier',
- line: 7
- }]
+ errors: [
+ {
+ message: "Variable 'e' is already declared in the upper scope.",
+ type: 'Identifier',
+ line: 6
+ },
+ {
+ message: "Variable 'f' is already declared in the upper scope.",
+ type: 'Identifier',
+ line: 7
+ }
+ ]
},
{
filename: 'test.vue',
@@ -281,15 +297,18 @@ ruleTester.run('no-template-shadow', rule, {
}
}
`,
- errors: [{
- message: "Variable 'e' is already declared in the upper scope.",
- type: 'Identifier',
- line: 6
- }, {
- message: "Variable 'f' is already declared in the upper scope.",
- type: 'Identifier',
- line: 7
- }]
+ errors: [
+ {
+ message: "Variable 'e' is already declared in the upper scope.",
+ type: 'Identifier',
+ line: 6
+ },
+ {
+ message: "Variable 'f' is already declared in the upper scope.",
+ type: 'Identifier',
+ line: 7
+ }
+ ]
},
{
filename: 'test.vue',
@@ -315,15 +334,18 @@ ruleTester.run('no-template-shadow', rule, {
}
}
`,
- errors: [{
- message: "Variable 'e' is already declared in the upper scope.",
- type: 'Identifier',
- line: 6
- }, {
- message: "Variable 'f' is already declared in the upper scope.",
- type: 'Identifier',
- line: 7
- }]
+ errors: [
+ {
+ message: "Variable 'e' is already declared in the upper scope.",
+ type: 'Identifier',
+ line: 6
+ },
+ {
+ message: "Variable 'f' is already declared in the upper scope.",
+ type: 'Identifier',
+ line: 7
+ }
+ ]
}
]
})
diff --git a/tests/lib/rules/no-template-target-blank.js b/tests/lib/rules/no-template-target-blank.js
index 41b5c1c4b..ab1bf9220 100644
--- a/tests/lib/rules/no-template-target-blank.js
+++ b/tests/lib/rules/no-template-target-blank.js
@@ -26,18 +26,33 @@ ruleTester.run('no-template-target-blank', rule, {
{ code: 'link' },
{ code: 'link' },
{ code: 'link' },
- { code: 'link' },
+ {
+ code: 'link'
+ },
{ code: 'link' },
- { code: 'link' },
- { code: 'link' },
{
- code: 'link',
+ code:
+ 'link'
+ },
+ {
+ code:
+ 'link'
+ },
+ {
+ code:
+ 'link',
options: [{ allowReferrer: true }]
},
{ code: 'link' },
- { code: 'link' },
+ {
+ code:
+ 'link'
+ },
{ code: 'link' },
- { code: 'link' },
+ {
+ code:
+ 'link'
+ },
{
code: 'link',
options: [{ enforceDynamicLinks: 'never' }]
@@ -45,24 +60,38 @@ ruleTester.run('no-template-target-blank', rule, {
],
invalid: [
{
- code: 'link',
- errors: ['Using target="_blank" without rel="noopener noreferrer" is a security risk.']
+ code:
+ 'link',
+ errors: [
+ 'Using target="_blank" without rel="noopener noreferrer" is a security risk.'
+ ]
},
{
- code: 'link',
- errors: ['Using target="_blank" without rel="noopener noreferrer" is a security risk.']
+ code:
+ 'link',
+ errors: [
+ 'Using target="_blank" without rel="noopener noreferrer" is a security risk.'
+ ]
},
{
- code: 'link',
- errors: ['Using target="_blank" without rel="noopener noreferrer" is a security risk.']
+ code:
+ 'link',
+ errors: [
+ 'Using target="_blank" without rel="noopener noreferrer" is a security risk.'
+ ]
},
{
code: 'link',
- errors: ['Using target="_blank" without rel="noopener noreferrer" is a security risk.']
+ errors: [
+ 'Using target="_blank" without rel="noopener noreferrer" is a security risk.'
+ ]
},
{
- code: 'link',
- errors: ['Using target="_blank" without rel="noopener noreferrer" is a security risk.']
+ code:
+ 'link',
+ errors: [
+ 'Using target="_blank" without rel="noopener noreferrer" is a security risk.'
+ ]
}
]
})
diff --git a/tests/lib/rules/no-textarea-mustache.js b/tests/lib/rules/no-textarea-mustache.js
index 75040538b..e31f96bed 100644
--- a/tests/lib/rules/no-textarea-mustache.js
+++ b/tests/lib/rules/no-textarea-mustache.js
@@ -29,7 +29,8 @@ tester.run('no-textarea-mustache', rule, {
},
{
filename: 'test.vue',
- code: ''
+ code:
+ ''
}
],
invalid: [
@@ -40,7 +41,8 @@ tester.run('no-textarea-mustache', rule, {
},
{
filename: 'test.vue',
- code: '',
+ code:
+ '',
errors: [
"Unexpected mustache. Use 'v-model' instead.",
"Unexpected mustache. Use 'v-model' instead."
diff --git a/tests/lib/rules/no-unregistered-components.js b/tests/lib/rules/no-unregistered-components.js
index 2f7dd2630..e7ae51983 100644
--- a/tests/lib/rules/no-unregistered-components.js
+++ b/tests/lib/rules/no-unregistered-components.js
@@ -42,9 +42,7 @@ tester.run('no-unregistered-components', rule, {
`,
options: [
{
- ignorePatterns: [
- 'custom(\\-\\w+)+'
- ]
+ ignorePatterns: ['custom(\\-\\w+)+']
}
]
},
@@ -59,9 +57,7 @@ tester.run('no-unregistered-components', rule, {
`,
options: [
{
- ignorePatterns: [
- 'custom(\\-\\w+)+'
- ]
+ ignorePatterns: ['custom(\\-\\w+)+']
}
]
},
@@ -76,9 +72,7 @@ tester.run('no-unregistered-components', rule, {
`,
options: [
{
- ignorePatterns: [
- 'custom(\\-\\w+)+'
- ]
+ ignorePatterns: ['custom(\\-\\w+)+']
}
]
},
@@ -93,9 +87,7 @@ tester.run('no-unregistered-components', rule, {
`,
options: [
{
- ignorePatterns: [
- 'Custom(\\w+)+'
- ]
+ ignorePatterns: ['Custom(\\w+)+']
}
]
},
@@ -110,9 +102,7 @@ tester.run('no-unregistered-components', rule, {
`,
options: [
{
- ignorePatterns: [
- 'Custom(\\w+)+'
- ]
+ ignorePatterns: ['Custom(\\w+)+']
}
]
},
@@ -127,9 +117,7 @@ tester.run('no-unregistered-components', rule, {
`,
options: [
{
- ignorePatterns: [
- 'Custom(\\w+)+'
- ]
+ ignorePatterns: ['Custom(\\w+)+']
}
]
},
@@ -145,11 +133,7 @@ tester.run('no-unregistered-components', rule, {
`,
options: [
{
- ignorePatterns: [
- 'Custom(\\w+)+',
- 'Warm(\\w+)+',
- 'InfoBtn(\\w+)+'
- ]
+ ignorePatterns: ['Custom(\\w+)+', 'Warm(\\w+)+', 'InfoBtn(\\w+)+']
}
]
},
@@ -404,10 +388,13 @@ tester.run('no-unregistered-components', rule, {
`,
- errors: [{
- message: 'The "CustomComponent" component has been used but not registered.',
- line: 3
- }]
+ errors: [
+ {
+ message:
+ 'The "CustomComponent" component has been used but not registered.',
+ line: 3
+ }
+ ]
},
{
filename: 'test.vue',
@@ -418,15 +405,16 @@ tester.run('no-unregistered-components', rule, {
`,
options: [
{
- ignorePatterns: [
- 'custom(\\-\\w+)+'
- ]
+ ignorePatterns: ['custom(\\-\\w+)+']
}
],
- errors: [{
- message: 'The "WarmButton" component has been used but not registered.',
- line: 3
- }]
+ errors: [
+ {
+ message:
+ 'The "WarmButton" component has been used but not registered.',
+ line: 3
+ }
+ ]
},
{
filename: 'test.vue',
@@ -437,10 +425,13 @@ tester.run('no-unregistered-components', rule, {
`,
- errors: [{
- message: 'The "CustomComponent" component has been used but not registered.',
- line: 3
- }]
+ errors: [
+ {
+ message:
+ 'The "CustomComponent" component has been used but not registered.',
+ line: 3
+ }
+ ]
},
{
filename: 'test.vue',
@@ -453,15 +444,16 @@ tester.run('no-unregistered-components', rule, {
`,
options: [
{
- ignorePatterns: [
- 'custom(\\-\\w+)+'
- ]
+ ignorePatterns: ['custom(\\-\\w+)+']
}
],
- errors: [{
- message: 'The "WarmButton" component has been used but not registered.',
- line: 3
- }]
+ errors: [
+ {
+ message:
+ 'The "WarmButton" component has been used but not registered.',
+ line: 3
+ }
+ ]
},
{
filename: 'test.vue',
@@ -477,10 +469,13 @@ tester.run('no-unregistered-components', rule, {
}
`,
- errors: [{
- message: 'The "CustomComponent" component has been used but not registered.',
- line: 3
- }]
+ errors: [
+ {
+ message:
+ 'The "CustomComponent" component has been used but not registered.',
+ line: 3
+ }
+ ]
},
{
filename: 'test.vue',
@@ -498,10 +493,13 @@ tester.run('no-unregistered-components', rule, {
}
`,
- errors: [{
- message: 'The "CustomComponent" component has been used but not registered.',
- line: 3
- }]
+ errors: [
+ {
+ message:
+ 'The "CustomComponent" component has been used but not registered.',
+ line: 3
+ }
+ ]
},
{
filename: 'test.vue',
@@ -517,10 +515,13 @@ tester.run('no-unregistered-components', rule, {
}
`,
- errors: [{
- message: 'The "CustomComponent" component has been used but not registered.',
- line: 3
- }]
+ errors: [
+ {
+ message:
+ 'The "CustomComponent" component has been used but not registered.',
+ line: 3
+ }
+ ]
},
{
filename: 'test.vue',
@@ -538,10 +539,13 @@ tester.run('no-unregistered-components', rule, {
}
`,
- errors: [{
- message: 'The "CustomComponent" component has been used but not registered.',
- line: 3
- }]
+ errors: [
+ {
+ message:
+ 'The "CustomComponent" component has been used but not registered.',
+ line: 3
+ }
+ ]
},
{
filename: 'test.vue',
@@ -557,10 +561,13 @@ tester.run('no-unregistered-components', rule, {
}
`,
- errors: [{
- message: 'The "CustomComponent" component has been used but not registered.',
- line: 3
- }]
+ errors: [
+ {
+ message:
+ 'The "CustomComponent" component has been used but not registered.',
+ line: 3
+ }
+ ]
}
]
})
diff --git a/tests/lib/rules/no-unsupported-features.js b/tests/lib/rules/no-unsupported-features.js
index 6bebaae1a..d12109311 100644
--- a/tests/lib/rules/no-unsupported-features.js
+++ b/tests/lib/rules/no-unsupported-features.js
@@ -69,4 +69,3 @@ tester.run('no-unsupported-features', rule, {
}
]
})
-
diff --git a/tests/lib/rules/no-unsupported-features/dynamic-directive-arguments.js b/tests/lib/rules/no-unsupported-features/dynamic-directive-arguments.js
index de403b7ec..5dd9bba77 100644
--- a/tests/lib/rules/no-unsupported-features/dynamic-directive-arguments.js
+++ b/tests/lib/rules/no-unsupported-features/dynamic-directive-arguments.js
@@ -8,7 +8,10 @@ const RuleTester = require('eslint').RuleTester
const rule = require('../../../../lib/rules/no-unsupported-features')
const utils = require('./utils')
-const buildOptions = utils.optionsBuilder('dynamic-directive-arguments', '^2.5.0')
+const buildOptions = utils.optionsBuilder(
+ 'dynamic-directive-arguments',
+ '^2.5.0'
+)
const tester = new RuleTester({
parser: require.resolve('vue-eslint-parser'),
parserOptions: {
@@ -83,4 +86,3 @@ tester.run('no-unsupported-features/dynamic-directive-arguments', rule, {
}
]
})
-
diff --git a/tests/lib/rules/no-unsupported-features/slot-scope-attribute.js b/tests/lib/rules/no-unsupported-features/slot-scope-attribute.js
index 137ed7c2a..f9be7a006 100644
--- a/tests/lib/rules/no-unsupported-features/slot-scope-attribute.js
+++ b/tests/lib/rules/no-unsupported-features/slot-scope-attribute.js
@@ -52,7 +52,10 @@ tester.run('no-unsupported-features/slot-scope-attribute', rule, {
`,
- options: buildOptions({ version: '^2.4.0', ignores: ['slot-scope-attribute'] })
+ options: buildOptions({
+ version: '^2.4.0',
+ ignores: ['slot-scope-attribute']
+ })
}
],
invalid: [
diff --git a/tests/lib/rules/no-unsupported-features/utils.js b/tests/lib/rules/no-unsupported-features/utils.js
index 9c94f062c..0273961bd 100644
--- a/tests/lib/rules/no-unsupported-features/utils.js
+++ b/tests/lib/rules/no-unsupported-features/utils.js
@@ -16,8 +16,8 @@ module.exports = {
* @param {string} defaultVersion default Vue.js version
* @returns {function} the options builder
*/
- optionsBuilder (targetSyntax, defaultVersion) {
- const baseIgnores = SYNTAXES.filter(s => s !== targetSyntax)
+ optionsBuilder(targetSyntax, defaultVersion) {
+ const baseIgnores = SYNTAXES.filter((s) => s !== targetSyntax)
return (option) => {
const ignores = [...baseIgnores]
let version = defaultVersion
diff --git a/tests/lib/rules/no-unsupported-features/v-bind-prop-modifier-shorthand.js b/tests/lib/rules/no-unsupported-features/v-bind-prop-modifier-shorthand.js
index ac4662935..a49b61e93 100644
--- a/tests/lib/rules/no-unsupported-features/v-bind-prop-modifier-shorthand.js
+++ b/tests/lib/rules/no-unsupported-features/v-bind-prop-modifier-shorthand.js
@@ -8,7 +8,10 @@ const RuleTester = require('eslint').RuleTester
const rule = require('../../../../lib/rules/no-unsupported-features')
const utils = require('./utils')
-const buildOptions = utils.optionsBuilder('v-bind-prop-modifier-shorthand', '^2.6.0')
+const buildOptions = utils.optionsBuilder(
+ 'v-bind-prop-modifier-shorthand',
+ '^2.6.0'
+)
const tester = new RuleTester({
parser: require.resolve('vue-eslint-parser'),
parserOptions: {
@@ -60,7 +63,8 @@ tester.run('no-unsupported-features/v-bind-prop-modifier-shorthand', rule, {
`,
errors: [
{
- message: '`.prop` shorthand are not supported except Vue.js ">=2.6.0-beta.1 <=2.6.0-beta.3".',
+ message:
+ '`.prop` shorthand are not supported except Vue.js ">=2.6.0-beta.1 <=2.6.0-beta.3".',
line: 3
}
]
@@ -77,11 +81,11 @@ tester.run('no-unsupported-features/v-bind-prop-modifier-shorthand', rule, {
`,
errors: [
{
- message: '`.prop` shorthand are not supported except Vue.js ">=2.6.0-beta.1 <=2.6.0-beta.3".',
+ message:
+ '`.prop` shorthand are not supported except Vue.js ">=2.6.0-beta.1 <=2.6.0-beta.3".',
line: 3
}
]
}
]
})
-
diff --git a/tests/lib/rules/no-unsupported-features/v-slot.js b/tests/lib/rules/no-unsupported-features/v-slot.js
index 95b1eef13..6874731bd 100644
--- a/tests/lib/rules/no-unsupported-features/v-slot.js
+++ b/tests/lib/rules/no-unsupported-features/v-slot.js
@@ -74,7 +74,6 @@ tester.run('no-unsupported-features/v-slot', rule, {
}
],
invalid: [
-
{
code: `
diff --git a/tests/lib/rules/no-unused-components.js b/tests/lib/rules/no-unused-components.js
index 085cab630..181fbd6a5 100644
--- a/tests/lib/rules/no-unused-components.js
+++ b/tests/lib/rules/no-unused-components.js
@@ -490,10 +490,13 @@ tester.run('no-unused-components', rule, {
}
`,
- errors: [{
- message: 'The "TheButton" component has been registered but not used.',
- line: 10
- }]
+ errors: [
+ {
+ message:
+ 'The "TheButton" component has been registered but not used.',
+ line: 10
+ }
+ ]
},
{
filename: 'test.vue',
@@ -512,10 +515,13 @@ tester.run('no-unused-components', rule, {
}
`,
- errors: [{
- message: 'The "TheButton" component has been registered but not used.',
- line: 11
- }]
+ errors: [
+ {
+ message:
+ 'The "TheButton" component has been registered but not used.',
+ line: 11
+ }
+ ]
},
{
filename: 'test.vue',
@@ -534,10 +540,13 @@ tester.run('no-unused-components', rule, {
}
`,
- errors: [{
- message: 'The "the-button" component has been registered but not used.',
- line: 11
- }]
+ errors: [
+ {
+ message:
+ 'The "the-button" component has been registered but not used.',
+ line: 11
+ }
+ ]
},
// Setting: ignoreWhenBindingPresent
{
@@ -565,13 +574,16 @@ tester.run('no-unused-components', rule, {
}
`,
options: [{ ignoreWhenBindingPresent: false }],
- errors: [{
- message: 'The "Foo" component has been registered but not used.',
- line: 13
- }, {
- message: 'The "Bar" component has been registered but not used.',
- line: 14
- }]
+ errors: [
+ {
+ message: 'The "Foo" component has been registered but not used.',
+ line: 13
+ },
+ {
+ message: 'The "Bar" component has been registered but not used.',
+ line: 14
+ }
+ ]
},
// empty `:is`
@@ -588,10 +600,12 @@ tester.run('no-unused-components', rule, {
},
}
`,
- errors: [{
- message: 'The "Foo" component has been registered but not used.',
- line: 8
- }]
+ errors: [
+ {
+ message: 'The "Foo" component has been registered but not used.',
+ line: 8
+ }
+ ]
},
{
filename: 'test.vue',
@@ -606,10 +620,12 @@ tester.run('no-unused-components', rule, {
},
}
`,
- errors: [{
- message: 'The "Foo" component has been registered but not used.',
- line: 8
- }]
+ errors: [
+ {
+ message: 'The "Foo" component has been registered but not used.',
+ line: 8
+ }
+ ]
},
// computed properties
@@ -631,19 +647,24 @@ tester.run('no-unused-components', rule, {
}
}
`,
- errors: [{
- message: 'The "foo" component has been registered but not used.',
- line: 8
- }, {
- message: 'The "bar" component has been registered but not used.',
- line: 9
- }, {
- message: 'The "baz" component has been registered but not used.',
- line: 10
- }, {
- message: 'The "quux" component has been registered but not used.',
- line: 13
- }]
+ errors: [
+ {
+ message: 'The "foo" component has been registered but not used.',
+ line: 8
+ },
+ {
+ message: 'The "bar" component has been registered but not used.',
+ line: 9
+ },
+ {
+ message: 'The "baz" component has been registered but not used.',
+ line: 10
+ },
+ {
+ message: 'The "quux" component has been registered but not used.',
+ line: 13
+ }
+ ]
}
]
})
diff --git a/tests/lib/rules/no-unused-properties.js b/tests/lib/rules/no-unused-properties.js
index a17aff8b9..b9f984afc 100644
--- a/tests/lib/rules/no-unused-properties.js
+++ b/tests/lib/rules/no-unused-properties.js
@@ -15,7 +15,9 @@ const tester = new RuleTester({
}
})
-const allOptions = [{ groups: ['props', 'computed', 'data', 'methods', 'setup'] }]
+const allOptions = [
+ { groups: ['props', 'computed', 'data', 'methods', 'setup'] }
+]
tester.run('no-unused-properties', rule, {
valid: [
@@ -872,7 +874,8 @@ tester.run('no-unused-properties', rule, {
line: 17
},
{
- message: "'e' of property returned from `setup()` found, but never used.",
+ message:
+ "'e' of property returned from `setup()` found, but never used.",
line: 20
}
]
@@ -957,9 +960,7 @@ tester.run('no-unused-properties', rule, {
};
`,
- errors: [
- "'bar' of property found, but never used."
- ]
+ errors: ["'bar' of property found, but never used."]
},
{
filename: 'test.vue',
@@ -973,9 +974,7 @@ tester.run('no-unused-properties', rule, {
};
`,
- errors: [
- "'bar' of property found, but never used."
- ]
+ errors: ["'bar' of property found, but never used."]
},
{
filename: 'test.vue',
@@ -1051,9 +1050,7 @@ tester.run('no-unused-properties', rule, {
}
`,
- errors: [
- "'bar' of property found, but never used."
- ]
+ errors: ["'bar' of property found, but never used."]
},
{
filename: 'test.vue',
@@ -1076,9 +1073,7 @@ tester.run('no-unused-properties', rule, {
function fn3({bar}) {}
`,
- errors: [
- "'baz' of property found, but never used."
- ]
+ errors: ["'baz' of property found, but never used."]
},
{
filename: 'test.vue',
@@ -1176,9 +1171,7 @@ tester.run('no-unused-properties', rule, {
}
`,
- errors: [
- "'baz' of property found, but never used."
- ]
+ errors: ["'baz' of property found, but never used."]
},
{
filename: 'test.vue',
diff --git a/tests/lib/rules/no-unused-vars.js b/tests/lib/rules/no-unused-vars.js
index cd2eb645d..bf8a93777 100644
--- a/tests/lib/rules/no-unused-vars.js
+++ b/tests/lib/rules/no-unused-vars.js
@@ -30,19 +30,23 @@ tester.run('no-unused-vars', rule, {
code: ''
},
{
- code: '{{i}}{{j}}'
+ code:
+ '{{i}}{{j}}'
},
{
- code: '
'
@@ -80,43 +84,58 @@ tester.run('no-unused-vars', rule, {
errors: ["'props' is defined but never used."]
},
{
- code: '',
+ code:
+ '',
errors: ["'props' is defined but never used."]
},
{
- code: '
{{i}}{{i}}
',
+ code:
+ '
{{i}}{{i}}
',
errors: ["'j' is defined but never used."]
},
{
- code: '',
+ code:
+ '',
errors: ["'f' is defined but never used."]
},
{
code: '',
- errors: ["'a' is defined but never used.", "'b' is defined but never used.", "'c' is defined but never used."]
-
+ errors: [
+ "'a' is defined but never used.",
+ "'b' is defined but never used.",
+ "'c' is defined but never used."
+ ]
},
{
code: '
{{a}}
',
- errors: ["'b' is defined but never used.", "'c' is defined but never used."]
+ errors: [
+ "'b' is defined but never used.",
+ "'c' is defined but never used."
+ ]
},
{
code: '
{{b}}
',
errors: ["'c' is defined but never used."]
},
{
- code: '
{{item.name}}
',
+ code:
+ '
{{item.name}}
',
errors: ["'key' is defined but never used."]
},
{
code: '
{{value | x}}
',
- errors: [{
- message: "'x' is defined but never used.",
- suggestions: [{
- desc: 'Replace the x with _x',
- output: '
{{value | x}}
'
- }]
- }],
+ errors: [
+ {
+ message: "'x' is defined but never used.",
+ suggestions: [
+ {
+ desc: 'Replace the x with _x',
+ output:
+ '
',
- errors: [{
- message: "This 'v-if' should be moved to the wrapper element.",
- line: 1
- }]
+ code:
+ '
',
+ errors: [
+ {
+ message: "This 'v-if' should be moved to the wrapper element.",
+ line: 1
+ }
+ ]
},
{
filename: 'test.vue',
- code: '
',
- errors: [{
- message: "This 'v-if' should be moved to the wrapper element.",
- line: 1
- }]
+ code:
+ '
',
+ errors: [
+ {
+ message: "This 'v-if' should be moved to the wrapper element.",
+ line: 1
+ }
+ ]
},
{
filename: 'test.vue',
- code: '
',
- errors: [{
- message: "The 'list' variable inside 'v-for' directive should be replaced with a computed property that returns filtered array instead. You should not mix 'v-for' with 'v-if'.",
- line: 1
- }]
+ code:
+ '
',
+ errors: [
+ {
+ message:
+ "The 'list' variable inside 'v-for' directive should be replaced with a computed property that returns filtered array instead. You should not mix 'v-for' with 'v-if'.",
+ line: 1
+ }
+ ]
},
{
filename: 'test.vue',
@@ -164,10 +182,13 @@ tester.run('no-use-v-if-with-v-for', rule, {
`,
- errors: [{
- message: "The 'users' variable inside 'v-for' directive should be replaced with a computed property that returns filtered array instead. You should not mix 'v-for' with 'v-if'.",
- line: 6
- }]
+ errors: [
+ {
+ message:
+ "The 'users' variable inside 'v-for' directive should be replaced with a computed property that returns filtered array instead. You should not mix 'v-for' with 'v-if'.",
+ line: 6
+ }
+ ]
},
{
filename: 'test.vue',
@@ -184,18 +205,24 @@ tester.run('no-use-v-if-with-v-for', rule, {
`,
- errors: [{
- message: "This 'v-if' should be moved to the wrapper element.",
- line: 6
- }]
+ errors: [
+ {
+ message: "This 'v-if' should be moved to the wrapper element.",
+ line: 6
+ }
+ ]
},
{
filename: 'test.vue',
- code: '
',
- errors: [{
- message: "The 'list' variable inside 'v-for' directive should be replaced with a computed property that returns filtered array instead. You should not mix 'v-for' with 'v-if'.",
- line: 1
- }]
+ code:
+ '
',
+ errors: [
+ {
+ message:
+ "The 'list' variable inside 'v-for' directive should be replaced with a computed property that returns filtered array instead. You should not mix 'v-for' with 'v-if'.",
+ line: 1
+ }
+ ]
},
{
filename: 'test.vue',
@@ -212,10 +239,13 @@ tester.run('no-use-v-if-with-v-for', rule, {
`,
- errors: [{
- message: "The 'users' variable inside 'v-for' directive should be replaced with a computed property that returns filtered array instead. You should not mix 'v-for' with 'v-if'.",
- line: 6
- }]
+ errors: [
+ {
+ message:
+ "The 'users' variable inside 'v-for' directive should be replaced with a computed property that returns filtered array instead. You should not mix 'v-for' with 'v-if'.",
+ line: 6
+ }
+ ]
},
{
filename: 'test.vue',
@@ -232,26 +262,36 @@ tester.run('no-use-v-if-with-v-for', rule, {
`,
- errors: [{
- message: "This 'v-if' should be moved to the wrapper element.",
- line: 6
- }]
+ errors: [
+ {
+ message: "This 'v-if' should be moved to the wrapper element.",
+ line: 6
+ }
+ ]
},
{
filename: 'test.vue',
- code: '
',
- errors: [{
- message: "The 'list()' expression inside 'v-for' directive should be replaced with a computed property that returns filtered array instead. You should not mix 'v-for' with 'v-if'.",
- line: 1
- }]
+ code:
+ '
',
+ errors: [
+ {
+ message:
+ "The 'list()' expression inside 'v-for' directive should be replaced with a computed property that returns filtered array instead. You should not mix 'v-for' with 'v-if'.",
+ line: 1
+ }
+ ]
},
{
filename: 'test.vue',
- code: '
',
- errors: [{
- message: "The '5' expression inside 'v-for' directive should be replaced with a computed property that returns filtered array instead. You should not mix 'v-for' with 'v-if'.",
- line: 1
- }]
+ code:
+ '
',
+ errors: [
+ {
+ message:
+ "The '5' expression inside 'v-for' directive should be replaced with a computed property that returns filtered array instead. You should not mix 'v-for' with 'v-if'.",
+ line: 1
+ }
+ ]
}
]
})
diff --git a/tests/lib/rules/no-v-model-argument.js b/tests/lib/rules/no-v-model-argument.js
index 5cf5c5952..cba98ebe4 100644
--- a/tests/lib/rules/no-v-model-argument.js
+++ b/tests/lib/rules/no-v-model-argument.js
@@ -21,7 +21,6 @@ const ruleTester = new RuleTester({
})
ruleTester.run('no-v-model-argument', rule, {
-
valid: [
{
filename: 'test.vue',
@@ -32,12 +31,14 @@ ruleTester.run('no-v-model-argument', rule, {
invalid: [
{
filename: 'test.vue',
- code: '',
+ code:
+ '',
errors: ["'v-model' directives require no argument."]
},
{
filename: 'test.vue',
- code: '',
+ code:
+ '',
errors: ["'v-model' directives require no argument."]
}
]
diff --git a/tests/lib/rules/prop-name-casing.js b/tests/lib/rules/prop-name-casing.js
index 5290ec07d..eb932b299 100644
--- a/tests/lib/rules/prop-name-casing.js
+++ b/tests/lib/rules/prop-name-casing.js
@@ -22,7 +22,6 @@ const parserOptions = {
const ruleTester = new RuleTester()
ruleTester.run('prop-name-casing', rule, {
-
valid: [
{
filename: 'test.vue',
@@ -361,11 +360,13 @@ ruleTester.run('prop-name-casing', rule, {
}
`,
parserOptions,
- errors: [{
- message: 'Prop "greeting_text" is not in camelCase.',
- type: 'Property',
- line: 4
- }]
+ errors: [
+ {
+ message: 'Prop "greeting_text" is not in camelCase.',
+ type: 'Property',
+ line: 4
+ }
+ ]
},
{
filename: 'test.vue',
@@ -378,11 +379,13 @@ ruleTester.run('prop-name-casing', rule, {
`,
options: ['camelCase'],
parserOptions,
- errors: [{
- message: 'Prop "greeting_text" is not in camelCase.',
- type: 'Property',
- line: 4
- }]
+ errors: [
+ {
+ message: 'Prop "greeting_text" is not in camelCase.',
+ type: 'Property',
+ line: 4
+ }
+ ]
},
{
filename: 'test.vue',
@@ -393,11 +396,13 @@ ruleTester.run('prop-name-casing', rule, {
`,
options: ['camelCase'],
parserOptions,
- errors: [{
- message: 'Prop "greeting_text" is not in camelCase.',
- type: 'Literal',
- line: 3
- }]
+ errors: [
+ {
+ message: 'Prop "greeting_text" is not in camelCase.',
+ type: 'Literal',
+ line: 3
+ }
+ ]
},
{
filename: 'test.vue',
@@ -410,11 +415,13 @@ ruleTester.run('prop-name-casing', rule, {
`,
options: ['snake_case'],
parserOptions,
- errors: [{
- message: 'Prop "greetingText" is not in snake_case.',
- type: 'Property',
- line: 4
- }]
+ errors: [
+ {
+ message: 'Prop "greetingText" is not in snake_case.',
+ type: 'Property',
+ line: 4
+ }
+ ]
},
{
filename: 'test.vue',
@@ -427,11 +434,13 @@ ruleTester.run('prop-name-casing', rule, {
`,
options: ['camelCase'],
parserOptions,
- errors: [{
- message: 'Prop "greeting-text" is not in camelCase.',
- type: 'Property',
- line: 4
- }]
+ errors: [
+ {
+ message: 'Prop "greeting-text" is not in camelCase.',
+ type: 'Property',
+ line: 4
+ }
+ ]
},
{
filename: 'test.vue',
@@ -444,11 +453,13 @@ ruleTester.run('prop-name-casing', rule, {
`,
options: ['snake_case'],
parserOptions,
- errors: [{
- message: 'Prop "greeting-text" is not in snake_case.',
- type: 'Property',
- line: 4
- }]
+ errors: [
+ {
+ message: 'Prop "greeting-text" is not in snake_case.',
+ type: 'Property',
+ line: 4
+ }
+ ]
},
{
filename: 'test.vue',
@@ -460,11 +471,13 @@ ruleTester.run('prop-name-casing', rule, {
}
`,
parserOptions,
- errors: [{
- message: 'Prop "greeting_text" is not in camelCase.',
- type: 'Property',
- line: 4
- }]
+ errors: [
+ {
+ message: 'Prop "greeting_text" is not in camelCase.',
+ type: 'Property',
+ line: 4
+ }
+ ]
},
{
// computed property name
@@ -477,11 +490,13 @@ ruleTester.run('prop-name-casing', rule, {
}
`,
parserOptions,
- errors: [{
- message: 'Prop "greeting-text" is not in camelCase.',
- type: 'Property',
- line: 4
- }]
+ errors: [
+ {
+ message: 'Prop "greeting-text" is not in camelCase.',
+ type: 'Property',
+ line: 4
+ }
+ ]
},
{
// shorthand
@@ -494,11 +509,13 @@ ruleTester.run('prop-name-casing', rule, {
}
`,
parserOptions,
- errors: [{
- message: 'Prop "greeting_text" is not in camelCase.',
- type: 'Property',
- line: 4
- }]
+ errors: [
+ {
+ message: 'Prop "greeting_text" is not in camelCase.',
+ type: 'Property',
+ line: 4
+ }
+ ]
},
{
filename: 'test.vue',
@@ -510,11 +527,13 @@ ruleTester.run('prop-name-casing', rule, {
}
`,
parserOptions,
- errors: [{
- message: 'Prop "abc-123-def" is not in camelCase.',
- type: 'Property',
- line: 4
- }]
+ errors: [
+ {
+ message: 'Prop "abc-123-def" is not in camelCase.',
+ type: 'Property',
+ line: 4
+ }
+ ]
},
{
// Parentheses computed property name
@@ -527,11 +546,13 @@ ruleTester.run('prop-name-casing', rule, {
}
`,
parserOptions,
- errors: [{
- message: 'Prop "greeting-text" is not in camelCase.',
- type: 'Property',
- line: 4
- }]
+ errors: [
+ {
+ message: 'Prop "greeting-text" is not in camelCase.',
+ type: 'Property',
+ line: 4
+ }
+ ]
},
{
filename: 'test.vue',
@@ -558,6 +579,5 @@ ruleTester.run('prop-name-casing', rule, {
parserOptions,
errors: ['Prop "_itemName" is not in snake_case.']
}
-
]
})
diff --git a/tests/lib/rules/require-default-prop.js b/tests/lib/rules/require-default-prop.js
index b544921bd..ce292774e 100644
--- a/tests/lib/rules/require-default-prop.js
+++ b/tests/lib/rules/require-default-prop.js
@@ -21,7 +21,6 @@ const parserOptions = {
const ruleTester = new RuleTester({ parserOptions })
ruleTester.run('require-default-prop', rule, {
-
valid: [
{
filename: 'test.vue',
@@ -205,25 +204,32 @@ ruleTester.run('require-default-prop', rule, {
}
}
`,
- errors: [{
- message: `Prop 'a' requires default value to be set.`,
- line: 4
- }, {
- message: `Prop 'b' requires default value to be set.`,
- line: 5
- }, {
- message: `Prop 'c' requires default value to be set.`,
- line: 6
- }, {
- message: `Prop 'd' requires default value to be set.`,
- line: 9
- }, {
- message: `Prop 'e' requires default value to be set.`,
- line: 13
- }, {
- message: `Prop 'f' requires default value to be set.`,
- line: 14
- }]
+ errors: [
+ {
+ message: `Prop 'a' requires default value to be set.`,
+ line: 4
+ },
+ {
+ message: `Prop 'b' requires default value to be set.`,
+ line: 5
+ },
+ {
+ message: `Prop 'c' requires default value to be set.`,
+ line: 6
+ },
+ {
+ message: `Prop 'd' requires default value to be set.`,
+ line: 9
+ },
+ {
+ message: `Prop 'e' requires default value to be set.`,
+ line: 13
+ },
+ {
+ message: `Prop 'f' requires default value to be set.`,
+ line: 14
+ }
+ ]
},
{
filename: 'test.vue',
@@ -237,10 +243,12 @@ ruleTester.run('require-default-prop', rule, {
});
`,
parser: require.resolve('@typescript-eslint/parser'),
- errors: [{
- message: `Prop 'a' requires default value to be set.`,
- line: 4
- }]
+ errors: [
+ {
+ message: `Prop 'a' requires default value to be set.`,
+ line: 4
+ }
+ ]
},
{
filename: 'test.vue',
@@ -254,10 +262,12 @@ ruleTester.run('require-default-prop', rule, {
});
`,
parser: require.resolve('@typescript-eslint/parser'),
- errors: [{
- message: `Prop 'a' requires default value to be set.`,
- line: 4
- }]
+ errors: [
+ {
+ message: `Prop 'a' requires default value to be set.`,
+ line: 4
+ }
+ ]
},
// computed propertys
@@ -273,19 +283,24 @@ ruleTester.run('require-default-prop', rule, {
}
};
`,
- errors: [{
- message: `Prop 'a' requires default value to be set.`,
- line: 4
- }, {
- message: `Prop 'b' requires default value to be set.`,
- line: 5
- }, {
- message: `Prop 'c' requires default value to be set.`,
- line: 6
- }, {
- message: `Prop 'd' requires default value to be set.`,
- line: 7
- }]
+ errors: [
+ {
+ message: `Prop 'a' requires default value to be set.`,
+ line: 4
+ },
+ {
+ message: `Prop 'b' requires default value to be set.`,
+ line: 5
+ },
+ {
+ message: `Prop 'c' requires default value to be set.`,
+ line: 6
+ },
+ {
+ message: `Prop 'd' requires default value to be set.`,
+ line: 7
+ }
+ ]
},
// unknown static name
{
@@ -299,16 +314,20 @@ ruleTester.run('require-default-prop', rule, {
}
};
`,
- errors: [{
- message: `Prop '[foo]' requires default value to be set.`,
- line: 4
- }, {
- message: `Prop '[bar()]' requires default value to be set.`,
- line: 5
- }, {
- message: `Prop '[baz.baz]' requires default value to be set.`,
- line: 6
- }]
+ errors: [
+ {
+ message: `Prop '[foo]' requires default value to be set.`,
+ line: 4
+ },
+ {
+ message: `Prop '[bar()]' requires default value to be set.`,
+ line: 5
+ },
+ {
+ message: `Prop '[baz.baz]' requires default value to be set.`,
+ line: 6
+ }
+ ]
},
{
// https://github.com/vuejs/eslint-plugin-vue/issues/1040
@@ -322,7 +341,7 @@ ruleTester.run('require-default-prop', rule, {
}
}
`,
- errors: ['Prop \'foo\' requires default value to be set.']
+ errors: ["Prop 'foo' requires default value to be set."]
},
{
filename: 'unknown-prop-details-test.vue',
@@ -335,7 +354,7 @@ ruleTester.run('require-default-prop', rule, {
}
}
`,
- errors: ['Prop \'foo\' requires default value to be set.']
+ errors: ["Prop 'foo' requires default value to be set."]
}
]
})
diff --git a/tests/lib/rules/require-explicit-emits.js b/tests/lib/rules/require-explicit-emits.js
index 0a084ab43..1db1edb2b 100644
--- a/tests/lib/rules/require-explicit-emits.js
+++ b/tests/lib/rules/require-explicit-emits.js
@@ -382,7 +382,8 @@ tester.run('require-explicit-emits', rule, {
endColumn: 33,
suggestions: [
{
- desc: 'Add the `emits` option with array syntax and define "foo" event.',
+ desc:
+ 'Add the `emits` option with array syntax and define "foo" event.',
output: `
@@ -395,7 +396,8 @@ emits: ['foo']
`
},
{
- desc: 'Add the `emits` option with object syntax and define "foo" event.',
+ desc:
+ 'Add the `emits` option with object syntax and define "foo" event.',
output: `
@@ -756,10 +758,12 @@ emits: {'foo': null}
`,
errors: [
{
- message: 'The "foo" event has been triggered but not declared on `emits` option.',
+ message:
+ 'The "foo" event has been triggered but not declared on `emits` option.',
suggestions: [
{
- desc: 'Add the `emits` option with array syntax and define "foo" event.',
+ desc:
+ 'Add the `emits` option with array syntax and define "foo" event.',
output: `
@@ -774,7 +778,8 @@ emits: ['foo']
`
},
{
- desc: 'Add the `emits` option with object syntax and define "foo" event.',
+ desc:
+ 'Add the `emits` option with object syntax and define "foo" event.',
output: `
@@ -808,7 +813,8 @@ emits: {'foo': null}
`,
errors: [
{
- message: 'The "foo" event has been triggered but not declared on `emits` option.',
+ message:
+ 'The "foo" event has been triggered but not declared on `emits` option.',
suggestions: [
{
desc: 'Add the "foo" to `emits` option.',
@@ -896,7 +902,8 @@ emits: {'foo': null}
`,
errors: [
{
- message: 'The "foo" event has been triggered but not declared on `emits` option.',
+ message:
+ 'The "foo" event has been triggered but not declared on `emits` option.',
suggestions: [
{
desc: 'Add the "foo" to `emits` option.',
@@ -926,7 +933,8 @@ emits: {'foo': null}
]
},
{
- message: 'The "bar" event has been triggered but not declared on `emits` option.',
+ message:
+ 'The "bar" event has been triggered but not declared on `emits` option.',
suggestions: [
{
desc: 'Add the "bar" to `emits` option.',
@@ -956,7 +964,8 @@ emits: {'foo': null}
]
},
{
- message: 'The "foo" event has been triggered but not declared on `emits` option.',
+ message:
+ 'The "foo" event has been triggered but not declared on `emits` option.',
suggestions: [
{
desc: 'Add the "foo" to `emits` option.',
@@ -1017,7 +1026,8 @@ emits: {'foo': null}
`,
errors: [
{
- message: 'The "foo" event has been triggered but not declared on `emits` option.',
+ message:
+ 'The "foo" event has been triggered but not declared on `emits` option.',
suggestions: [
{
desc: 'Add the "foo" to `emits` option.',
@@ -1051,7 +1061,8 @@ emits: {'foo': null}
]
},
{
- message: 'The "bar" event has been triggered but not declared on `emits` option.',
+ message:
+ 'The "bar" event has been triggered but not declared on `emits` option.',
suggestions: [
{
desc: 'Add the "bar" to `emits` option.',
@@ -1085,7 +1096,8 @@ emits: {'foo': null}
]
},
{
- message: 'The "foo" event has been triggered but not declared on `emits` option.',
+ message:
+ 'The "foo" event has been triggered but not declared on `emits` option.',
suggestions: [
{
desc: 'Add the "foo" to `emits` option.',
@@ -1134,7 +1146,8 @@ emits: {'foo': null}
`,
errors: [
{
- message: 'The "foo" event has been triggered but not declared on `emits` option.',
+ message:
+ 'The "foo" event has been triggered but not declared on `emits` option.',
suggestions: [
{
desc: 'Add the "foo" to `emits` option.',
@@ -1167,7 +1180,8 @@ emits: {'foo': null}
`,
errors: [
{
- message: 'The "foo" event has been triggered but not declared on `emits` option.',
+ message:
+ 'The "foo" event has been triggered but not declared on `emits` option.',
suggestions: [
{
desc: 'Add the "foo" to `emits` option.',
@@ -1200,7 +1214,8 @@ emits: {'foo': null}
`,
errors: [
{
- message: 'The "foo" event has been triggered but not declared on `emits` option.',
+ message:
+ 'The "foo" event has been triggered but not declared on `emits` option.',
suggestions: [
{
desc: 'Add the "foo" to `emits` option.',
@@ -1233,7 +1248,8 @@ emits: {'foo': null}
`,
errors: [
{
- message: 'The "foo" event has been triggered but not declared on `emits` option.',
+ message:
+ 'The "foo" event has been triggered but not declared on `emits` option.',
suggestions: []
}
]
@@ -1253,10 +1269,12 @@ emits: {'foo': null}
`,
errors: [
{
- message: 'The "foo" event has been triggered but not declared on `emits` option.',
+ message:
+ 'The "foo" event has been triggered but not declared on `emits` option.',
suggestions: [
{
- desc: 'Add the `emits` option with array syntax and define "foo" event.',
+ desc:
+ 'Add the `emits` option with array syntax and define "foo" event.',
output: `
@@ -1269,8 +1287,10 @@ emits: ['foo'],
}
`
- }, {
- desc: 'Add the `emits` option with object syntax and define "foo" event.',
+ },
+ {
+ desc:
+ 'Add the `emits` option with object syntax and define "foo" event.',
output: `
@@ -1302,10 +1322,12 @@ emits: {'foo': null},
`,
errors: [
{
- message: 'The "foo" event has been triggered but not declared on `emits` option.',
+ message:
+ 'The "foo" event has been triggered but not declared on `emits` option.',
suggestions: [
{
- desc: 'Add the `emits` option with array syntax and define "foo" event.',
+ desc:
+ 'Add the `emits` option with array syntax and define "foo" event.',
output: `
@@ -1317,8 +1339,10 @@ emits: ['foo'],
}
`
- }, {
- desc: 'Add the `emits` option with object syntax and define "foo" event.',
+ },
+ {
+ desc:
+ 'Add the `emits` option with object syntax and define "foo" event.',
output: `
@@ -1349,10 +1373,12 @@ emits: {'foo': null},
`,
errors: [
{
- message: 'The "foo" event has been triggered but not declared on `emits` option.',
+ message:
+ 'The "foo" event has been triggered but not declared on `emits` option.',
suggestions: [
{
- desc: 'Add the `emits` option with array syntax and define "foo" event.',
+ desc:
+ 'Add the `emits` option with array syntax and define "foo" event.',
output: `
@@ -1364,8 +1390,10 @@ emits: ['foo']
}
`
- }, {
- desc: 'Add the `emits` option with object syntax and define "foo" event.',
+ },
+ {
+ desc:
+ 'Add the `emits` option with object syntax and define "foo" event.',
output: `
@@ -1396,10 +1424,12 @@ emits: {'foo': null}
`,
errors: [
{
- message: 'The "foo" event has been triggered but not declared on `emits` option.',
+ message:
+ 'The "foo" event has been triggered but not declared on `emits` option.',
suggestions: [
{
- desc: 'Add the `emits` option with array syntax and define "foo" event.',
+ desc:
+ 'Add the `emits` option with array syntax and define "foo" event.',
output: `
@@ -1411,8 +1441,10 @@ emits: ['foo']
}
`
- }, {
- desc: 'Add the `emits` option with object syntax and define "foo" event.',
+ },
+ {
+ desc:
+ 'Add the `emits` option with object syntax and define "foo" event.',
output: `
diff --git a/tests/lib/rules/require-name-property.js b/tests/lib/rules/require-name-property.js
index 7b55e2400..c79ee9f2a 100644
--- a/tests/lib/rules/require-name-property.js
+++ b/tests/lib/rules/require-name-property.js
@@ -52,10 +52,12 @@ ruleTester.run('require-name-property', rule, {
}
`,
parserOptions,
- errors: [{
- message: 'Required name property is not set.',
- type: 'ObjectExpression'
- }]
+ errors: [
+ {
+ message: 'Required name property is not set.',
+ type: 'ObjectExpression'
+ }
+ ]
},
{
filename: 'InvalidComponent.vue',
@@ -65,10 +67,12 @@ ruleTester.run('require-name-property', rule, {
}
`,
parserOptions,
- errors: [{
- message: 'Required name property is not set.',
- type: 'ObjectExpression'
- }]
+ errors: [
+ {
+ message: 'Required name property is not set.',
+ type: 'ObjectExpression'
+ }
+ ]
},
{
filename: 'InvalidComponent.vue',
@@ -80,10 +84,12 @@ ruleTester.run('require-name-property', rule, {
}
`,
parserOptions,
- errors: [{
- message: 'Required name property is not set.',
- type: 'ObjectExpression'
- }]
+ errors: [
+ {
+ message: 'Required name property is not set.',
+ type: 'ObjectExpression'
+ }
+ ]
},
{
filename: 'InvalidComponent.vue',
@@ -93,10 +99,12 @@ ruleTester.run('require-name-property', rule, {
}
`,
parserOptions,
- errors: [{
- message: 'Required name property is not set.',
- type: 'ObjectExpression'
- }]
+ errors: [
+ {
+ message: 'Required name property is not set.',
+ type: 'ObjectExpression'
+ }
+ ]
}
]
})
diff --git a/tests/lib/rules/require-prop-type-constructor.js b/tests/lib/rules/require-prop-type-constructor.js
index 103eb26a1..18ece4f55 100644
--- a/tests/lib/rules/require-prop-type-constructor.js
+++ b/tests/lib/rules/require-prop-type-constructor.js
@@ -22,7 +22,6 @@ const ruleTester = new RuleTester({
}
})
ruleTester.run('require-prop-type-constructor', rule, {
-
valid: [
{
filename: 'SomeComponent.vue',
@@ -132,25 +131,32 @@ ruleTester.run('require-prop-type-constructor', rule, {
}
}
`,
- errors: [{
- message: 'The "myProp" property should be a constructor.',
- line: 4
- }, {
- message: 'The "anotherType" property should be a constructor.',
- line: 5
- }, {
- message: 'The "anotherType" property should be a constructor.',
- line: 5
- }, {
- message: 'The "extraProp" property should be a constructor.',
- line: 7
- }, {
- message: 'The "lastProp" property should be a constructor.',
- line: 11
- }, {
- message: 'The "nullProp" property should be a constructor.',
- line: 13
- }]
+ errors: [
+ {
+ message: 'The "myProp" property should be a constructor.',
+ line: 4
+ },
+ {
+ message: 'The "anotherType" property should be a constructor.',
+ line: 5
+ },
+ {
+ message: 'The "anotherType" property should be a constructor.',
+ line: 5
+ },
+ {
+ message: 'The "extraProp" property should be a constructor.',
+ line: 7
+ },
+ {
+ message: 'The "lastProp" property should be a constructor.',
+ line: 11
+ },
+ {
+ message: 'The "nullProp" property should be a constructor.',
+ line: 13
+ }
+ ]
},
{
filename: 'SomeComponent.vue',
@@ -174,19 +180,24 @@ ruleTester.run('require-prop-type-constructor', rule, {
}
}
`,
- errors: [{
- message: 'The "a" property should be a constructor.',
- line: 4
- }, {
- message: 'The "b" property should be a constructor.',
- line: 5
- }, {
- message: 'The "c" property should be a constructor.',
- line: 6
- }, {
- message: 'The "d" property should be a constructor.',
- line: 7
- }]
+ errors: [
+ {
+ message: 'The "a" property should be a constructor.',
+ line: 4
+ },
+ {
+ message: 'The "b" property should be a constructor.',
+ line: 5
+ },
+ {
+ message: 'The "c" property should be a constructor.',
+ line: 6
+ },
+ {
+ message: 'The "d" property should be a constructor.',
+ line: 7
+ }
+ ]
},
{
filename: 'SomeComponent.vue',
@@ -210,10 +221,12 @@ ruleTester.run('require-prop-type-constructor', rule, {
}
}
`,
- errors: [{
- message: 'The "a" property should be a constructor.',
- line: 5
- }],
+ errors: [
+ {
+ message: 'The "a" property should be a constructor.',
+ line: 5
+ }
+ ],
parser: require.resolve('@typescript-eslint/parser')
},
{
@@ -232,10 +245,12 @@ ruleTester.run('require-prop-type-constructor', rule, {
}
}
`,
- errors: [{
- message: 'The "name" property should be a constructor.',
- line: 4
- }],
+ errors: [
+ {
+ message: 'The "name" property should be a constructor.',
+ line: 4
+ }
+ ],
parser: require.resolve('@typescript-eslint/parser')
},
{
diff --git a/tests/lib/rules/require-prop-types.js b/tests/lib/rules/require-prop-types.js
index 594ccdd4f..4d7d153b3 100644
--- a/tests/lib/rules/require-prop-types.js
+++ b/tests/lib/rules/require-prop-types.js
@@ -16,9 +16,8 @@ const RuleTester = require('eslint').RuleTester
// Tests
// ------------------------------------------------------------------------------
-var ruleTester = new RuleTester()
+const ruleTester = new RuleTester()
ruleTester.run('require-prop-types', rule, {
-
valid: [
{
filename: 'test.vue',
@@ -171,19 +170,24 @@ ruleTester.run('require-prop-types', rule, {
}
`,
parserOptions: { ecmaVersion: 6, sourceType: 'module' },
- errors: [{
- message: 'Prop "foo" should define at least its type.',
- line: 3
- }, {
- message: 'Prop "bar" should define at least its type.',
- line: 3
- }, {
- message: 'Prop "baz" should define at least its type.',
- line: 3
- }, {
- message: 'Prop "Unknown prop" should define at least its type.',
- line: 3
- }]
+ errors: [
+ {
+ message: 'Prop "foo" should define at least its type.',
+ line: 3
+ },
+ {
+ message: 'Prop "bar" should define at least its type.',
+ line: 3
+ },
+ {
+ message: 'Prop "baz" should define at least its type.',
+ line: 3
+ },
+ {
+ message: 'Prop "Unknown prop" should define at least its type.',
+ line: 3
+ }
+ ]
},
{
filename: 'test.js',
@@ -193,19 +197,24 @@ ruleTester.run('require-prop-types', rule, {
})
`,
parserOptions: { ecmaVersion: 6, sourceType: 'module' },
- errors: [{
- message: 'Prop "foo" should define at least its type.',
- line: 3
- }, {
- message: 'Prop "bar" should define at least its type.',
- line: 3
- }, {
- message: 'Prop "baz" should define at least its type.',
- line: 3
- }, {
- message: 'Prop "Unknown prop" should define at least its type.',
- line: 3
- }]
+ errors: [
+ {
+ message: 'Prop "foo" should define at least its type.',
+ line: 3
+ },
+ {
+ message: 'Prop "bar" should define at least its type.',
+ line: 3
+ },
+ {
+ message: 'Prop "baz" should define at least its type.',
+ line: 3
+ },
+ {
+ message: 'Prop "Unknown prop" should define at least its type.',
+ line: 3
+ }
+ ]
},
{
filename: 'test.vue',
@@ -218,10 +227,12 @@ ruleTester.run('require-prop-types', rule, {
}
`,
parserOptions: { ecmaVersion: 6, sourceType: 'module' },
- errors: [{
- message: 'Prop "foo" should define at least its type.',
- line: 4
- }]
+ errors: [
+ {
+ message: 'Prop "foo" should define at least its type.',
+ line: 4
+ }
+ ]
},
{
filename: 'test.vue',
@@ -235,10 +246,12 @@ ruleTester.run('require-prop-types', rule, {
}
`,
parserOptions: { ecmaVersion: 6, sourceType: 'module' },
- errors: [{
- message: 'Prop "foo" should define at least its type.',
- line: 4
- }]
+ errors: [
+ {
+ message: 'Prop "foo" should define at least its type.',
+ line: 4
+ }
+ ]
},
{
filename: 'test.vue',
@@ -250,10 +263,12 @@ ruleTester.run('require-prop-types', rule, {
}
`,
parserOptions: { ecmaVersion: 6, sourceType: 'module' },
- errors: [{
- message: 'Prop "foo" should define at least its type.',
- line: 4
- }]
+ errors: [
+ {
+ message: 'Prop "foo" should define at least its type.',
+ line: 4
+ }
+ ]
},
{
filename: 'test.vue',
@@ -266,10 +281,12 @@ ruleTester.run('require-prop-types', rule, {
`,
parserOptions: { ecmaVersion: 6, sourceType: 'module' },
parser: require.resolve('@typescript-eslint/parser'),
- errors: [{
- message: 'Prop "foo" should define at least its type.',
- line: 4
- }]
+ errors: [
+ {
+ message: 'Prop "foo" should define at least its type.',
+ line: 4
+ }
+ ]
},
{
filename: 'test.vue',
@@ -282,10 +299,12 @@ ruleTester.run('require-prop-types', rule, {
`,
parserOptions: { ecmaVersion: 6, sourceType: 'module' },
parser: require.resolve('@typescript-eslint/parser'),
- errors: [{
- message: 'Prop "foo" should define at least its type.',
- line: 4
- }]
+ errors: [
+ {
+ message: 'Prop "foo" should define at least its type.',
+ line: 4
+ }
+ ]
}
]
})
diff --git a/tests/lib/rules/require-render-return.js b/tests/lib/rules/require-render-return.js
index 580a6b89e..e931badf1 100644
--- a/tests/lib/rules/require-render-return.js
+++ b/tests/lib/rules/require-render-return.js
@@ -143,11 +143,13 @@ ruleTester.run('require-render-return', rule, {
}
}`,
parserOptions,
- errors: [{
- message: 'Expected to return a value in render function.',
- type: 'Identifier',
- line: 2
- }]
+ errors: [
+ {
+ message: 'Expected to return a value in render function.',
+ type: 'Identifier',
+ line: 2
+ }
+ ]
},
{
filename: 'test.vue',
@@ -159,11 +161,13 @@ ruleTester.run('require-render-return', rule, {
}
}`,
parserOptions,
- errors: [{
- message: 'Expected to return a value in render function.',
- type: 'Identifier',
- line: 2
- }]
+ errors: [
+ {
+ message: 'Expected to return a value in render function.',
+ type: 'Identifier',
+ line: 2
+ }
+ ]
},
{
code: `Vue.component('test', {
@@ -174,11 +178,13 @@ ruleTester.run('require-render-return', rule, {
}
})`,
parserOptions,
- errors: [{
- message: 'Expected to return a value in render function.',
- type: 'Identifier',
- line: 2
- }]
+ errors: [
+ {
+ message: 'Expected to return a value in render function.',
+ type: 'Identifier',
+ line: 2
+ }
+ ]
},
{
code: `app.component('test', {
@@ -189,11 +195,13 @@ ruleTester.run('require-render-return', rule, {
}
})`,
parserOptions,
- errors: [{
- message: 'Expected to return a value in render function.',
- type: 'Identifier',
- line: 2
- }]
+ errors: [
+ {
+ message: 'Expected to return a value in render function.',
+ type: 'Identifier',
+ line: 2
+ }
+ ]
},
{
code: `Vue.component('test2', {
@@ -204,11 +212,13 @@ ruleTester.run('require-render-return', rule, {
}
})`,
parserOptions,
- errors: [{
- message: 'Expected to return a value in render function.',
- type: 'Identifier',
- line: 2
- }]
+ errors: [
+ {
+ message: 'Expected to return a value in render function.',
+ type: 'Identifier',
+ line: 2
+ }
+ ]
},
{
code: `Vue.component('test2', {
@@ -221,11 +231,13 @@ ruleTester.run('require-render-return', rule, {
}
})`,
parserOptions,
- errors: [{
- message: 'Expected to return a value in render function.',
- type: 'Identifier',
- line: 2
- }]
+ errors: [
+ {
+ message: 'Expected to return a value in render function.',
+ type: 'Identifier',
+ line: 2
+ }
+ ]
}
]
})
diff --git a/tests/lib/rules/require-toggle-inside-transition.js b/tests/lib/rules/require-toggle-inside-transition.js
index 76c2b7c5a..82726b6f0 100644
--- a/tests/lib/rules/require-toggle-inside-transition.js
+++ b/tests/lib/rules/require-toggle-inside-transition.js
@@ -32,7 +32,8 @@ tester.run('require-toggle-inside-transition', rule, {
},
{
filename: 'test.vue',
- code: ''
+ code:
+ ''
},
{
filename: 'test.vue',
@@ -40,7 +41,8 @@ tester.run('require-toggle-inside-transition', rule, {
},
{
filename: 'test.vue',
- code: ''
+ code:
+ ''
},
{
filename: 'test.vue',
@@ -48,23 +50,28 @@ tester.run('require-toggle-inside-transition', rule, {
},
{
filename: 'test.vue',
- code: ''
+ code:
+ ''
},
{
filename: 'test.vue',
- code: ''
+ code:
+ ''
},
{
filename: 'test.vue',
- code: ' '
+ code:
+ ' '
},
{
filename: 'test.vue',
- code: ' '
+ code:
+ ' '
},
{
filename: 'test.vue',
- code: ''
+ code:
+ ''
}
],
invalid: [
@@ -93,17 +100,20 @@ tester.run('require-toggle-inside-transition', rule, {
},
{
filename: 'test.vue',
- code: '',
+ code:
+ '',
errors: [{ messageId: 'expected' }]
},
{
filename: 'test.vue',
- code: ' ',
+ code:
+ ' ',
errors: [{ messageId: 'expected' }]
},
{
filename: 'test.vue',
- code: '',
+ code:
+ '',
errors: [{ messageId: 'expected' }]
}
]
diff --git a/tests/lib/rules/require-v-for-key.js b/tests/lib/rules/require-v-for-key.js
index d866137a0..4b521593a 100644
--- a/tests/lib/rules/require-v-for-key.js
+++ b/tests/lib/rules/require-v-for-key.js
@@ -29,27 +29,33 @@ tester.run('require-v-for-key', rule, {
},
{
filename: 'test.vue',
- code: '
non Vue-components."]
+ errors: [
+ "'.sync' modifiers aren't supported on
non Vue-components."
+ ]
},
{
filename: 'test.vue',
code: '',
- errors: ["'.sync' modifiers require the attribute value which is valid as LHS."]
+ errors: [
+ "'.sync' modifiers require the attribute value which is valid as LHS."
+ ]
},
{
filename: 'test.vue',
code: '',
- errors: ["'.sync' modifiers require the attribute value which is valid as LHS."]
+ errors: [
+ "'.sync' modifiers require the attribute value which is valid as LHS."
+ ]
}
]
})
diff --git a/tests/lib/rules/valid-v-else-if.js b/tests/lib/rules/valid-v-else-if.js
index b0c18093f..778d07339 100644
--- a/tests/lib/rules/valid-v-else-if.js
+++ b/tests/lib/rules/valid-v-else-if.js
@@ -29,11 +29,13 @@ tester.run('valid-v-else-if', rule, {
},
{
filename: 'test.vue',
- code: '
'
+ code:
+ '
'
},
{
filename: 'test.vue',
- code: '
'
+ code:
+ '
'
},
{
filename: 'test.vue',
@@ -43,57 +45,82 @@ tester.run('valid-v-else-if', rule, {
invalid: [
{
filename: 'test.vue',
- code: '',
- errors: ["'v-else-if' directives require being preceded by the element which has a 'v-if' or 'v-else-if' directive."]
+ code:
+ '',
+ errors: [
+ "'v-else-if' directives require being preceded by the element which has a 'v-if' or 'v-else-if' directive."
+ ]
},
{
filename: 'test.vue',
code: '',
- errors: ["'v-else-if' directives require being preceded by the element which has a 'v-if' or 'v-else-if' directive."]
+ errors: [
+ "'v-else-if' directives require being preceded by the element which has a 'v-if' or 'v-else-if' directive."
+ ]
},
{
filename: 'test.vue',
code: '
',
- errors: ["'v-else-if' directives require being preceded by the element which has a 'v-if' or 'v-else-if' directive."]
+ errors: [
+ "'v-else-if' directives require being preceded by the element which has a 'v-if' or 'v-else-if' directive."
+ ]
},
{
filename: 'test.vue',
- code: '
',
- errors: ["'v-else-if' directives require being preceded by the element which has a 'v-if' or 'v-else-if' directive."]
+ code:
+ '
',
+ errors: [
+ "'v-else-if' directives require being preceded by the element which has a 'v-if' or 'v-else-if' directive."
+ ]
},
{
filename: 'test.vue',
- code: '
',
- errors: ["'v-else-if' directives require being preceded by the element which has a 'v-if' or 'v-else-if' directive."]
+ code:
+ '
',
+ errors: [
+ "'v-else-if' directives require being preceded by the element which has a 'v-if' or 'v-else-if' directive."
+ ]
},
{
filename: 'test.vue',
- code: '
',
- errors: ["'v-else-if' directives require being preceded by the element which has a 'v-if' or 'v-else-if' directive."]
+ code:
+ '
',
+ errors: [
+ "'v-else-if' directives require being preceded by the element which has a 'v-if' or 'v-else-if' directive."
+ ]
},
{
filename: 'test.vue',
- code: '
',
- errors: ["'v-else-if' and 'v-if' directives can't exist on the same element."]
+ code:
+ '
',
+ errors: [
+ "'v-else-if' and 'v-if' directives can't exist on the same element."
+ ]
},
{
filename: 'test.vue',
- code: '
',
- errors: ["'v-else-if' and 'v-else' directives can't exist on the same element."]
+ code:
+ '
',
+ errors: [
+ "'v-else-if' and 'v-else' directives can't exist on the same element."
+ ]
},
{
filename: 'test.vue',
- code: '
'
},
{
filename: 'test.vue',
@@ -44,56 +46,79 @@ tester.run('valid-v-else', rule, {
{
filename: 'test.vue',
code: '',
- errors: ["'v-else' directives require being preceded by the element which has a 'v-if' or 'v-else-if' directive."]
+ errors: [
+ "'v-else' directives require being preceded by the element which has a 'v-if' or 'v-else-if' directive."
+ ]
},
{
filename: 'test.vue',
code: '',
- errors: ["'v-else' directives require being preceded by the element which has a 'v-if' or 'v-else-if' directive."]
+ errors: [
+ "'v-else' directives require being preceded by the element which has a 'v-if' or 'v-else-if' directive."
+ ]
},
{
filename: 'test.vue',
code: '
',
- errors: ["'v-else' directives require being preceded by the element which has a 'v-if' or 'v-else-if' directive."]
+ errors: [
+ "'v-else' directives require being preceded by the element which has a 'v-if' or 'v-else-if' directive."
+ ]
},
{
filename: 'test.vue',
code: '
',
- errors: ["'v-else' directives require being preceded by the element which has a 'v-if' or 'v-else-if' directive."]
+ errors: [
+ "'v-else' directives require being preceded by the element which has a 'v-if' or 'v-else-if' directive."
+ ]
},
{
filename: 'test.vue',
- code: '
',
- errors: ["'v-else' directives require being preceded by the element which has a 'v-if' or 'v-else-if' directive."]
+ code:
+ '
',
+ errors: [
+ "'v-else' directives require being preceded by the element which has a 'v-if' or 'v-else-if' directive."
+ ]
},
{
filename: 'test.vue',
- code: '
',
- errors: ["'v-else' directives require being preceded by the element which has a 'v-if' or 'v-else-if' directive."]
+ code:
+ '
',
+ errors: [
+ "'v-else' directives require being preceded by the element which has a 'v-if' or 'v-else-if' directive."
+ ]
},
{
filename: 'test.vue',
- code: '
',
- errors: ["'v-else' and 'v-if' directives can't exist on the same element. You may want 'v-else-if' directives."]
+ code:
+ '
',
+ errors: [
+ "'v-else' and 'v-if' directives can't exist on the same element. You may want 'v-else-if' directives."
+ ]
},
{
filename: 'test.vue',
- code: '
',
- errors: ["'v-else' and 'v-else-if' directives can't exist on the same element."]
+ code:
+ '
',
+ errors: [
+ "'v-else' and 'v-else-if' directives can't exist on the same element."
+ ]
},
{
filename: 'test.vue',
- code: '
',
errors: ["Custom elements in iteration require 'v-bind:key' directives."]
},
{
filename: 'test.vue',
- code: '
',
+ code:
+ '
',
errors: ["Custom elements in iteration require 'v-bind:key' directives."]
},
{
filename: 'test.vue',
- code: '
',
+ code:
+ '
',
errors: ["Custom elements in iteration require 'v-bind:key' directives."]
},
{
filename: 'test.vue',
- code: '
',
+ code:
+ '
',
errors: ["Custom elements in iteration require 'v-bind:key' directives."]
},
{
filename: 'test.vue',
- code: '
',
- errors: ["Expected 'v-bind:key' directive to use the variables which are defined by the 'v-for' directive."]
+ code:
+ '
',
+ errors: [
+ "Expected 'v-bind:key' directive to use the variables which are defined by the 'v-for' directive."
+ ]
},
{
filename: 'test.vue',
- code: '
',
- errors: ["Expected 'v-bind:key' directive to use the variables which are defined by the 'v-for' directive."]
+ code:
+ '
',
+ errors: [
+ "Expected 'v-bind:key' directive to use the variables which are defined by the 'v-for' directive."
+ ]
},
{
filename: 'test.vue',
- code: '
',
- errors: ["Expected 'v-bind:key' directive to use the variables which are defined by the 'v-for' directive."]
+ code:
+ '
',
+ errors: [
+ "Expected 'v-bind:key' directive to use the variables which are defined by the 'v-for' directive."
+ ]
},
{
filename: 'test.vue',
- code: '
',
- errors: ["Expected 'v-bind:key' directive to use the variables which are defined by the 'v-for' directive."]
+ code:
+ '
',
+ errors: [
+ "Expected 'v-bind:key' directive to use the variables which are defined by the 'v-for' directive."
+ ]
},
{
filename: 'test.vue',
- code: '
',
- errors: ["Expected 'v-bind:key' directive to use the variables which are defined by the 'v-for' directive."]
+ code:
+ '
',
+ errors: [
+ "Expected 'v-bind:key' directive to use the variables which are defined by the 'v-for' directive."
+ ]
},
{
filename: 'test.vue',
- code: '
',
+ code:
+ '
',
errors: ["Custom elements in iteration require 'v-bind:key' directives."]
},
{
filename: 'test.vue',
- code: '
',
- errors: ["Expected 'v-bind:key' directive to use the variables which are defined by the 'v-for' directive."]
+ code:
+ '
',
+ errors: [
+ "Expected 'v-bind:key' directive to use the variables which are defined by the 'v-for' directive."
+ ]
},
{
filename: 'test.vue',
- errors: ["Expected 'v-bind:key' directive to use the variables which are defined by the 'v-for' directive."],
+ errors: [
+ "Expected 'v-bind:key' directive to use the variables which are defined by the 'v-for' directive."
+ ],
code: `
@@ -234,7 +278,9 @@ tester.run('valid-v-for', rule, {
},
{
filename: 'test.vue',
- errors: ["Expected 'v-bind:key' directive to use the variables which are defined by the 'v-for' directive."],
+ errors: [
+ "Expected 'v-bind:key' directive to use the variables which are defined by the 'v-for' directive."
+ ],
code: `
@@ -249,7 +295,9 @@ tester.run('valid-v-for', rule, {
},
{
filename: 'test.vue',
- errors: ["Expected 'v-bind:key' directive to use the variables which are defined by the 'v-for' directive."],
+ errors: [
+ "Expected 'v-bind:key' directive to use the variables which are defined by the 'v-for' directive."
+ ],
code: `
diff --git a/tests/lib/rules/valid-v-if.js b/tests/lib/rules/valid-v-if.js
index 9a0be6472..effe04836 100644
--- a/tests/lib/rules/valid-v-if.js
+++ b/tests/lib/rules/valid-v-if.js
@@ -36,12 +36,17 @@ tester.run('valid-v-if', rule, {
{
filename: 'test.vue',
code: '
',
- errors: ["'v-if' and 'v-else' directives can't exist on the same element. You may want 'v-else-if' directives."]
+ errors: [
+ "'v-if' and 'v-else' directives can't exist on the same element. You may want 'v-else-if' directives."
+ ]
},
{
filename: 'test.vue',
- code: '
',
- errors: ["'v-if' and 'v-else-if' directives can't exist on the same element."]
+ code:
+ '