我在为我的监视任务设置问题匹配器时遇到问题。正则表达式似乎是正确的,但即使它们显示在控制台中,它也不会在问题选项卡中显示任何错误。我错过了什么?
"problemMatcher": {
"owner": "typescript",
"fileLocation": "autoDetect",
"pattern": [
{
"regexp": "(ERROR|WARNING) in (.+)\\(",
"severity": 1,
"file": 2
},
{
"regexp": "^(\\d+):(\\d+) (.+)$",
"line": 1,
"column": 2,
"message": 3,
"loop": true
}
],
"background": {
"activeOnStart": false,
"beginsPattern": "Type checking in progress\\.\\.\\.",
"endsPattern": "Time: \\d+ms"
}
}
终端输出:
> Running compilation in watch mode
> Building component registry...
> Component registry built
> Starting type checking service...
> Type checking in progress...
> Type checking in progress...
× ERROR in C:/project/Shared/SizeGuide/index.tsx(180,8):
180:8 Cannot find name 'SizeGuideFlyout'. Did you mean 'SizeGuideInFlyout'?
178 | render() {
179 | return (
> 180 | <SizeGuideFlyout
| ^
181 | toggleFlyout={this.props.toggleSizeGuideFlyout}
182 | position={Position.Right}
183 | isOpen={this.props.isOpen}
> Version: typescript 3.7.2
> Time: 32ms