Setup TSLint in Visual Studio 2015

前端 未结 3 1341
被撕碎了的回忆
被撕碎了的回忆 2021-01-08 00:53

I develop with Typescript in Visual Studio 2013 and always have my error list open on the bottom. TSLint tells me when my code is messy/incorrect as i\'m writing it. I don\'

3条回答
  •  广开言路
    2021-01-08 01:12

    It looks like there is a nuget package that can help you here. If you right click on the project and select "Manage NuGet Packages" and search for tslint, you'll find a package called "NCapsulateExtensions.TsLint" which should work for you.

    I was not personally able to verify this, though, because the package requires System.Web.Helpers.dll and I don't have this on my machine (nor could I find it anywhere). So, I looked into the git repo and discovered that the nuget package isn't actually using this dll and submitted a pull request to have it removed. In the meantime, my fork can be found here:

    https://github.com/mbraude/NCapsulateExtensions.TsLint

    Hopefully you or somebody else knows where System.Web.Helpers is so that you can install this and give it a try, or the author takes the pull request and publishes a new version.

    If this doesn't end up working you would need to do something similar in your project - call tslint from a custom msbuild task. You could also clone this solution and set it up manually without nuget - it would just be a lot more work.

提交回复
热议问题