33

Which rule do I need to apply to enforce spaces between curly brackets in the import statements?

i.e

Instead of :

import {IPostService} from './api/IPostService';

I want:

import { IPostService } from './api/IPostService';
fgonzalez
  • 3,787
  • 7
  • 45
  • 79
  • 1
    Would suggest having a look at [Prettier](https://github.com/prettier/prettier) then you will not need any more rules for these kind of things :) – Adrian Fâciu Jul 15 '18 at 07:38
  • Add bracketSpacing to true in visual code .prettierrc or add --bracket-spacing if you are using prittier NPM package. – tarun jain Aug 12 '20 at 16:53

1 Answers1

59

I think this might be what you're looking for:

"whitespace": [true, "check-module"]

check-module - checks for whitespace in import & export statements.

Sivabalan
  • 2,908
  • 2
  • 24
  • 21
kshetline
  • 12,547
  • 4
  • 37
  • 73