Skip to content

Commit

Permalink
chore: add esModuleInterop to tsconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
洛竹 committed Aug 12, 2021
1 parent 7c06f25 commit f28877f
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 24 deletions.
2 changes: 1 addition & 1 deletion src/extension.ts
@@ -1,6 +1,6 @@
// The module 'vscode' contains the VS Code extensibility API
// Import the module and reference it with the alias vscode in your code below
import * as vscode from 'vscode';
import vscode from 'vscode';

// this method is called when your extension is activated
// your extension is activated the very first time the command is executed
Expand Down
2 changes: 1 addition & 1 deletion src/test/suite/extension.test.ts
@@ -1,4 +1,4 @@
import * as assert from 'assert';
import assert from 'assert';

// You can import and use all API from the 'vscode' module
// as well as import your extension to test it
Expand Down
6 changes: 3 additions & 3 deletions src/test/suite/index.ts
@@ -1,7 +1,7 @@
/* eslint-disable no-shadow,consistent-return */
import * as path from 'path';
import * as Mocha from 'mocha';
import * as glob from 'glob';
import path from 'path';
import Mocha from 'mocha';
import glob from 'glob';

export function run(): Promise<void> {
// Create the mocha test
Expand Down
34 changes: 15 additions & 19 deletions tsconfig.json
@@ -1,21 +1,17 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"outDir": "out",
"lib": [
"es6"
],
"sourceMap": true,
"rootDir": "src",
"strict": true /* enable all strict type-checking options */
/* Additional Checks */
// "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
// "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
// "noUnusedParameters": true, /* Report errors on unused parameters. */
},
"exclude": [
"node_modules",
".vscode-test"
]
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"outDir": "out",
"lib": ["es6"],
"sourceMap": true,
"rootDir": "src",
"strict": true /* enable all strict type-checking options */,
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
/* Additional Checks */
// "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
// "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
// "noUnusedParameters": true, /* Report errors on unused parameters. */
},
"exclude": ["node_modules", ".vscode-test"]
}

0 comments on commit f28877f

Please sign in to comment.