Skip to content

Commit 034d54f

Browse files
Merge remote-tracking branch 'origin/main' into forEachChildTable
2 parents b94b82a + 1592210 commit 034d54f

File tree

454 files changed

+9188
-5018
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

454 files changed

+9188
-5018
lines changed

Diff for: .eslintignore

+5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1+
**/node_modules/**
12
/built/local/**
23
/tests/**
34
/lib/**
45
/src/lib/*.generated.d.ts
6+
/scripts/*.js
7+
/scripts/eslint/built/**
8+
/internal/**
9+
/coverage/**

Diff for: .eslintrc.json

+11
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,17 @@
1313
"plugins": [
1414
"@typescript-eslint", "jsdoc", "no-null", "import"
1515
],
16+
"overrides": [
17+
// By default, the ESLint CLI only looks at .js files. But, it will also look at
18+
// any files which are referenced in an override config. Most users of typescript-eslint
19+
// get this behavior by default by extending a recommended typescript-eslint config, which
20+
// just so happens to override some core ESLint rules. We don't extend from any config, so
21+
// explicitly reference TS files here so the CLI picks them up.
22+
//
23+
// ESLint in VS Code will lint any opened file (so long as it's not eslintignore'd), so
24+
// that will work regardless of the below.
25+
{ "files": ["*.ts"] }
26+
],
1627
"rules": {
1728
"@typescript-eslint/adjacent-overload-signatures": "error",
1829
"@typescript-eslint/array-type": "error",

Diff for: .gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ scripts/produceLKG.js
5454
scripts/importDefinitelyTypedTests/importDefinitelyTypedTests.js
5555
scripts/generateLocalizedDiagnosticMessages.js
5656
scripts/request-pr-review.js
57+
scripts/errorCheck.js
5758
scripts/*.js.map
5859
scripts/typings/
5960
coverage/

Diff for: .vscode/settings.template.json

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
],
77
"eslint.options": {
88
"rulePaths": ["./scripts/eslint/built/rules/"],
9-
"extensions": [".ts"]
109
},
1110
// To use the last-known-good (LKG) compiler version:
1211
// "typescript.tsdk": "lib"

Diff for: Gulpfile.js

+6-24
Original file line numberDiff line numberDiff line change
@@ -92,18 +92,12 @@ const localize = async () => {
9292
}
9393
};
9494

95-
const buildShims = () => buildProject("src/shims");
96-
const cleanShims = () => cleanProject("src/shims");
97-
cleanTasks.push(cleanShims);
98-
9995
const buildDebugTools = () => buildProject("src/debug");
10096
const cleanDebugTools = () => cleanProject("src/debug");
10197
cleanTasks.push(cleanDebugTools);
10298

103-
const buildShimsAndTools = parallel(buildShims, buildDebugTools);
104-
10599
// Pre-build steps when targeting the LKG compiler
106-
const lkgPreBuild = parallel(generateLibs, series(buildScripts, generateDiagnostics, buildShimsAndTools));
100+
const lkgPreBuild = parallel(generateLibs, series(buildScripts, generateDiagnostics, buildDebugTools));
107101

108102
const buildTsc = () => buildProject("src/tsc");
109103
task("tsc", series(lkgPreBuild, buildTsc));
@@ -119,7 +113,7 @@ task("watch-tsc", series(lkgPreBuild, parallel(watchLib, watchDiagnostics, watch
119113
task("watch-tsc").description = "Watch for changes and rebuild the command-line compiler only.";
120114

121115
// Pre-build steps when targeting the built/local compiler.
122-
const localPreBuild = parallel(generateLibs, series(buildScripts, generateDiagnostics, buildShimsAndTools, buildTsc));
116+
const localPreBuild = parallel(generateLibs, series(buildScripts, generateDiagnostics, buildDebugTools, buildTsc));
123117

124118
// Pre-build steps to use based on supplied options.
125119
const preBuild = cmdLineOptions.lkg ? lkgPreBuild : localPreBuild;
@@ -356,15 +350,13 @@ task("run-eslint-rules-tests").description = "Runs the eslint rule tests";
356350

357351
/** @type { (folder: string) => { (): Promise<any>; displayName?: string } } */
358352
const eslint = (folder) => async () => {
359-
360353
const formatter = cmdLineOptions.ci ? "stylish" : "autolinkable-stylish";
361354
const args = [
362355
"node_modules/eslint/bin/eslint",
363356
"--cache",
364357
"--cache-location", `${folder}/.eslintcache`,
365358
"--format", formatter,
366359
"--rulesdir", "scripts/eslint/built/rules",
367-
"--ext", ".ts",
368360
];
369361

370362
if (cmdLineOptions.fix) {
@@ -377,22 +369,12 @@ const eslint = (folder) => async () => {
377369
return exec(process.execPath, args);
378370
};
379371

380-
const lintScripts = eslint("scripts");
381-
lintScripts.displayName = "lint-scripts";
382-
task("lint-scripts", series([buildEslintRules, lintScripts]));
383-
task("lint-scripts").description = "Runs eslint on the scripts sources.";
384-
385-
const lintCompiler = eslint("src");
386-
lintCompiler.displayName = "lint-compiler";
387-
task("lint-compiler", series([buildEslintRules, lintCompiler]));
388-
task("lint-compiler").description = "Runs eslint on the compiler sources.";
389-
task("lint-compiler").flags = {
390-
" --ci": "Runs eslint additional rules",
391-
};
372+
const lintRoot = eslint(".");
373+
lintRoot.displayName = "lint";
392374

393-
const lint = series([buildEslintRules, lintScripts, lintCompiler]);
375+
const lint = series([buildEslintRules, lintRoot]);
394376
lint.displayName = "lint";
395-
task("lint", series([buildEslintRules, lint]));
377+
task("lint", lint);
396378
task("lint").description = "Runs eslint on the compiler and scripts sources.";
397379
task("lint").flags = {
398380
" --ci": "Runs eslint additional rules",

0 commit comments

Comments
 (0)