Appearance
要求 props 有注释¥require props to have a comment
要求 props 有注释
¥require props to have a comment
此规则强制每个 prop 都有一个注释来记录它。
¥This rule enforces that every prop has a comment that documents it.
¥🔧 Options
{ "vue/require-prop-comment": ["error", { "type": "JSDoc" }] }
type ...注释类型。默认值为 "JSDoc"
type
"JSDoc"
¥type ... Type of comment. Default is "JSDoc"
"JSDoc" ...仅允许 JSDoc 注释。
¥"JSDoc" ... Only JSDoc comment are allowed.
"line" ...仅允许行注释。
"line"
¥"line" ... Only line comment are allowed.
"block" ...仅允许块注释。
"block"
¥"block" ... Only block comment are allowed.
"any" ...允许所有注释类型。
"any"
¥"any" ... All comment types are allowed.
"type": "block"
"type": "line"
"type": "any"
¥🚀 Version
此规则是在 eslint-plugin-vue 中引入的 v9.8.0
¥This rule was introduced in eslint-plugin-vue v9.8.0
¥🔍 Implementation
规则源
¥Rule source
测试源
¥Test source
vue/require-prop-comment
📖 规则详情
此规则强制每个 prop 都有一个注释来记录它。
¥This rule enforces that every prop has a comment that documents it.
🔧选项
¥🔧 Options
type
...注释类型。默认值为"JSDoc"
¥
type
... Type of comment. Default is"JSDoc"
"JSDoc"
...仅允许 JSDoc 注释。¥
"JSDoc"
... Only JSDoc comment are allowed."line"
...仅允许行注释。¥
"line"
... Only line comment are allowed."block"
...仅允许块注释。¥
"block"
... Only block comment are allowed."any"
...允许所有注释类型。¥
"any"
... All comment types are allowed."type": "block"
"type": "line"
"type": "any"
🚀版本
¥🚀 Version
此规则是在 eslint-plugin-vue 中引入的 v9.8.0
¥This rule was introduced in eslint-plugin-vue v9.8.0
🔍代码实现
¥🔍 Implementation
规则源
¥Rule source
测试源
¥Test source