Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"project": "tsconfig.json"
"project": [
"tsconfig.webview.json",
"tsconfig.json"
]
},
"plugins": [
"@typescript-eslint"
Expand Down Expand Up @@ -61,7 +64,9 @@
"no-var": "error",
"prefer-arrow-callback": [
"error",
{ "allowNamedFunctions": true }
{
"allowNamedFunctions": true
}
],
"prefer-const": "error",
"prefer-template": "error",
Expand Down
2 changes: 2 additions & 0 deletions .vscodeignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ images/**
.gitignore
.github/**
tsconfig.json
tsconfig.webview.json
tsconfig.base.json
vsc-extension-quickstart.md
undefined/**
CONTRIBUTING.md
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1390,7 +1390,7 @@
"build-server": "./node_modules/.bin/gulp build_server",
"fast-build-server": "./node_modules/.bin/gulp dev_server",
"watch-server": "./node_modules/.bin/gulp watch_server",
"eslint": "eslint --ignore-path .eslintignore --ext .js,.ts ."
"eslint": "eslint --ignore-path .eslintignore --ext .js,.ts,.tsx ."
},
"devDependencies": {
"@types/fs-extra": "^8.0.0",
Expand Down
2 changes: 1 addition & 1 deletion src/log.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { createLogger, format, transports } from 'winston';
import DailyRotateFile from 'winston-daily-rotate-file';
import * as DailyRotateFile from 'winston-daily-rotate-file';

export function initializeLogFile(filename: string) {
logger.add(new DailyRotateFile({
Expand Down
8 changes: 4 additions & 4 deletions src/webview/changeSignature/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ export class App extends React.Component<{}, State> {
</VSCodeDataGridRow>
{
(() => {
const options = [];
const options: JSX.Element[] = [];
for (let row = 0; row < this.state.parameters.length; row++) {
options.push(this.generateParameterDataGridRow(row));
}
Expand All @@ -539,7 +539,7 @@ export class App extends React.Component<{}, State> {
</VSCodeDataGridRow>
{
(() => {
const options = [];
const options: JSX.Element[] = [];
for (let row = 0; row < this.state.exceptions.length; row++) {
options.push(this.generateExceptionDataGridRow(row));
}
Expand Down Expand Up @@ -577,8 +577,8 @@ export class App extends React.Component<{}, State> {
return Number(idSplit[1]);
}

private getModifierString(accessType: string): string {
if (accessType === "package-private") {
private getModifierString(accessType: string | undefined): string {
if (!accessType || accessType === "package-private") {
return "";
}
return accessType;
Expand Down
4 changes: 2 additions & 2 deletions test/lightweight-mode-suite/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
// a possible error to the callback or null if none.

import * as path from 'path';
import Mocha from 'mocha';
import glob from 'glob';
import * as Mocha from 'mocha';
import * as glob from 'glob';

export function run(testsRoot: string): Promise<void> {
const mocha = new Mocha({
Expand Down
2 changes: 1 addition & 1 deletion test/standard-mode-suite/extension.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import assert from 'assert';
import * as assert from 'assert';
import * as fs from 'fs';
import * as path from 'path';
import { env } from 'process';
Expand Down
4 changes: 2 additions & 2 deletions test/standard-mode-suite/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
// a possible error to the callback or null if none.

import * as path from 'path';
import Mocha from 'mocha';
import glob from 'glob';
import * as Mocha from 'mocha';
import * as glob from 'glob';

export function run(testsRoot: string): Promise<void> {
const mocha = new Mocha({
Expand Down
13 changes: 13 additions & 0 deletions tsconfig.base.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"compilerOptions": {
"target": "es6",
"moduleResolution": "node",
"outDir": "out",
"sourceMap": true,
"plugins": [
{
"name": "eslint"
}
],
}
}
21 changes: 4 additions & 17 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,15 @@
{
"extends": "./tsconfig.base.json",
"compilerOptions": {
"target": "es6",
"lib": [
"es6",
"DOM"
"es6"
],
"module": "commonjs",
"moduleResolution": "node",
"outDir": "out",
"sourceMap": true,
"plugins": [
{
"name": "eslint"
}
],
/* Enabled for React */
"jsx": "react-jsx",
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"skipLibCheck": true,
},
"exclude": [
"node_modules",
"server",
".vscode-test"
".vscode-test",
"src/webview"
]
}
17 changes: 17 additions & 0 deletions tsconfig.webview.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"extends": "./tsconfig.base.json",
"compilerOptions": {
"lib": [
"DOM"
],
"module": "ES6",
/* Enabled for React */
"jsx": "react-jsx",
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"skipLibCheck": true,
},
"include": [
"src/webview"
]
}
5 changes: 4 additions & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,10 @@ const configAssets = {
rules: [{
test: /\.ts(x?)$/,
exclude: /node_modules/,
use: 'ts-loader'
loader: 'ts-loader',
options: {
configFile: 'tsconfig.webview.json'
}
}, {
test: /\.(css)$/,
use: [{
Expand Down