diff --git a/lib/rules/require-name-property.js b/lib/rules/require-name-property.js index 6bb57b244..d4052f153 100644 --- a/lib/rules/require-name-property.js +++ b/lib/rules/require-name-property.js @@ -32,6 +32,9 @@ module.exports = { }, /** @param {RuleContext} context */ create(context) { + if (utils.isScriptSetup(context)) { + return {} + } return utils.executeOnVue(context, (component, type) => { if (type === 'definition') { const defType = getVueComponentDefinitionType(component) diff --git a/tests/lib/rules/require-name-property.js b/tests/lib/rules/require-name-property.js index eae44a9ca..8f7200d63 100644 --- a/tests/lib/rules/require-name-property.js +++ b/tests/lib/rules/require-name-property.js @@ -51,6 +51,19 @@ ruleTester.run('require-name-property', rule, { }) `, parserOptions + }, + { + filename: 'test.vue', + code: ` + + + `, + parser: require.resolve('vue-eslint-parser'), + parserOptions } ],