Short answer
Does VSC support linting natively or do I just need to lean on gulp?
Yes. VS Code supports linting with the TSLint extension. There is no need for gulp.
Steps to integrate TSLint into VS Code
First, install prerequisites: TSLint and TypeScript.
npm install -g tslint typescript
Second, add a tslint.json
file to your project root. You can do this with tslint --init
, which gives you nice defaults. Alternatively, create the file and use this minimal config, which inherits recommended rules.
// tslint.json
{
"extends": "tslint:recommended",
"rules": {}
}
Third, install the TSLint extension for VS Code.
- Open VS Code in your project's root.
- Open the command palette CTRL + P
ext install tslint
.
- Choose Install, then choose Enable, finally restart VS Code.
Fourth, enjoy your integrated TS Lint.