Commercial Suicide Commercial Suicide - 1 month ago 9
TypeScript Question

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

I'm using Webstorm and trying to keep such codestyle:

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

Thanks in advance.

Answer Source

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