mirror of
https://github.com/microsoft/vscode.git
synced 2026-01-09 06:31:23 +08:00
Make sure js files still follow eslint semicolon rules
This commit is contained in:
parent
b625e085b7
commit
bf04914d59
@ -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);
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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 = [
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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);
|
||||
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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) => {
|
||||
|
||||
@ -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': [
|
||||
|
||||
@ -36,7 +36,7 @@ const perfMark = (name, options = {}) => {
|
||||
...options
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
perfMark('scriptStart');
|
||||
|
||||
|
||||
@ -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');
|
||||
});
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user