From facfdbc51028877a6e695b1db280813ca2e5e30a Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Mon, 2 Sep 2019 09:29:34 +0200 Subject: [PATCH] Enable full TSLint check in build (#80191) * build - run TSLint in our builds * try out tslint --- build/azure-pipelines/darwin/continuous-build-darwin.yml | 7 +++++-- build/azure-pipelines/linux/continuous-build-linux.yml | 5 ++++- build/azure-pipelines/product-compile.yml | 5 +++-- build/azure-pipelines/win32/continuous-build-win32.yml | 8 +++++--- build/gulpfile.hygiene.js | 9 ++++++--- src/vs/workbench/contrib/terminal/common/terminal.ts | 1 - 6 files changed, 23 insertions(+), 12 deletions(-) diff --git a/build/azure-pipelines/darwin/continuous-build-darwin.yml b/build/azure-pipelines/darwin/continuous-build-darwin.yml index 018719423fe..785cd9d02f6 100644 --- a/build/azure-pipelines/darwin/continuous-build-darwin.yml +++ b/build/azure-pipelines/darwin/continuous-build-darwin.yml @@ -24,8 +24,11 @@ steps: yarn gulp electron-x64 displayName: Download Electron - script: | - yarn gulp hygiene + yarn gulp hygiene --skip-tslint displayName: Run Hygiene Checks +- script: | + yarn gulp tslint + displayName: Run TSLint Checks - script: | yarn monaco-compile-check displayName: Run Monaco Editor Checks @@ -46,4 +49,4 @@ steps: inputs: testResultsFiles: '*-results.xml' searchFolder: '$(Build.ArtifactStagingDirectory)/test-results' - condition: succeededOrFailed() \ No newline at end of file + condition: succeededOrFailed() diff --git a/build/azure-pipelines/linux/continuous-build-linux.yml b/build/azure-pipelines/linux/continuous-build-linux.yml index 8b0aaca2ad9..779707b72ce 100644 --- a/build/azure-pipelines/linux/continuous-build-linux.yml +++ b/build/azure-pipelines/linux/continuous-build-linux.yml @@ -32,8 +32,11 @@ steps: yarn gulp electron-x64 displayName: Download Electron - script: | - yarn gulp hygiene + yarn gulp hygiene --skip-tslint displayName: Run Hygiene Checks +- script: | + yarn gulp tslint + displayName: Run TSLint Checks - script: | yarn monaco-compile-check displayName: Run Monaco Editor Checks diff --git a/build/azure-pipelines/product-compile.yml b/build/azure-pipelines/product-compile.yml index 10333b98472..294226867c5 100644 --- a/build/azure-pipelines/product-compile.yml +++ b/build/azure-pipelines/product-compile.yml @@ -87,9 +87,10 @@ steps: - script: | set -e - yarn gulp hygiene + yarn gulp hygiene --skip-tslint + yarn gulp tslint yarn monaco-compile-check - displayName: Run hygiene checks + displayName: Run hygiene, tslint and monaco compile checks condition: and(succeeded(), ne(variables['CacheRestored-Compilation'], 'true'), eq(variables['VSCODE_STEP_ON_IT'], 'false')) - script: | diff --git a/build/azure-pipelines/win32/continuous-build-win32.yml b/build/azure-pipelines/win32/continuous-build-win32.yml index 9b6d61ee974..c7d3205fa5d 100644 --- a/build/azure-pipelines/win32/continuous-build-win32.yml +++ b/build/azure-pipelines/win32/continuous-build-win32.yml @@ -26,10 +26,12 @@ steps: condition: and(succeeded(), ne(variables['CacheRestored'], 'true')) - powershell: | yarn gulp electron - displayName: Download Electron -- powershell: | - yarn gulp hygiene +- script: | + yarn gulp hygiene --skip-tslint displayName: Run Hygiene Checks +- script: | + yarn gulp tslint + displayName: Run TSLint Checks - powershell: | yarn monaco-compile-check displayName: Run Monaco Editor Checks diff --git a/build/gulpfile.hygiene.js b/build/gulpfile.hygiene.js index aaedf0a7bc8..a1f47447c18 100644 --- a/build/gulpfile.hygiene.js +++ b/build/gulpfile.hygiene.js @@ -311,10 +311,13 @@ function hygiene(some) { .pipe(filter(copyrightFilter)) .pipe(copyrights); - const typescript = result + let typescript = result .pipe(filter(tslintHygieneFilter)) - .pipe(formatting) - .pipe(tsl); + .pipe(formatting); + + if (!process.argv.some(arg => arg === '--skip-tslint')) { + typescript = typescript.pipe(tsl); + } const javascript = result .pipe(filter(eslintFilter)) diff --git a/src/vs/workbench/contrib/terminal/common/terminal.ts b/src/vs/workbench/contrib/terminal/common/terminal.ts index 3f67da5ab89..ef8faa77107 100644 --- a/src/vs/workbench/contrib/terminal/common/terminal.ts +++ b/src/vs/workbench/contrib/terminal/common/terminal.ts @@ -248,7 +248,6 @@ export interface ITerminalService { /** * Creates a raw terminal instance, this should not be used outside of the terminal part. */ - // tslint:disable-next-line: no-dom-globals createInstance(container: HTMLElement | undefined, shellLaunchConfig: IShellLaunchConfig): ITerminalInstance; getInstanceFromId(terminalId: number): ITerminalInstance | undefined; getInstanceFromIndex(terminalIndex: number): ITerminalInstance;