Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

tslint.json is not working in VS Code

So, I have my tsconfig.json and tslint.json at the root of my project. When I run tslint, it displays all of the errors in Terminal. But I do not get any hints/lines in VS Code. I'm driving myself crazy trying to figure out why it won't work. I deliberately went against a rule but nothing happens. I've tried force-quitting several times. I've tried other rules and going against them. (Note, I am not talking about the VSCode extension for TSLint.) I wrote a pretty basic one:

{
    "defaultSeverity": "error",
    "extends": [
        "tslint:recommended"
    ],
    "jsRules": {},
    "rules": {
        "quotemark": [
            true,
            "single",
            "avoid-escape"
        ],
        "semicolon": [
            true,
            "always"
        ]
    },
    "rulesDirectory": []
}
like image 783
Clayton Ray Avatar asked Aug 29 '17 23:08

Clayton Ray


1 Answers

If you have not installed tslint extension and do not run tslint via task manually - VSCode will not "check" its rules.

VSCode has no "embedded" support of the tslint. You must install the aforementioned extension in order to get intellisense support you are looking after.

like image 110
Amid Avatar answered Oct 03 '22 05:10

Amid