Skip to content

Commit

Permalink
fix vuejs#1836: support script[setup] in multi-word-component-names
Browse files Browse the repository at this point in the history
  • Loading branch information
doug-wade committed Apr 12, 2022
1 parent b925fc6 commit 9ed3f92
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/rules/multi-word-component-names.js
Expand Up @@ -60,7 +60,7 @@ module.exports = {
ignores.add(casing.kebabCase(ignore))
}
}
let hasVue = false
let hasVue = utils.isScriptSetup(context)
let hasName = false

/**
Expand Down
6 changes: 3 additions & 3 deletions tests/lib/rules/multi-word-component-names.js
Expand Up @@ -204,7 +204,7 @@ tester.run('multi-word-component-names', rule, {
`
},
{
filename: 'test.vue',
filename: 'MultiWord.vue',
code: `
<template>
<AppButton />
Expand Down Expand Up @@ -329,8 +329,8 @@ tester.run('multi-word-component-names', rule, {
</script>`,
errors: [
{
message: 'Component name "Item" should always be multi-word.',
line: 3
message: 'Component name "test" should always be multi-word.',
line: 1
}
]
}
Expand Down

0 comments on commit 9ed3f92

Please sign in to comment.