Skip to content

vue/require-name-property ​

require a name property in Vue components

  • 💡 Some problems reported by this rule are manually fixable by editor suggestions.

📖 Rule Details ​

This rule requires a name property to be set on components.

Now loading...
Now loading...
Now loading...

🔧 Options ​

json
{
  "vue/require-name-property": ["error", {
    "checkScriptSetup": false
  }]
}
  • checkScriptSetup (boolean) ... If true, also require a name in components using <script setup>, set with defineOptions() or in a normal <script> block. Default is false, since <script setup> components infer their name from the filename.

{ "checkScriptSetup": true } ​

Now loading...
Now loading...

🚀 Version ​

This rule was introduced in eslint-plugin-vue v6.1.0

🔍 Implementation ​