I added TSLint to my React/TypeScript project using the tslint VSCode extension. I also installed both typescript and tslint globally according to TSLint docs npm install -g tslint typescript
This is my tslint.json file:
{
"extends": ["tslint:latest", "tslint-react"],
"rules": {
// override tslint-react rules here
"jsx-wrap-multiline": false,
"max-line-length": false,
"no-implicit-dependencies": [true, "dev"],
"no-var-requires": false,
"indent": false
}
}
tslint-react
is a tslint extension which has to be installed separately: npm install -g tslint-react
. After installing, reload your VS Code window, and linting should work.
How I found the problem: I copied your config file into a project, went to View > Output to check for errors from the tslint process, and saw this. (be sure to select tslint from the dropdown near the top right)