diff --git a/lib/rules/component-api-style.js b/lib/rules/component-api-style.js
index 12ad52e2d..550eebfed 100644
--- a/lib/rules/component-api-style.js
+++ b/lib/rules/component-api-style.js
@@ -162,7 +162,7 @@ function buildAllowedPhrase(allowsOpt) {
phrases.push('Options API')
}
return phrases.length > 2
- ? `${phrases.slice(0, -1).join(',')} or ${phrases.slice(-1)[0]}`
+ ? `${phrases.slice(0, -1).join(', ')} or ${phrases.slice(-1)[0]}`
: phrases.join(' or ')
}
diff --git a/tests/lib/rules/component-api-style.js b/tests/lib/rules/component-api-style.js
index 534751254..a33321251 100644
--- a/tests/lib/rules/component-api-style.js
+++ b/tests/lib/rules/component-api-style.js
@@ -817,6 +817,31 @@ tester.run('component-api-style', rule, {
column: 9
}
]
+ },
+ {
+ filename: 'test.vue',
+ code: `
+
+ `,
+ options: [['script-setup', 'composition', 'composition-vue2']],
+ errors: [
+ {
+ message:
+ 'Options API is not allowed in your project. `data` option is part of the Options API. Use `