Skip to content

vue/max-props ​

enforce maximum number of props in Vue component

📖 Rule Details ​

This rule enforces a maximum number of props in a Vue SFC, in order to aid in maintainability and reduce complexity.

🔧 Options ​

This rule takes an object, where you can specify the maximum number of props allowed in a Vue SFC. There is one property that can be specified for the object.

  • maxProps ... Specify the maximum number of props in the script block.

{ maxProps: 1 } ​

Now loading...

{ maxProps: 5 } ​

Now loading...

🚀 Version ​

This rule was introduced in eslint-plugin-vue v9.28.0

🔍 Implementation ​