如何使用tslint对我的项目进行简单的语法检查?目前,我不想强制执行其他样式/代码规则。我的tslint.json是:
{
"defaultSeverity": "error",
"extends": [
"tslint:recommended"
],
"jsRules": {},
"rules": {},
"rulesDirectory": []
}发布于 2017-11-05 05:32:17
要将linting与其他构建步骤分开运行,我通常会向package.json添加一个lint脚本,如下所示:
"scripts": {
"lint": ".\\node_modules\\.bin\\tslint src\\**\\*.ts**"
}然后使用yarn lint或npm run lint来运行林特。
https://stackoverflow.com/questions/44734616
复制相似问题