vue/require-prop-comment
eslint-plugin-vue
No autofix
eslint.config.js
import vue from "eslint-plugin-vue";
export default [
{
plugins: { vue },
rules: {
"vue/require-prop-comment": "error",
},
},
]; // line comment
b: Number,
/* block comment */
c: Number,
d: Number,
}
})
</script>const badProps = defineProps({
/** JSDoc comment */
b: Number,
// line comment
c: Number,
d: Number,
})
</script>const badProps = defineProps({
/** JSDoc comment */
b: Number,
/* block comment */
c: Number,
d: Number,
})
</script>/** JSDoc comment */
a: Number,const goodProps = defineProps({
/* block comment */
a: Number,
})const goodProps = defineProps({
// line comment
a: Number,
})Examples from the ESLint documentation.
No tracked preset enables this rule, so it has no reach yet.
None of the tracked presets enable this rule. Turn it on with the config below.
vue/require-prop-comment
eslint-plugin-vue
import vue from "eslint-plugin-vue";
export default [
{
plugins: { vue },
rules: {
"vue/require-prop-comment": "error",
},
},
];Oxlint does not have this rule.
Biome does not have this rule.
Require or disallow padding lines in component definition
Enforce sort-keys in a manner that is compatible with order-in-components