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

Organize Imports adds a backslash to each import in TypeScript code #152304

Closed
nharrer opened this issue Jun 16, 2022 · 4 comments
Closed

Organize Imports adds a backslash to each import in TypeScript code #152304

nharrer opened this issue Jun 16, 2022 · 4 comments
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s)

Comments

@nharrer
Copy link

nharrer commented Jun 16, 2022

Issue Type: Bug

After organizing imports (Alt-Shift-O), a backslash is added to each import line, which makes the code uncompilable.

Example before "Organizing Imports":

import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';

const routes: Routes = [];

@NgModule({
    imports: [RouterModule.forRoot(routes)],
    exports: [RouterModule]
})
export class AppRoutingModule { }

Example after "Organizing Imports":

import { NgModule \} from '@angular/core';
import { RouterModule, Routes \} from '@angular/router';

const routes: Routes = [];

@NgModule({
    imports: [RouterModule.forRoot(routes)],
    exports: [RouterModule]
})
export class AppRoutingModule { }

Happens in Insiders version. Works ok in regular vscode. All Extensions were disabled.

VS Code version: Code - Insiders 1.69.0-insider (6f7c824, 2022-06-16T05:16:21.134Z)
OS version: Windows_NT x64 10.0.19044
Restricted Mode: No

System Info
Item Value
CPUs AMD Ryzen 5 3600 6-Core Processor (12 x 3600)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 31.95GB (16.51GB free)
Process Argv --crash-reporter-id b3a56b8e-5693-4e61-b507-6d7dc3a03578
Screen Reader no
VM 44%
Extensions: none
@IllusionMH
Copy link
Contributor

Wondering if this one is related to #152272

@mjbvz mjbvz added the *duplicate Issue identified as a duplicate of another issue(s) label Jun 16, 2022
@vscodenpa
Copy link

Thanks for creating this issue! We figured it's covering the same as another one we already have. Thus, we closed this one as a duplicate. You can search for similar existing issues. See also our issue reporting guidelines.

Happy Coding!

@nharrer
Copy link
Author

nharrer commented Jun 16, 2022

Which one is the open issue now? Because #152305 was closed as well.

@IllusionMH
Copy link
Contributor

#152305 is clear duplicate of this one. This one in turn has same root cause as #152272

@github-actions github-actions bot locked and limited conversation to collaborators Jul 31, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s)
Projects
None yet
Development

No branches or pull requests

4 participants