You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem:
If I run prettier with the plugin on the file containing this import:
import {
type DELAYED_TASK_NAME, // This is badly interpreted by the plugin
DelayedTasksService,
PendingTask,
} from '../domain/delayed-tasks-service.interface';
It gets transformed into:
import {
DELAYED_TASK_NAME,
DelayedTasksService,
PendingTask,
type, // keyword `type` is handled like an imported member
} from '../domain/delayed-tasks-service.interface';
Which is breaking TS.
Context:
I'm using this plugin v0.0.7 with import-sort-style-module v6.0.0. Here's my config file
Workaround
I can fix it by manually changing the code above to:
import {
DelayedTasksService,
PendingTask,
} from '../domain/delayed-tasks-service.interface';
import type { DELAYED_TASK_NAME } from '../domain/delayed-tasks-service.interface';
But that's annoying. And using the original syntax can create errors if we do not notice prettier's changes
The text was updated successfully, but these errors were encountered:
This may be an issue with the upstream sort-import. It seems completely dead though, compared to issues being replied to in this repository. Is the project unmaintained?
I don't know if this project is maintained anymore; I found a workaround to the issue by disabling TypeScript > Preferences: Prefer Type Only Auto Imports in VS Code settings; it won't add type for auto-imports, but when Prettier formats the imports, it does add a type-only import on its own line.
Hi.
Problem:
If I run prettier with the plugin on the file containing this import:
It gets transformed into:
Which is breaking TS.
Context:
I'm using this plugin v0.0.7 with import-sort-style-module v6.0.0. Here's my config file
Workaround
I can fix it by manually changing the code above to:
But that's annoying. And using the original syntax can create errors if we do not notice prettier's changes
The text was updated successfully, but these errors were encountered: