Skip to content

Bad formatting in Typescript when 2 template parameters in a class def #19

Description

@ShoryuKyzan

Bad formatting in Typescript when 2 template parameters in a class def

Typescript
Clean install of insiders, have installed additionally only your extension.

For some reason having a class extending a template with 2 template parameters causes 2nd function in the file to be shifted up a line.

Version: 1.65.0-insider (user setup)
Commit: 8440b8f47231147823ba9696913d642e5f2d9d58
Date: 2022-02-25T05:17:33.544Z
Electron: 13.5.2
Chromium: 91.0.4472.164
Node.js: 14.16.0
V8: 9.1.269.39-electron.0
OS: Windows_NT x64 10.0.19042

Extension version
v0.2.2

Bad format, not indented or anything.

class AClass extends Extended < TemplateParam1,
TemplateParam2 > {}

export const someFunction = () => {
    console.log("somecode");
    console.log("somecode");
    console.log("somecode");
    console.log("somecode");
    console.log("somecode");
    console.log("somecode");
    console.log("somecode");
    console.log("somecode");
    console.log("somecode");
    console.log("somecode");
    console.log("somecode");
};function anotherFunction() {
console.log("somecode");
console.log("somecode");
console.log("somecode");
console.log("somecode");
console.log("somecode");
console.log("somecode");
console.log("somecode");
console.log("somecode");
console.log("somecode");}anotherFunction();

USER SETTINGS:

{
    "editor.formatOnSave": true,
    "[typescript]": {
        "editor.defaultFormatter": "mblode.pretty-formatter"
    },
}

DEFAULT SETTINGS - should be same as clean install, too long to put here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    formatterIssues rooted in the abandoned prettydiff formatting engine

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions