MBu*_*eld 8 lint tslint visual-studio-code
我想test在vscode中用tslint 排除文件夹形式.所以我在我的tslint.json配置文件中放了一个exclude.不幸的是,exclude语句不起作用.有没有人知道如何设置排除?
{
"exclude": "tests/**/*.ts",
"rulesDirectory": ["node_modules/tslint-microsoft-contrib"],
"rules": {
"export-name": true,
...
}
}
Run Code Online (Sandbox Code Playgroud)
最新更新:现在可以在tslint.json中进行设置(以下配置适用于tslint 5.11)
{
"linterOptions": {
"exclude": [
"bin",
"build",
"config",
"coverage",
"node_modules"
]
}
}
Run Code Online (Sandbox Code Playgroud)
这似乎是一个开放的功能请求.更多信息可以在这里找到:https://github.com/palantir/tslint/issues/73
更新: 对于使用带有tslint的vscode作为editor/lintinig的用户,可以将以下内容添加到vscode配置中:
// Configure glob patterns of file paths to exclude from linting
"tslint.exclude": "**/PATH_eg_TESTS/**/*.ts"
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
13154 次 |
| 最近记录: |