我希望问题匹配器报告两种问题:
这不适用于我的某个项目,但正在其他项目中工作。以下是.vscode/tasks.json
:
"problemMatcher": [
"$tsc",
{
"owner": "tslint",
"fileLocation": "relative",
"severity": "error",
"pattern": {
"regexp": "^ERROR:\\s*(.*\\.ts)\\[(\\d+), (\\d+)\\]: (.*)$",
"file": 1,
"line": 2,
"column": 3,
"message": 4
}
}
]
答案 0 :(得分:0)
我认为这些问题没有被提起,因为它们的前缀是browserify
或tsify
。
以下配置解决了问题,并应报告常规tsc
编译,browserify / tsify编译和tslint的问题:
"problemMatcher": [
"$tsc",
{
"owner": "typescript",
"fileLocation": ["relative", "${workspaceRoot}"],
"pattern": {
"regexp": "^TypeScript (warning|error): (.*)\\((\\d+),(\\d+)\\): (.*)$",
"severity": 1,
"file": 2,
"line": 3,
"column": 4,
"message": 5
}
},
{
"owner": "tslint",
"fileLocation": "relative",
"severity": "error",
"pattern": {
"regexp": "^ERROR:\\s*(.*\\.ts)\\[(\\d+), (\\d+)\\]: (.*)$",
"file": 1,
"line": 2,
"column": 3,
"message": 4
}
}
]