How to add spaces in the JavaScript import in Clang-Format

266 Views Asked by At

Here is the code snippet in my TypeScript/JavaScript file:

import { Component,    OnInit } from    '@angular/core';

The Clang-Format will format my code into this:

import {Component, OnInit} from '@angular/core';

But I'd like to use Clang-Format format my code into this.

import { Component, OnInit } from '@angular/core';

I want to add one space between { and Component and add one space between OnInit and }, but I couldn't find any Clang-Format Style Options to set that. Is there anyway to configure this?

0

There are 0 best solutions below