How can I use tslint to do a simple syntax check of my project ? At the moment, I don't want to enforce other style/code rules. My tslint.json is:
{
"defaultSeverity": "error",
"extends": [
"tslint:recommended"
],
"jsRules": {},
"rules": {},
"rulesDirectory": []
}
To run linting separately from other build steps, I typically add a lint
script to package.json
, like so:
"scripts": {
"lint": ".\\node_modules\\.bin\\tslint src\\**\\*.ts**"
}
Then yarn lint
or npm run lint
to run the linter.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.