From bf04914d5993117fd2290662e381d01731cf3097 Mon Sep 17 00:00:00 2001 From: Matt Bierner <12821956+mjbvz@users.noreply.github.com> Date: Wed, 12 Nov 2025 13:54:56 -0800 Subject: [PATCH] Make sure js files still follow eslint semicolon rules --- build/gulpfile.cli.mjs | 2 +- build/gulpfile.editor.mjs | 2 +- build/gulpfile.extensions.mjs | 2 +- build/gulpfile.mjs | 2 +- build/gulpfile.reh.mjs | 2 +- build/gulpfile.scan.mjs | 2 +- build/gulpfile.vscode.linux.mjs | 2 +- build/gulpfile.vscode.mjs | 2 +- build/gulpfile.vscode.web.mjs | 2 +- build/hygiene.mjs | 2 +- eslint.config.js | 6 ++++-- .../workbench/contrib/webview/browser/pre/service-worker.js | 2 +- test/unit/electron/renderer.js | 4 ++-- 13 files changed, 17 insertions(+), 15 deletions(-) diff --git a/build/gulpfile.cli.mjs b/build/gulpfile.cli.mjs index fadd9274b58..84b4f377573 100644 --- a/build/gulpfile.cli.mjs +++ b/build/gulpfile.cli.mjs @@ -21,7 +21,7 @@ import { fileURLToPath } from 'url'; const { debounce } = utilModule; const { createReporter } = reporterModule; -const __dirname = import.meta.dirname +const __dirname = import.meta.dirname; const root = 'cli'; const rootAbs = path.resolve(__dirname, '..', root); diff --git a/build/gulpfile.editor.mjs b/build/gulpfile.editor.mjs index 78efe4890f5..bbd67316333 100644 --- a/build/gulpfile.editor.mjs +++ b/build/gulpfile.editor.mjs @@ -20,7 +20,7 @@ import filter from 'gulp-filter'; import reporterModule from './lib/reporter.js'; import monacoPackage from './monaco/package.json' with { type: 'json' }; -const __dirname = import.meta.dirname +const __dirname = import.meta.dirname; const { getVersion } = getVersionModule; const { createReporter } = reporterModule; const root = path.dirname(__dirname); diff --git a/build/gulpfile.extensions.mjs b/build/gulpfile.extensions.mjs index 74b638b48c9..cd5b9eabc79 100644 --- a/build/gulpfile.extensions.mjs +++ b/build/gulpfile.extensions.mjs @@ -24,7 +24,7 @@ import tsb from './lib/tsb/index.js'; import sourcemaps from 'gulp-sourcemaps'; import { fileURLToPath } from 'url'; -const __dirname = import.meta.dirname +const __dirname = import.meta.dirname; const { getVersion } = getVersionModule; const { createReporter } = reporterModule; const root = path.dirname(__dirname); diff --git a/build/gulpfile.mjs b/build/gulpfile.mjs index aff3d0b8746..1b14c7edd5f 100644 --- a/build/gulpfile.mjs +++ b/build/gulpfile.mjs @@ -17,7 +17,7 @@ import util from './lib/util.js'; EventEmitter.defaultMaxListeners = 100; const require = createRequire(import.meta.url); -const __dirname = import.meta.dirname +const __dirname = import.meta.dirname; const { transpileTask, compileTask, watchTask, compileApiProposalNamesTask, watchApiProposalNamesTask } = compilation; diff --git a/build/gulpfile.reh.mjs b/build/gulpfile.reh.mjs index 5a047557119..837bcd3d5ee 100644 --- a/build/gulpfile.reh.mjs +++ b/build/gulpfile.reh.mjs @@ -40,7 +40,7 @@ const { getVersion } = getVersionModule; const { getProductionDependencies } = dependenciesModule; const { readISODate } = dateModule; const { fetchUrls, fetchGithub } = fetchModule; -const __dirname = import.meta.dirname +const __dirname = import.meta.dirname; const REPO_ROOT = path.dirname(__dirname); const commit = getVersion(REPO_ROOT); diff --git a/build/gulpfile.scan.mjs b/build/gulpfile.scan.mjs index 2680b000e8e..a2f9a9c11fa 100644 --- a/build/gulpfile.scan.mjs +++ b/build/gulpfile.scan.mjs @@ -16,7 +16,7 @@ import { fileURLToPath } from 'url'; const { config } = electronConfigModule; -const __dirname = import.meta.dirname +const __dirname = import.meta.dirname; const root = path.dirname(__dirname); const BUILD_TARGETS = [ diff --git a/build/gulpfile.vscode.linux.mjs b/build/gulpfile.vscode.linux.mjs index 68a45c99d39..315c29091a0 100644 --- a/build/gulpfile.vscode.linux.mjs +++ b/build/gulpfile.vscode.linux.mjs @@ -23,7 +23,7 @@ import { fileURLToPath } from 'url'; const { rimraf } = utilModule; const { getVersion } = getVersionModule; const { recommendedDeps: debianRecommendedDependencies } = depLists; -const __dirname = import.meta.dirname +const __dirname = import.meta.dirname; const exec = promisify(cp.exec); const root = path.dirname(__dirname); const commit = getVersion(root); diff --git a/build/gulpfile.vscode.mjs b/build/gulpfile.vscode.mjs index 1f36875522c..8f5a7b0d516 100644 --- a/build/gulpfile.vscode.mjs +++ b/build/gulpfile.vscode.mjs @@ -43,7 +43,7 @@ const { config } = electronModule; const { createAsar } = asarModule; const glob = promisify(globCallback); const rcedit = promisify(rceditCallback); -const __dirname = import.meta.dirname +const __dirname = import.meta.dirname; const root = path.dirname(__dirname); const commit = getVersion(root); diff --git a/build/gulpfile.vscode.web.mjs b/build/gulpfile.vscode.web.mjs index 6efdd94e216..e976ed77a61 100644 --- a/build/gulpfile.vscode.web.mjs +++ b/build/gulpfile.vscode.web.mjs @@ -27,7 +27,7 @@ import { fileURLToPath } from 'url'; const { getVersion } = getVersionModule; const { readISODate } = dateModule; const { getProductionDependencies } = dependenciesModule; -const __dirname = import.meta.dirname +const __dirname = import.meta.dirname; const REPO_ROOT = path.dirname(__dirname); const BUILD_ROOT = path.dirname(REPO_ROOT); diff --git a/build/hygiene.mjs b/build/hygiene.mjs index 1c2b02f41fc..530dceac3ea 100644 --- a/build/hygiene.mjs +++ b/build/hygiene.mjs @@ -305,7 +305,7 @@ if (import.meta.filename === process.argv[1]) { hygiene(es.readArray(vinyls).pipe(filter(all))) .on('end', () => c()) .on('error', e) - )) + )); } ) .catch((err) => { diff --git a/eslint.config.js b/eslint.config.js index 84c7ff2d722..99275fd5195 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -75,7 +75,7 @@ export default tseslint.config( 'context' ], // non-complete list of globals that are easy to access unintentionally 'no-var': 'warn', - 'semi': 'off', + 'semi': 'warn', 'local/code-translation-remind': 'warn', 'local/code-no-native-private': 'warn', 'local/code-parameter-properties-must-have-explicit-accessibility': 'warn', @@ -131,7 +131,7 @@ export default tseslint.config( // TS { files: [ - '**/*.ts', + '**/*.{ts,tsx,mts,cts}', ], languageOptions: { parser: tseslint.parser, @@ -143,6 +143,8 @@ export default tseslint.config( 'jsdoc': pluginJsdoc, }, rules: { + // Disable built-in semi rules in favor of stylistic + 'semi': 'off', '@stylistic/ts/semi': 'warn', '@stylistic/ts/member-delimiter-style': 'warn', 'local/code-no-unused-expressions': [ diff --git a/src/vs/workbench/contrib/webview/browser/pre/service-worker.js b/src/vs/workbench/contrib/webview/browser/pre/service-worker.js index a62111bf6ed..2ae1ee4bfa3 100644 --- a/src/vs/workbench/contrib/webview/browser/pre/service-worker.js +++ b/src/vs/workbench/contrib/webview/browser/pre/service-worker.js @@ -36,7 +36,7 @@ const perfMark = (name, options = {}) => { ...options } }); -} +}; perfMark('scriptStart'); diff --git a/test/unit/electron/renderer.js b/test/unit/electron/renderer.js index 23f66cc2fe5..718cf9dd8d7 100644 --- a/test/unit/electron/renderer.js +++ b/test/unit/electron/renderer.js @@ -304,7 +304,7 @@ async function loadTests(opts) { const msg = []; for (const error of errors) { console.error(`Error: Test run should not have unexpected errors:\n${error}`); - msg.push(String(error)) + msg.push(String(error)); } assert.ok(false, `Error: Test run should not have unexpected errors:\n${msg.join('\n')}`); } @@ -464,7 +464,7 @@ async function runTests(opts) { await loadTests(opts); const runner = mocha.run(async () => { - await createCoverageReport(opts) + await createCoverageReport(opts); ipcRenderer.send('all done'); });