import-sort
import-sort copied to clipboard
Don't Change Destructured Import `__` to `_`
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'
Related: https://github.com/ifiokjr/prettier-plugin-sorted/issues/23
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 ?