[英]What is the ESLint rule to prevent newline after an object prop colon
I searched and search on both SO and Google. 我搜索了SO和Google。 But I cannot find the rule to enforce this: 但是我找不到执行此规则的规则:
const object = {
methods:
{
}
}
const object = {
methods: {
}
}
It seems to not be object-property-newline or object-curly-newline 它似乎不是对象属性换行或对象卷曲换行
it also doesn't seem to be brace-style . 它似乎也不是大括号风格的 。
There is no rule for that. 没有规则。 You may propose this rule in to the eslint project, but I expect it would not be accepted. 您可以在eslint项目中提出该规则,但是我希望它不会被接受。
In the meanwhile eslint-plugin-prettier
do cover this case, but it is not possible to opt-in only this case. 同时, eslint-plugin-prettier
确实涵盖了这种情况,但是不可能仅选择加入这种情况。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.