microsoft / vscode-typescript-tslint-plugin

VS Code extension that provides TSLint support using the typescript-tslint-plugin
https://marketplace.visualstudio.com/items?itemName=ms-vscode.vscode-typescript-tslint-plugin
MIT License
188 stars 34 forks source link

Support alwaysShowRuleFailuresAsWarnings option #4

Closed cyrilletuzi closed 5 years ago

cyrilletuzi commented 5 years ago

Thanks for this extension.

Is it possible to have the same alwaysShowRuleFailuresAsWarnings option as in the classic TSLint extension?

I'm teaching programming courses, and lint errors shown as syntax errors is really disturbing for new developers.

cyrilletuzi commented 5 years ago

(I would even argue it should be the default, but this is subject to debate).

mjbvz commented 5 years ago

You can configure this in your jsconfig/tsconfig: https://github.com/Microsoft/typescript-tslint-plugin#configuration-options

Will open a new issue to track using vs code settings for these config options

MichalLytek commented 5 years ago

@mjbvz
I don't know why but this doesn't work for me:

image

"plugins": [
    {
      "name": "typescript-styled-plugin"
    },
    {
      "name": "typescript-tslint-plugin",
      "alwaysShowRuleFailuresAsWarnings": true,
      "ignoreDefinitionFiles": true,
      "configFile": "./tslint.json",
      "disableNoUnusedVariableRule": true,
      "suppressWhileTypeErrorsPresent": false,
      "mockTypeScriptVersion": false
    }
  ],
Davilink commented 5 years ago

Doesn't work for me too.

Why do we have a setting in vscode if that doesn't work ?

csvn commented 5 years ago

Are you using workspace version inside VSCode? When using built-in VSCode typescript version, the settings in tsconfig.json are not applied. There is a section about this on the README.md.

This extension works out of the box with VS Code's built-in version of TypeScript. You do not need to configure the plugin in your tsconfig.json if you are using VS Code's version of TypeScript.

If you are using a workspace version of typescript, you must currently configure the TS Server plugin manually by following these instructions

Davilink commented 5 years ago

I tried both.