Skip to content

Instantly share code, notes, and snippets.

@Ciantic
Last active October 4, 2016 15:20
Show Gist options
  • Save Ciantic/d8ebf7a5b9094046ca3eb13ffeeb5403 to your computer and use it in GitHub Desktop.
Save Ciantic/d8ebf7a5b9094046ca3eb13ffeeb5403 to your computer and use it in GitHub Desktop.
Visual Studio Code problem matcher for TSLint and Karma webpack tests on Typescript files with sourcemaps.
{
"version": "0.1.0",
"command": "npm",
"isShellCommand": true,
"args": ["run"],
"tasks": [
{
"taskName": "start",
"args": [],
"isBuildCommand": true,
"showOutput": "always",
"isWatching": true,
"problemMatcher": [
{
"fileLocation": [
"relative",
"${workspaceRoot}/"
],
"pattern": [
{
"regexp": "^ERROR in (.+)$",
"file": 1
},
{
"regexp": "^((\\(|\\[)(\\d+),\\s?(\\d+)(\\)|\\])): (error|warning)?(\\sTS.+:)?(.+)$",
"line": 3,
"column": 4,
"severity": 6,
"message": 8,
"loop": true
}
],
"watching": {
"beginsPattern": "Time: \\d+ms",
"endsPattern": "webpack: bundle is now VALID."
}
}
]
},
{
"taskName": "test-debug",
"args": [],
"isTestCommand": true,
"showOutput": "always",
"isWatching": true,
"problemMatcher": [
{
"fileLocation": [
"relative",
"${workspaceRoot}/"
],
"pattern": [
{
"regexp": "^ERROR in (.+)$",
"file": 1
},
{
"regexp": "^((\\(|\\[)(\\d+),\\s?(\\d+)(\\)|\\])): (error|warning)?(\\sTS.+:)?(.+)$",
"line": 3,
"column": 4,
"severity": 6,
"message": 8,
"loop": true
}
],
"watching": {
"beginsPattern": "Time: \\d+ms",
"endsPattern": "webpack: bundle is now VALID."
}
},
{
"fileLocation": ["relative", "${workspaceRoot}"],
"pattern": [
{
"regexp": "(Expected.+\\.)$",
"message": 1
},
{
"regexp": "\\s+.+\\s<-\\s+webpack:///(.*\\.tsx?):(\\d+):(\\d+)$",
"file": 1,
"line": 2,
"column": 3
}
],
"watching": {
"beginsPattern": "Time: \\d+ms",
"endsPattern": "webpack: bundle is now VALID."
}
}
]
}
]
}
@cgatian
Copy link

cgatian commented Oct 4, 2016

Wow thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment