Skip to content

Commit 712a7a3

Browse files
committed
Switched to es2020 and esnext module.
1 parent 2333a32 commit 712a7a3

5 files changed

Lines changed: 21 additions & 11 deletions

File tree

.vscode/launch.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@
7676
"**/node_modules/**"
7777
],
7878
"env": {
79-
"NODE_ENV": "testing"
79+
"NODE_ENV": "testing",
80+
"TS_NODE_PROJECT": "./tsconfig.tests.json"
8081
},
8182
"sourceMaps": true
8283
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@
396396
"pretty": "prettier --config .prettierrc --loglevel warn .",
397397
"pub": "vsce publish",
398398
"test": "node ./out/test/runTests.js",
399-
"test:unit": "mocha --require ts-node/register test/unit/*.test.ts",
399+
"test:unit": "SET TS_NODE_PROJECT=./tsconfig.tests.json&& mocha -r ts-node/register test/unit/*.test.ts",
400400
"vscode:prepublish": "npm run bundle",
401401
"webpack": "webpack --mode development",
402402
"webpack-dev": "webpack --mode development --watch"

tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
"incremental": true,
66
"isolatedModules": true,
77
"lib": [
8-
"es2019"
8+
"es2020"
99
],
10-
"module": "commonjs",
10+
"module": "esnext",
1111
"moduleResolution": "node",
1212
"noFallthroughCasesInSwitch": true,
1313
"noImplicitReturns": true,

tsconfig.tests.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"extends": "./tsconfig.json",
3+
"compilerOptions": {
4+
"lib": [
5+
"es2020"
6+
],
7+
"module": "commonjs",
8+
"outDir": "out",
9+
"tsBuildInfoFile": "tsconfig.tests.tsbuildinfo"
10+
}
11+
}

webpack.config.js

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
1-
// @ts-check
2-
3-
/* eslint-disable @typescript-eslint/no-var-requires */
4-
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
5-
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
6-
/* eslint-disable @typescript-eslint/no-unsafe-call */
1+
/* ---------------------------------------------------------------------------------------------
2+
* Copyright (c) Applied Eng & Design All rights reserved.
3+
* Licensed under the MIT License. See License.md in the project root for license information.
4+
* -------------------------------------------------------------------------------------------- */
75

86
'use strict';
97

108
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
119
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
1210
const path = require('path');
1311

12+
// @ts-check
1413
/** @typedef {import('webpack').Configuration} */
1514

1615
function getExtensionConfig(mode, env) {
@@ -89,7 +88,6 @@ module.exports = function (env, argv) {
8988
env = {
9089
analyzeBundle: false,
9190
analyzeDeps: false,
92-
esbuild: true,
9391
...env,
9492
};
9593

0 commit comments

Comments
 (0)