Skip to content

Commit 7edbf0a

Browse files
committed
Extension Development Improvements
1. Updated tasks.json to 2.0 2. Added tslint problem matcher - Weird issue that problem does not disappear when resolved. 3. Adding tslint for class and function names. - class must be in PascalCase - funcitons must be in camelCase 4. Addressing vulnerability warning - microsoft/vscode#49146
1 parent 8deee74 commit 7edbf0a

11 files changed

+326
-502
lines changed

Extension/.vscode/launch.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"outFiles": [
1616
"${workspaceFolder}/out/**/*.js"
1717
],
18-
"preLaunchTask": "npm"
18+
"preLaunchTask": "compile",
1919
},
2020
{
2121
"name": "Launch Tests",
@@ -31,7 +31,7 @@
3131
"outFiles": [
3232
"${workspaceFolder}/out/test/**/*.js"
3333
],
34-
"preLaunchTask": "npm"
34+
"preLaunchTask": "compile"
3535
},
3636
{
3737
"name": "Node Attach",

Extension/.vscode/tasks.json

+58-28
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,60 @@
1-
// Available variables which can be used inside of strings.
2-
// ${workspaceRoot}: the root folder of the team
3-
// ${file}: the current opened file
4-
// ${fileBasename}: the current opened file's basename
5-
// ${fileDirname}: the current opened file's dirname
6-
// ${fileExtname}: the current opened file's extension
7-
// ${cwd}: the current working directory of the spawned process
8-
9-
// A task runner that calls a custom npm script that compiles the extension.
101
{
11-
"version": "0.1.0",
12-
13-
// we want to run npm
14-
"command": "npm",
15-
16-
// the command is a shell script
17-
"isShellCommand": true,
18-
19-
// show the output window only if unrecognized errors occur.
20-
"showOutput": "silent",
21-
22-
// we run the custom script "compile" as defined in package.json
23-
"args": ["run", "compile", "--loglevel", "silent"],
24-
25-
// The tsc compiler is started in watching mode
26-
"isWatching": true,
27-
28-
// use the standard tsc in watch mode problem matcher to find compile problems in the output.
29-
"problemMatcher": "$tsc-watch"
2+
// See https://go.microsoft.com/fwlink/?LinkId=733558
3+
// for the documentation about the tasks.json format
4+
"version": "2.0.0",
5+
"tasks": [
6+
{
7+
"label": "TypeScript Compile",
8+
"identifier": "compile",
9+
"group": {
10+
"kind": "build",
11+
"isDefault": true
12+
},
13+
"isBackground": true,
14+
"type": "shell",
15+
"presentation": {
16+
"echo": true,
17+
"reveal": "silent",
18+
"focus": false,
19+
"panel": "shared"
20+
},
21+
"command": "npm",
22+
"args": [
23+
"run",
24+
"compile",
25+
"--loglevel",
26+
"silent"
27+
],
28+
"problemMatcher": "$tsc-watch"
29+
},
30+
{
31+
"label": "TypeScript Lint",
32+
"identifier": "tslint",
33+
"group": "build",
34+
"isBackground": false,
35+
"type": "shell",
36+
"command": "npm",
37+
"args": [
38+
"run",
39+
"tslint"
40+
],
41+
"problemMatcher": {
42+
"fileLocation": "absolute",
43+
"source": "tslint",
44+
"pattern": [
45+
{
46+
"regexp": "(ERROR:) ([a-zA-Z/:\\-\\.]*)\\[(\\d+), (\\d+)\\]: (.*)",
47+
"severity": 1,
48+
"file": 2,
49+
"line": 3,
50+
"column": 4,
51+
"message": 5
52+
}
53+
]
54+
},
55+
"dependsOn": [
56+
"compile"
57+
]
58+
}
59+
]
3060
}

Extension/gulpfile.js

+1
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ gulp.task('integrationTests', () => {
5252
/// Misc Tasks
5353
const allTypeScript = [
5454
'src/**/*.ts',
55+
'tools/**/*.ts',
5556
'!**/*.d.ts',
5657
'!**/typings**'
5758
];

0 commit comments

Comments
 (0)