microsoft / typescript-tslint-plugin

TypeScript TSLint language service plugin
MIT License
282 stars 45 forks source link

Visual Studio reports `defaultSeverity` as warning #55

Closed itanex closed 5 years ago

itanex commented 5 years ago

Bug Report

I am setting up TSLint support for Visual Studio 2017. I have included this plug-in in my tsconfig.json file and, while it takes a moment to run its analysis, I do get results in the Error Window. However, I set the defaultSeverity to error with the expectation that the TSLint results would show up as Errors in the Error Window. When I run TSLint through the CLI, the results are reported at Errors as I would expect. So I believe this is working.

Is this the right expectation for Visual Studio? Perhaps I am missing something in the setup for Visual Studio?

tslint.json` configuration:

{
  "defaultSeverity": "error",
  "extends": "tslint:recommended",
  "jsRules": {},
  "rules": {  },
  "rulesDirectory": []
}

Actual behavior

TSLint errors are displayed as Warnings in the Error Window

Expected behavior

TSLint errors are displayed as Errors in the Error Window

mjbvz commented 5 years ago

Try configuring "alwaysShowRuleFailuresAsWarnings": false in your tsconfig.json

itanex commented 5 years ago

Thanks, I missed that part of the readme since I was looking for VS specific support immediately. Might consider a brevity line to make it more obvious for skimmers. Just a thought.

{
  "compilerOptions": {
    "plugins": [
      {
        "name": "typescript-tslint-plugin"
        // see [Configuration Options](configuration-options) for more
      }
    ]
  }
}

Again, just a thought.