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". So my question can be summed up as: is there an analogous setting in JSHint?
You can check out their website for your indented purpose: https://palantir.github.io/tslint/rules/
Or you can also write your own rules: https://palantir.github.io/tslint/develop/custom-rules/
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.