[英]TSLint: Too many spaces before 'from' (import-spacing)
I'm using WebStorm and trying to keep such code style: 我正在使用WebStorm并试图保持这样的代码风格:
But when I do that, TSLint underlines my spaces and gives me the hint: 但是当我这样做时,TSLint强调了我的空间并给了我提示:
"Too many spaces before 'from' (import-spacing)". “来自''(进口间距)'之前的空间太多”。
My question is: Is there a way to keep this code style without underlying? 我的问题是:有没有办法保持这种代码风格没有底层? I also googled the problem, but with no success. 我也搜索了问题,但没有成功。
And I don't want to disable TSLint totally, just this rule for spaces. 而且我不想完全禁用TSLint,只是这个空格规则。
In your tslint.json file, add this rule: 在tslint.json文件中,添加以下规则:
{
"rules": {
"import-spacing": false
}
}
See also: https://palantir.github.io/tslint/rules/import-spacing/ 另见: https : //palantir.github.io/tslint/rules/import-spacing/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.