vue/comment-directive
eslint-plugin-vue
No autofixRecommended
eslint.config.js
import vue from "eslint-plugin-vue";
export default [
{
plugins: { vue },
rules: {
"vue/comment-directive": "error",
},
},
]; <!-- eslint-disable-next-line vue/max-attributes-per-line -->
<div a="1" />
</template><!-- eslint-disable-next-line vue/max-attributes-per-line -->
<div a="1" b="2" c="3" d="4" />Examples from the ESLint documentation.
vue/comment-directive
eslint-plugin-vue
import vue from "eslint-plugin-vue";
export default [
{
plugins: { vue },
rules: {
"vue/comment-directive": "error",
},
},
];Oxlint does not have this rule.
Biome does not have this rule.
Disallow unused variable definitions of v-for directives or scope attributes
Disallow the use of reserved names in component definitions
Enforce component's data property to be a function
Disallow registering components that are not used inside templates