• Skip to main content
  • Skip to primary sidebar

Ryan McCormick

Webstorm adding spaces between imports and braces | JavaScript and TypeScript

September 29, 2017 by Ryan 4 Comments

I have been working with Angular 4x and TypeScript in Webstorm a lot lately and have been guilty of the occasional sloppy import statement. If you found this article, you are probably doing the same thing. Because adding spaces between the import and braces is super tedious, I took some time to find a solution.

I can’t take all of the credit for this. Some awesome people posted the solution for JS imports on stackoverflow. At the very minimum, I am creating this post so I have something to reference later on as well.

Add Spaces Between Import and Braces in Webstorm Settings

  1. Open Settings: File > Default Settings
  2. Expand Editor Menu on Left
  3. Expand Code Style Menu under Editor Menu
  4. Click JavaScript or TypeScript if you are using TypeScript
  5. Click on the Spaces Tab in the right content area
  6. Scroll Down to Within Settings
  7. Select ES6 import/export braces
  8. Click Apply and Ok to close

Enjoy looking at clean, consistent imports!

Filed Under: Angular 2 Tagged With: angular 4, import statement spacing, javascript, typescript, webstorm

Reader Interactions

Comments

  1. Alex Kopen says

    November 2, 2017 at 1:57 pm

    GREAT blog post, Ryan 🙂 I sure was getting sick and tired of manually cleaning up my imports!

    Reply
  2. Danny Snell says

    November 2, 2017 at 2:00 pm

    Wow! This is a life saver. Thanks R-Dawg!

    Reply
  3. hello says

    September 12, 2019 at 12:03 pm

    Awesome post!

    Reply
  4. KKV says

    August 18, 2020 at 9:20 pm

    Thank you very much

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

Recent Posts

  • Force Quit Kill all Chrome Windows MacOS
  • SOLVED: Angular 6 CLI Karma Stuck in Single Run | Karma Stops Running
  • How to Manually Install Java 8 on Ubuntu 18.04 LTS
  • Remove VirtualBox from Ubuntu 16.04 Xenial
  • Clear all Node Modules Folders Recursively Mac/Linux

Recent Comments

  1. KKV on Webstorm adding spaces between imports and braces | JavaScript and TypeScript
  2. jusopi on Clear all Node Modules Folders Recursively Mac/Linux
  3. Qaisar Irfan on Clear all Node Modules Folders Recursively Mac/Linux
  4. mustafa on Remove VirtualBox from Ubuntu 16.04 Xenial
  5. Pourya on How to Manually Install Java 8 on Ubuntu 18.04 LTS

Copyright © 2025 · Magazine Pro on Genesis Framework · WordPress · Log in