Skip to content

Commit acf7aee

Browse files
authored
Add template .vscode/* settings, ignore real ones (#33758)
* Add LKG as typescript.tsdk * Add template settings, ignore real ones * Add note to CONTRIBUTING.md
1 parent 903a6c9 commit acf7aee

File tree

5 files changed

+63
-14
lines changed

5 files changed

+63
-14
lines changed

.gitignore

+3-2
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,10 @@ internal/
6161
**/.DS_Store
6262
.settings
6363
**/.vs
64-
**/.vscode
64+
**/.vscode/*
6565
!**/.vscode/tasks.json
66-
!**/.vscode/settings.json
66+
!**/.vscode/settings.template.json
67+
!**/.vscode/launch.template.json
6768
!**/.vscode/extensions.json
6869
!tests/cases/projects/projectOption/**/node_modules
6970
!tests/cases/projects/NodeModulesSearch/**/*

.vscode/launch.template.json

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
// Rename this file 'launch.json' or merge its
2+
// contents into your existing configurations.
3+
{
4+
// Use IntelliSense to learn about possible attributes.
5+
// Hover to view descriptions of existing attributes.
6+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
7+
"version": "0.2.0",
8+
"configurations": [
9+
{
10+
"type": "node",
11+
"protocol": "inspector",
12+
"request": "launch",
13+
"name": "Mocha Tests (currently opened test)",
14+
"runtimeArgs": ["--nolazy"],
15+
"program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
16+
"args": [
17+
"-u",
18+
"bdd",
19+
"--no-timeouts",
20+
"--colors",
21+
"built/local/run.js",
22+
"-f",
23+
"${fileBasenameNoExtension}",
24+
"--skip-percent",
25+
"0"
26+
],
27+
"env": {
28+
"NODE_ENV": "testing"
29+
},
30+
"sourceMaps": true,
31+
"smartStep": true,
32+
"preLaunchTask": "tests",
33+
"console": "integratedTerminal",
34+
"outFiles": [
35+
"${workspaceRoot}/built/local/run.js"
36+
]
37+
}
38+
]
39+
}

.vscode/settings.json

-12
This file was deleted.

.vscode/settings.template.json

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// Rename this file 'settings.json' or merge its
2+
// contents into your existing settings.
3+
{
4+
"eslint.validate": [
5+
{
6+
"language": "typescript",
7+
"autoFix": true
8+
}
9+
],
10+
"eslint.options": {
11+
"rulePaths": ["./scripts/eslint/built/rules/"],
12+
"ext": [".ts"]
13+
},
14+
// To use the last-known-good (LKG) compiler version:
15+
// "typescript.tsdk": "lib"
16+
17+
// To use the locally built compiler, after 'npm run build':
18+
// "typescript.tsdk": "built/local"
19+
}

CONTRIBUTING.md

+2
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,8 @@ You can debug with VS Code or Node instead with `gulp runtests --inspect=true`:
160160
gulp runtests --tests=2dArrays --inspect=true
161161
```
162162

163+
You can also use the [provided VS Code launch configuration](./.vscode/launch.template.json) to launch a debug session for an open test file. Rename the file 'launch.json', open the test file of interest, and launch the debugger from the debug panel (or press F5).
164+
163165
## Adding a Test
164166

165167
To add a new test case, simply place a `.ts` file in `tests\cases\compiler` containing code that exemplifies the bugfix or change you are making.

0 commit comments

Comments
 (0)