Skip to content

Commit 50a952b

Browse files
committed
Merge branch 'main' into enumImprovements
2 parents 66df808 + c89f355 commit 50a952b

File tree

1,262 files changed

+271709
-192850
lines changed

Some content is hidden

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

1,262 files changed

+271709
-192850
lines changed

.dockerignore

-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ scripts/run.bat
2020
scripts/word2md.js
2121
scripts/buildProtocol.js
2222
scripts/ior.js
23-
scripts/authors.js
2423
scripts/configurePrerelease.js
2524
scripts/open-user-pr.js
2625
scripts/open-cherry-pick-pr.js

.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/**

.eslintplugin.js

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
const fs = require("fs");
2+
const path = require("path");
3+
4+
const rulesDir = path.join(__dirname, "scripts", "eslint", "rules");
5+
const ext = ".js";
6+
const ruleFiles = fs.readdirSync(rulesDir).filter((p) => p.endsWith(ext));
7+
8+
module.exports = {
9+
rules: Object.fromEntries(ruleFiles.map((p) => {
10+
return [p.slice(0, -ext.length), require(path.join(rulesDir, p))];
11+
})),
12+
}

.eslintrc.json

+23-12
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,18 @@
1111
"es6": true
1212
},
1313
"plugins": [
14-
"@typescript-eslint", "jsdoc", "no-null", "import"
14+
"@typescript-eslint", "jsdoc", "no-null", "import", "eslint-plugin-local"
15+
],
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"] }
1526
],
1627
"rules": {
1728
"@typescript-eslint/adjacent-overload-signatures": "error",
@@ -70,20 +81,20 @@
7081
"@typescript-eslint/unified-signatures": "error",
7182

7283
// scripts/eslint/rules
73-
"object-literal-surrounding-space": "error",
74-
"no-type-assertion-whitespace": "error",
75-
"type-operator-spacing": "error",
76-
"only-arrow-functions": ["error", {
84+
"local/object-literal-surrounding-space": "error",
85+
"local/no-type-assertion-whitespace": "error",
86+
"local/type-operator-spacing": "error",
87+
"local/only-arrow-functions": ["error", {
7788
"allowNamedFunctions": true ,
7889
"allowDeclarations": true
7990
}],
80-
"no-double-space": "error",
81-
"boolean-trivia": "error",
82-
"no-in-operator": "error",
83-
"simple-indent": "error",
84-
"debug-assert": "error",
85-
"no-keywords": "error",
86-
"one-namespace-per-file": "error",
91+
"local/no-double-space": "error",
92+
"local/boolean-trivia": "error",
93+
"local/no-in-operator": "error",
94+
"local/simple-indent": "error",
95+
"local/debug-assert": "error",
96+
"local/no-keywords": "error",
97+
"local/one-namespace-per-file": "error",
8798

8899
// eslint-plugin-import
89100
"import/no-extraneous-dependencies": ["error", { "optionalDependencies": false }],

.github/pr_owners.txt

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
11
sandersn
2-
elibarzilay
32
weswigham
43
andrewbranch
54
RyanCavanaugh
65
sheetalkamat
7-
orta
86
rbuckton
97
ahejlsberg
108
amcasey
11-
jessetrinity
129
minestarks
1310
armanio123
1411
gabritto
1512
jakebailey
1613
DanielRosenwasser
14+
navya9singh

.github/workflows/ci.yml

+26-11
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111
- release-*
1212

1313
jobs:
14-
build:
14+
test:
1515
runs-on: ubuntu-latest
1616

1717
strategy:
@@ -24,31 +24,46 @@ jobs:
2424

2525
steps:
2626
- uses: actions/checkout@v3
27-
with:
28-
fetch-depth: 5
2927
- name: Use node version ${{ matrix.node-version }}
3028
uses: actions/setup-node@v3
3129
with:
3230
node-version: ${{ matrix.node-version }}
3331
check-latest: true
34-
- name: Remove existing TypeScript
35-
run: |
36-
npm uninstall typescript --no-save
37-
npm uninstall tslint --no-save
3832
- run: npm ci
3933

40-
# Re: https://github.com/actions/setup-node/pull/125
41-
- name: Register Problem Matcher for TSC
42-
run: echo "##[add-matcher].github/tsc.json"
43-
4434
- name: Tests
4535
run: npm test -- --no-lint
4636

37+
lint:
38+
runs-on: ubuntu-latest
39+
40+
steps:
41+
- uses: actions/checkout@v3
42+
- uses: actions/setup-node@v3
43+
with:
44+
node-version: "*"
45+
check-latest: true
46+
- run: npm ci
47+
4748
- name: Linter
4849
run: npm run lint:ci
4950

51+
browser-integration:
52+
runs-on: ubuntu-latest
53+
54+
steps:
55+
- uses: actions/checkout@v3
56+
- uses: actions/setup-node@v3
57+
with:
58+
node-version: "*"
59+
check-latest: true
60+
- run: npm ci
61+
5062
- name: Adding playwright
5163
run: npm install --no-save --no-package-lock playwright
5264

65+
- name: Build local
66+
run: gulp local
67+
5368
- name: Validate the browser can import TypeScript
5469
run: gulp test-browser-integration

.github/workflows/release-branch-artifact.yaml

-4
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,6 @@ jobs:
1212
steps:
1313
- uses: actions/checkout@v2
1414
- uses: actions/setup-node@v3
15-
- name: Remove existing TypeScript
16-
run: |
17-
npm uninstall typescript --no-save
18-
npm uninstall tslint --no-save
1915
- name: npm install and test
2016
run: |
2117
npm ci

.github/workflows/update-package-lock.yaml

+5-2
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,18 @@ jobs:
1414

1515
steps:
1616
- uses: actions/checkout@v2
17+
with:
18+
token: ${{ secrets.TS_BOT_GITHUB_TOKEN }}
1719
- uses: actions/setup-node@v3
1820
with:
19-
node-version: 14
21+
node-version: 16
2022

2123
- name: Configure git and update package-lock.json
2224
run: |
2325
git config user.email "[email protected]"
2426
git config user.name "TypeScript Bot"
25-
npm install --package-lock-only --ignore-scripts
27+
rm package-lock.json
28+
npm install --package-lock-only --ignore-scripts # This is a no-op if package-lock.json is present.
2629
git add -f package-lock.json
2730
if git commit -m "Update package-lock.json"; then
2831
git push

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ scripts/run.bat
4343
scripts/word2md.js
4444
scripts/buildProtocol.js
4545
scripts/ior.js
46-
scripts/authors.js
4746
scripts/configurePrerelease.js
4847
scripts/configureLanguageServiceBuild.js
4948
scripts/open-user-pr.js
@@ -54,6 +53,7 @@ scripts/produceLKG.js
5453
scripts/importDefinitelyTypedTests/importDefinitelyTypedTests.js
5554
scripts/generateLocalizedDiagnosticMessages.js
5655
scripts/request-pr-review.js
56+
scripts/errorCheck.js
5757
scripts/*.js.map
5858
scripts/typings/
5959
coverage/

0 commit comments

Comments
 (0)