Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Global-to-relative spacing #11

Closed
vitor-belim opened this issue Aug 14, 2020 · 1 comment
Closed

Global-to-relative spacing #11

vitor-belim opened this issue Aug 14, 2020 · 1 comment

Comments

@vitor-belim
Copy link

Is there any way, configuration-wise, that one could leave an empty line between global imports and relative ones?

Instead of this:

import { Observable, Subscription } from 'rxjs'
import { skipWhile, take } from 'rxjs/operators'
import { Test } from '../../test.model'
import * as TestStore from '../../test.action'

It would organize like this:

import { Observable, Subscription } from 'rxjs'
import { skipWhile, take } from 'rxjs/operators'

import { Test } from '../../test.model'
import * as TestStore from '../../test.action'

Great plugin nonetheless, keep up the good work!

@simonhaenisch
Copy link
Owner

No, that's not possible because the organizeImports feature of the TypeScript API doesn't support this. In fact, it doesn't have any options yet. If it adds some, then I'll expose those so they can be configured for this plugin.

I'm not planning to add any manual processing past what TypeScript's organizeImports does.

IMHO: no one really reads the import statements anyway, so don't worry about formatting/whitespace there 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants