azz / prettier-tslint

Code ➡️ prettier ➡️ tslint --fix ➡️ Formatted Code ✨
https://npm.im/prettier-tslint
MIT License
225 stars 13 forks source link

[prettier-vscode] semicolon does not work #16

Closed sveyret closed 5 years ago

sveyret commented 6 years ago

When setting tslintIntegration to true, prettier does not take into account its semi rule anymore, neither it takes the semicolon rule from tslint, at least in interface definition.

For example, in my interface definition:

export interface ApiDefinition extends RoutesType {
  lang: {
    url: { langCode: string }
    data: undefined
    header: undefined
    return: void
  }
  securityToken: {
    url: undefined
    data: undefined
    header: undefined
    return: string
  }
}

code formatting adds semicolons at almost each line:

export interface ApiDefinition extends RoutesType {
  lang: {
    url: { langCode: string };
    data: undefined;
    header: undefined;
    return: void;
  }
  securityToken: {
    url: undefined;
    data: undefined;
    header: undefined;
    return: string;
  }
}

Here is my configuration:

VS config (extract):

    "prettier.tslintIntegration": true,

tslint.yaml (extract):

extends:
  - >-
    common/tslint

common/tslint.yaml (extract):

  semicolon:
    options:
      - never
aleclarson commented 5 years ago

You have no .prettierrc or similar file? Please provide a repository with a simple example of the issue.

aleclarson commented 5 years ago

Closing until a minimal repro is provided. You can fork this repository as a starting point.

sveyret commented 5 years ago

Hello @aleclarson, I have no .prettierrc or any similar file. I created a minimal repo from yours as your suggested. You can find it here, but I must say that there is nothing more than what is described in the first message.

sveyret commented 5 years ago

Not sure I can re-open the issue myself. If so, please explain me how. If not, I will let you do it… Thanks.

sveyret commented 5 years ago

Deleting my minimal repo as no answer to this issue.