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

Don't Change Destructured Import __ to _ #146

Open
rjhilgefort opened this issue Aug 12, 2021 · 2 comments
Open

Don't Change Destructured Import __ to _ #146

rjhilgefort opened this issue Aug 12, 2021 · 2 comments

Comments

@rjhilgefort
Copy link

I'm using ts-pattern and it has an export of __. This formatter changes that import and breaks my code. Any thoughts as to why and if there's a work around.

import { __, match } from 'ts-pattern'

Changes to

import { _, match } from 'ts-pattern'
@rjhilgefort
Copy link
Author

Related: ifiokjr/prettier-plugin-sorted#23

@thibautsabot
Copy link

thibautsabot commented Sep 7, 2021

It looks likes @renke added it on purpose because of a bug (see here : https://github.com/renke/import-sort/blob/master/packages/import-sort-parser-typescript/src/index.ts#L182).

When removing the function, it's working as expected.
Maybe the bug isn't there anymore and the fix is the one actually causing the issue ?

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