TSLint is complaining that single-quotes should be double-quotes. Our team prefers to use single-quotes to wrap string literals.
I see that TSLint is configurable to set the mode to single-quote, but I cannot find a way to set these rules in Visual Studio 2015.
In Options, I found a couple of TSLint options under Text Editor > TypeScript > TSLint:
Obviously, these aren't the settings for which I'm looking...
Has anyone found a way to configure the TSLint rules in Visual Studio 2015, or is this something we just have to hope they add in the near future?
This solution: Setup TSLint in Visual Studio 2015
Seems to just be about adding TSLint to Visual Studio 2015 if it doesn't already exist. That's not what I'm looking for either.
Tools
> Web Code Analysis
> Edit TSLint Settings (tslint.json)
Add tslint.json to your project root and configure it with that. I had hard time to get this to work. Seems that there is a bug somewhere and tslint.json only works when it has Windows line endings. So make sure you have Windows line endings \r\n and not UNIX \n.
Update: First I thought it was line endings that was causing this problem. But it's actually tslint.json files encoding. If encoding is shown as UTF-8-BOM in Notepad++ the file refuses to work. If you change encoding to UTF-8 it starts to work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With