Vscode_deno: Allow without semicolon

Created on 16 May 2020  路  7Comments  路  Source: denoland/vscode_deno

When I'm write
import { Application } from "https://deno.land/x/oak/mod.ts"

then save it, this will turn into a semicolon filled syntax:

import { Application } from "https://deno.land/x/oak/mod.ts";

I think some programmers don't like the existence of this semicolon, so it is better to have the semicolon following the style of the programmer, without changing the code to semicolon or non-semicolon.

Most helpful comment

I disabled all extensions except Deno extension, and I face the same problem, here's some proof...

With only Deno extension enabled:

deno_enabled

With all extensions disabled (with the same vscode settings though, i.e. js/ts features are disabled in both cases):

all_disabled

Please, re-open the issue 馃檹

All 7 comments

This is not the behavior of the extension, please check other extensions installed by your vscode

Hi there, thanks for developing a vscode extension for a promising emerging backend framework. Just to share with OP (not suggesting anything) that something similar is happening to me too:

  • When I paste a single function name into my typescript code there is automatically an extra semicolon.
  • This happens even if deno.enable: false in my project
  • I've never encountered this issue before, and when I remove/disable just this extension, the problem immediately disappears.
  • My Javascript > Format: Semicolons setting in VSCode is set to remove (semicolons)
  • My Typescript > Format: Semicolons setting in VSCode is set to remove (semicolons)
  • My JS-related extensions installed are eslint, Node.js modules intellisense, npm, npm intellisense, search node_modules, svelte (frontend framework), vetur (Vue) and Vue Peek.

Yes, I'm too, when only disabling this extension, my code format returned to normal. At the moment I'm still debugging other extensions and hope to find the problem.

@Seiyial I am also running into the same issue, whenever I paste something in a .ts file it will automatically add the semicolon at the end. It also only seems to happen whenever I have a saved .ts (edit: or .js) file open with TypeScript or JavaScript syntax highlighting. If I have an unsaved file open with TypeScript or JavaScript syntax highlighting, it will not occur.

The only extensions I have installed related to JS are Vetur and Vue 2 Snippets and after disabling both extensions the problem still persists until I disable this extension. @justjavac You were saying that this is not behaviour of the extension, so is there perhaps an option in tsconfig.json I need to set in order to turn this off?

I disabled all extensions except Deno extension, and I face the same problem, here's some proof...

With only Deno extension enabled:

deno_enabled

With all extensions disabled (with the same vscode settings though, i.e. js/ts features are disabled in both cases):

all_disabled

Please, re-open the issue 馃檹

Should be resolved in version 3.x of the extension.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

justdayan picture justdayan  路  7Comments

chenguzhen87 picture chenguzhen87  路  5Comments

Ragzouken picture Ragzouken  路  5Comments

Ciantic picture Ciantic  路  10Comments

shadowtime2000 picture shadowtime2000  路  3Comments