Lonefy / vscode-JS-CSS-HTML-formatter

JS,CSS,HTML formatter for vscode
48 stars 23 forks source link

breaks Null coalescing operator #150

Open tabarnouche opened 10 months ago

tabarnouche commented 10 months ago

Type: Bug

Seems like auto-formatting on save is enabled even if it's set to disabled.

In my case, this extesion separated the question marks for Null coalescing operator when I save. The code is below.

function getCart() {
    return JSON.parse(localStorage.getItem(CART_NAME) ?? "{}");
}

Extension version: 0.2.3 VS Code version: Cursor 0.23.9 (ce992bfa18b453401d975fc515df64b5c19b3df0, 2024-01-24T02:04:49.263Z) OS version: Darwin arm64 23.3.0 Modes:

System Info |Item|Value| |---|---| |CPUs|Apple M1 Max (10 x 24)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: enabled_on
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
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled| |Load (avg)|9, 6, 5| |Memory (System)|32.00GB (0.97GB free)| |Process Argv|| |Screen Reader|no| |VM|0%|