vue/max-props
eslint-plugin-vue
No autofix
eslint.config.js
import vue from "eslint-plugin-vue";
export default [
{
plugins: { vue },
rules: {
"vue/max-props": "error",
},
},
];<template>
</template>
<script setup>
defineProps({
prop1: String,
prop2: String,
})
</script><script>
defineProps({
prop1: String
})
</script>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/max-props
eslint-plugin-vue
import vue from "eslint-plugin-vue";
export default [
{
plugins: { vue },
rules: {
"vue/max-props": "error",
},
},
];vue/max-props
vue plugin · restriction
{
"plugins": [
"vue"
],
"rules": {
"vue/max-props": "error"
}
}nursery/noVueExcessiveProps
nursery · since 2.6.5
{
"linter": {
"rules": {
"nursery": {
"noVueExcessiveProps": "error"
}
}
}
}Enforce consistent style for props destructuring
Disallow this usage in a beforeRouteEnter method
Enforce declaration style of defineProps and defineModel
Require components to be the default export
Enforce declaration style of defineEmits
Require ref and shallowRef functions to be strongly typed