Appearance
vue/require-prop-types
要求 props 中有类型定义
- ⚙️ 此规则包含在
"plugin:vue/strongly-recommended"
、*.configs["flat/strongly-recommended"]
、"plugin:vue/vue2-strongly-recommended"
、*.configs["flat/vue2-strongly-recommended"]
、"plugin:vue/recommended"
、*.configs["flat/recommended"]
、"plugin:vue/vue2-recommended"
和*.configs["flat/vue2-recommended"]
中。
📖 规则详情
此规则强制 props
语句包含类型定义。
¥This rule enforces that a props
statement contains type definition.
在提交的代码中,prop 定义应始终尽可能详细,至少指定类型。
¥In committed code, prop definitions should always be as detailed as possible, specifying at least type(s).
🔧选项
¥🔧 Options
无。
¥Nothing.
📚扩展阅读
¥📚 Further Reading
🚀版本
¥🚀 Version
此规则在 eslint-plugin-vue v3.9.0 中引入
¥This rule was introduced in eslint-plugin-vue v3.9.0
🔍代码实现
¥🔍 Implementation