Skip to content

Commit f6bdfa0

Browse files
committed
Update the project base
1 parent fd199d6 commit f6bdfa0

24 files changed

+3786
-4499
lines changed

.eslintignore

-1
This file was deleted.

.eslintrc.json

+12-7
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
11
{
2-
"extends": [
3-
"eslint:recommended",
4-
"plugin:@typescript-eslint/recommended"
5-
],
2+
"root": true,
63
"parser": "@typescript-eslint/parser",
4+
"parserOptions": {
5+
"ecmaVersion": 6,
6+
"sourceType": "module"
7+
},
78
"plugins": [
89
"@typescript-eslint"
910
],
1011
"rules": {
11-
"semi": ["error", "always"],
12-
"comma-dangle": ["error", "always-multiline"]
12+
"@typescript-eslint/naming-convention": "warn",
13+
"@typescript-eslint/semi": "warn",
14+
"curly": "warn",
15+
"eqeqeq": "warn",
16+
"no-throw-literal": "warn",
17+
"semi": "off"
1318
}
14-
}
19+
}

.gitattributes

-17
This file was deleted.

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
out
2+
dist
23
node_modules
4+
.vscode-test/
35
*.vsix

.vscode/extensions.json

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
// See http://go.microsoft.com/fwlink/?LinkId=827846
3+
// for the documentation about the extensions.json format
4+
"recommendations": [
5+
"dbaeumer.vscode-eslint",
6+
"eamodio.tsl-problem-matcher"
7+
]
8+
}

.vscode/launch.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,19 @@
1212
"sourceMaps": true,
1313
"preLaunchTask": "npm",
1414
"outFiles": [
15-
"${workspaceRoot}/out/**/*.js"
15+
"${workspaceFolder}/dist/**/*.js"
1616
]
1717
},
1818
{
1919
"name": "Launch Tests",
2020
"type": "extensionHost",
2121
"request": "launch",
2222
"runtimeExecutable": "${execPath}",
23-
"args": ["--extensionDevelopmentPath=${workspaceRoot}", "--extensionTestsPath=${workspaceRoot}/out/test" ],
23+
"args": ["--extensionDevelopmentPath=${workspaceRoot}", "--extensionTestsPath=${workspaceRoot}/out/test/suite/index" ],
2424
"stopOnEntry": false,
2525
"sourceMaps": true,
2626
"outFiles": [
27-
"${workspaceRoot}/out/**/*.js"
27+
"${workspaceRoot}/out/test/**/*.js"
2828
]
2929
}
3030
]

.vscode/settings.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@
66
"search.exclude": {
77
"out": true // set this to false to include "out" folder in search results
88
},
9-
"typescript.tsdk": "./node_modules/typescript/lib" // we want to use the TS server from our node_modules folder to control its version
9+
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
10+
"typescript.tsc.autoDetect": "off"
1011
}

.vscode/tasks.json

+31-29
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,33 @@
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.
1+
// See https://go.microsoft.com/fwlink/?LinkId=733558
2+
// for the documentation about the tasks.json format
103
{
11-
"tasks": [{
12-
"taskName": "npm",
13-
// we want to run npm
14-
"command": "npm",
15-
// the command is a shell script
16-
"isShellCommand": true,
17-
// show the output window only if unrecognized errors occur.
18-
"showOutput": "silent",
19-
// we run the custom script "compile" as defined in package.json
20-
"args": [
21-
"run",
22-
"compile",
23-
"--loglevel",
24-
"silent"
25-
],
26-
// The tsc compiler is started in watching mode
27-
"isBackground": true,
28-
// use the standard tsc in watch mode problem matcher to find compile problems in the output.
29-
"problemMatcher": "$tsc-watch"
30-
}]
4+
"version": "2.0.0",
5+
"tasks": [
6+
{
7+
"type": "npm",
8+
"script": "watch",
9+
"problemMatcher": [
10+
"$ts-webpack-watch",
11+
"$tslint-webpack-watch"
12+
],
13+
"isBackground": true,
14+
"presentation": {
15+
"reveal": "never"
16+
},
17+
"group": {
18+
"kind": "build",
19+
"isDefault": true
20+
}
21+
},
22+
{
23+
"type": "npm",
24+
"script": "test-watch",
25+
"problemMatcher": "$tsc-watch",
26+
"isBackground": true,
27+
"presentation": {
28+
"reveal": "never"
29+
},
30+
"group": "build"
31+
}
32+
]
3133
}

.vscodeignore

+7-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
.vscode/**
2-
typings/**
3-
out/test/**
4-
test/**
2+
.vscode-test/**
3+
out/**
54
src/**
6-
**/*.map
75
.gitignore
8-
tsconfig.json
6+
.yarnrc
97
vsc-extension-quickstart.md
8+
**/tsconfig.json
9+
**/.eslintrc.json
10+
**/*.map
11+
**/*.ts
+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
//@ts-check
2+
3+
'use strict';
4+
5+
const path = require('path');
6+
7+
/**@type {import('webpack').Configuration}*/
8+
const config = {
9+
target: 'node', // vscode extensions run in a Node.js-context 📖 -> https://webpack.js.org/configuration/node/
10+
mode: 'none', // this leaves the source code as close as possible to the original (when packaging we set this to 'production')
11+
12+
entry: './src/extension.ts', // the entry point of this extension, 📖 -> https://webpack.js.org/configuration/entry-context/
13+
output: {
14+
// the bundle is stored in the 'dist' folder (check package.json), 📖 -> https://webpack.js.org/configuration/output/
15+
path: path.resolve(__dirname, '..', 'dist'),
16+
filename: 'extension.js',
17+
libraryTarget: 'commonjs2'
18+
},
19+
devtool: 'nosources-source-map',
20+
externals: {
21+
vscode: 'commonjs vscode' // the vscode-module is created on-the-fly and must be excluded. Add other modules that cannot be webpack'ed, 📖 -> https://webpack.js.org/configuration/externals/
22+
},
23+
resolve: {
24+
// support reading TypeScript and JavaScript files, 📖 -> https://github.com/TypeStrong/ts-loader
25+
extensions: ['.ts', '.js']
26+
},
27+
module: {
28+
rules: [
29+
{
30+
test: /\.ts$/,
31+
exclude: /node_modules/,
32+
use: [
33+
{
34+
loader: 'ts-loader'
35+
}
36+
]
37+
}
38+
]
39+
}
40+
};
41+
module.exports = config;

0 commit comments

Comments
 (0)