Add template .vscode/* settings, ignore real ones (#33758)

* Add LKG as typescript.tsdk

* Add template settings, ignore real ones

* Add note to CONTRIBUTING.md
This commit is contained in:
Andrew Branch 2019-10-03 12:27:06 -05:00 коммит произвёл GitHub
Родитель 903a6c9918
Коммит acf7aeee80
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
5 изменённых файлов: 63 добавлений и 14 удалений

5
.gitignore поставляемый
Просмотреть файл

@ -61,9 +61,10 @@ internal/
**/.DS_Store
.settings
**/.vs
**/.vscode
**/.vscode/*
!**/.vscode/tasks.json
!**/.vscode/settings.json
!**/.vscode/settings.template.json
!**/.vscode/launch.template.json
!**/.vscode/extensions.json
!tests/cases/projects/projectOption/**/node_modules
!tests/cases/projects/NodeModulesSearch/**/*

39
.vscode/launch.template.json поставляемый Normal file
Просмотреть файл

@ -0,0 +1,39 @@
// Rename this file 'launch.json' or merge its
// contents into your existing configurations.
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"protocol": "inspector",
"request": "launch",
"name": "Mocha Tests (currently opened test)",
"runtimeArgs": ["--nolazy"],
"program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
"args": [
"-u",
"bdd",
"--no-timeouts",
"--colors",
"built/local/run.js",
"-f",
"${fileBasenameNoExtension}",
"--skip-percent",
"0"
],
"env": {
"NODE_ENV": "testing"
},
"sourceMaps": true,
"smartStep": true,
"preLaunchTask": "tests",
"console": "integratedTerminal",
"outFiles": [
"${workspaceRoot}/built/local/run.js"
]
}
]
}

12
.vscode/settings.json поставляемый
Просмотреть файл

@ -1,12 +0,0 @@
{
"eslint.validate": [
{
"language": "typescript",
"autoFix": true
}
],
"eslint.options": {
"rulePaths": ["./scripts/eslint/built/rules/"],
"ext": [".ts"]
}
}

19
.vscode/settings.template.json поставляемый Normal file
Просмотреть файл

@ -0,0 +1,19 @@
// Rename this file 'settings.json' or merge its
// contents into your existing settings.
{
"eslint.validate": [
{
"language": "typescript",
"autoFix": true
}
],
"eslint.options": {
"rulePaths": ["./scripts/eslint/built/rules/"],
"ext": [".ts"]
},
// To use the last-known-good (LKG) compiler version:
// "typescript.tsdk": "lib"
// To use the locally built compiler, after 'npm run build':
// "typescript.tsdk": "built/local"
}

Просмотреть файл

@ -160,6 +160,8 @@ You can debug with VS Code or Node instead with `gulp runtests --inspect=true`:
gulp runtests --tests=2dArrays --inspect=true
```
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).
## Adding a Test
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.