Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TSLint: Too many spaces before 'from' (import-spacing)

I'm using WebStorm and trying to keep such code style:

enter image description here

But when I do that, TSLint underlines my spaces and gives me the hint:

"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.

like image 386
Commercial Suicide Avatar asked Aug 22 '17 22:08

Commercial Suicide


1 Answers

In your tslint.json file, add this rule:

{
  "rules": {
    "import-spacing": false
  }
}

See also: https://palantir.github.io/tslint/rules/import-spacing/

enter image description here

like image 192
Shaun Luttin Avatar answered Nov 05 '22 02:11

Shaun Luttin