[英]Is it possible to add a lint setting that warns me when there is no newline after a closing curly brace in SublimeLinter-jshint?
I would like to get warned by the linter when there is no new line after a closing curly brace (with some exceptions). 我想在短括号结束后没有新行的情况下,由短绒棉布警告(某些例外)。 For instance, I want to avoid doing this:
例如,我想避免这样做:
if (something()) {
// ...
}
var x = ...;
in favor of: 有利于:
if (something()) {
// ...
}
var x = ...;
and would like to be prompted by the linter in the former case. 并希望在前一种情况下由棉短绒提示。
Is there a default setting that I can change? 有可以更改的默认设置吗? If not and I wanted to create my own, how would I go about doing that?
如果没有,我想创建自己的,我该怎么做?
EDIT: After a bit more digging, it appears that this is a feature of ESLint, under the setting "padding-line-between-statements". 编辑:经过更多的挖掘,看来这是ESLint的功能,在“ padding-line-between-statements”设置下。 So my question can be summed up as: is there an analogous setting in JSHint?
所以我的问题可以总结为:JSHint中是否有类似的设置?
You can check out their website for your indented purpose: https://palantir.github.io/tslint/rules/ 您可以出于缩进目的查看他们的网站: https : //palantir.github.io/tslint/rules/
Or you can also write your own rules: https://palantir.github.io/tslint/develop/custom-rules/ 或者,您也可以编写自己的规则: https : //palantir.github.io/tslint/develop/custom-rules/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.