[英]error Expected 1 line break before closing bracket, but no line breaks\ found vue/html-closing-bracket-newline
My current .eslintrc.js file has these options set for the eslint-plugin-vue plugin:我当前的.eslintrc.js文件为eslint-plugin-vue插件设置了以下选项:
"vue/html-closing-bracket-newline": ["error", {
"singleline": "never",
"multiline": "always"
}]
The problem this accepts only this syntax:这个问题只接受这个语法:
<v-flex
xs12
>
<Test />
</v-flex>
How can I ask it to let me write this way instead:我怎么能要求它让我这样写:
<v-flex
xs12>
<Test />
</v-flex>
If I write the last syntax, ESLint complains:如果我写最后一个语法,ESLint 会抱怨:
error Expected 1 line break before closing bracket, but no line breaks\
found vue/html-closing-bracket-newline
As per documentation根据文档
"multiline": "never"
... should fix your issue. ...应该可以解决您的问题。 Unfortunately, there's no way the rule can be implemented to accept both.
不幸的是,无法实施该规则来同时接受两者。 It's either
never
or always
.它不是
never
或always
。
Your pick.你的选择。 But Vue strongly suggests
always
.但是 Vue强烈建议
always
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.