JoshuaKGoldberg / TSLint.MSBuild

[Deprecated] An MSBuild task for running TSLint.
https://www.nuget.org/packages/TSLint.MSBuild
MIT License
15 stars 13 forks source link

added switch between warnings and errors output type #60

Closed lsvhome closed 7 years ago

lsvhome commented 7 years ago

switching between warnings and errors with TreatWarningsAsErrors property variable of *.csproj

JoshuaKGoldberg commented 7 years ago

@lsvhome I don't follow why you're proposing this change. Could you please explain the reason?

lsvhome commented 7 years ago

When I use tslint for specific configurations I want to separate two workflows: 1) Debug mode when tslint warnings allowed 2) Release mode when tslint warnings should be fixed

In my case csproj contains standatd property TreatWarningsAsErrors

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <TreatWarningsAsErrors>false</TreatWarningsAsErrors> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <TreatWarningsAsErrors>true</TreatWarningsAsErrors> </PropertyGroup>

And I use TreatWarningsAsErrors to switch between TSLint warnings modes. Patch don't break base functionality but allows some customization. I mean that way is usefiul for people who use package.

best regards and thank you for your work

JoshuaKGoldberg commented 7 years ago

How do you see this interacting with https://github.com/palantir/tslint/pull/1738?

JoshuaKGoldberg commented 7 years ago

@Isvhome I actually really like your change! But, it needs a few things before merge:

If you can do the first two, I'll do the third. Otherwise I can try to get to all three.