Enable type checking in more js build files

This commit is contained in:
Matt Bierner 2022-02-28 14:41:26 -08:00
parent f71bd27ec9
commit d6d2122c50
No known key found for this signature in database
GPG key ID: 099C331567E11888
7 changed files with 10 additions and 9 deletions

View file

@ -2,6 +2,7 @@
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
//@ts-check
const fs = require('fs');
const path = require('path');

View file

@ -2,6 +2,7 @@
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
// @ts-check
const { app, BrowserWindow, ipcMain, dialog } = require('electron');
const url = require('url');

View file

@ -2,7 +2,7 @@
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
//@ts-check
const cp = require('child_process');
const path = require('path');
const fs = require('fs');

View file

@ -2,7 +2,7 @@
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
//@ts-check
let err = false;
const nodeVersion = /^(\d+)\.(\d+)\.(\d+)/.exec(process.versions.node);
@ -88,12 +88,11 @@ function hasSupportedVisualStudioVersion() {
function installHeaders() {
const yarn = 'yarn.cmd';
const opts = {
const yarnResult = cp.spawnSync(yarn, ['install'], {
env: process.env,
cwd: path.join(__dirname, 'gyp'),
stdio: 'inherit'
};
const yarnResult = cp.spawnSync(yarn, ['install'], opts);
});
if (yarnResult.error || yarnResult.status !== 0) {
console.error(`Installing node-gyp failed`);
err = true;

View file

@ -2,7 +2,7 @@
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
//@ts-check
const cp = require('child_process');
const fs = require('fs');
const path = require('path');

View file

@ -2,7 +2,7 @@
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
//@ts-check
const cp = require('child_process');
const path = require('path');
const fs = require('fs');
@ -15,4 +15,4 @@ const packageJsonPath = path.join(vscodePath, 'package.json');
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'));
packageJson.distro = commit;
fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2));
fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2));

View file

@ -2,7 +2,7 @@
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
//@ts-check
'use strict';
let i18n = require("../lib/i18n");