Skip to content

Commit 1a97927

Browse files
committed
Merge remote-tracking branch 'origin/main' into dont-widen-computed-prop-wiht-patterns
# Conflicts: # tests/baselines/reference/indexSignatures1.types
2 parents 47cb307 + 3a74ec4 commit 1a97927

File tree

20,450 files changed

+1355834
-441737
lines changed

Some content is hidden

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

20,450 files changed

+1355834
-441737
lines changed

.dprint.jsonc

+12-10
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,17 @@
1919
"arrowFunction.useParentheses": "preferNone",
2020
"conditionalExpression.linePerExpression": false, // Keep our "match/case"-ish conditionals.
2121
"functionExpression.spaceAfterFunctionKeyword": true,
22-
"importDeclaration.forceMultiLine": true,
22+
"importDeclaration.forceMultiLine": "whenMultiple",
2323
"constructorType.spaceAfterNewKeyword": true,
2424
"constructSignature.spaceAfterNewKeyword": true,
2525

26-
// Let eslint-plugin-simple-import-sort handle this.
27-
"module.sortImportDeclarations": "maintain",
28-
"module.sortExportDeclarations": "maintain",
29-
"exportDeclaration.sortNamedExports": "maintain",
30-
"importDeclaration.sortNamedImports": "maintain"
26+
"module.sortImportDeclarations": "caseInsensitive",
27+
"module.sortExportDeclarations": "caseInsensitive",
28+
"exportDeclaration.sortNamedExports": "caseInsensitive",
29+
"importDeclaration.sortNamedImports": "caseInsensitive"
3130
},
3231
"prettier": {
32+
"newLineKind": "lf",
3333
"associations": [
3434
"**/*.{yaml,yml}"
3535
],
@@ -43,6 +43,7 @@
4343
"trailingCommas": "never"
4444
},
4545
"excludes": [
46+
"**/.git",
4647
"**/node_modules",
4748
"**/*-lock.json",
4849
"coverage/**",
@@ -51,12 +52,13 @@
5152
"tests/**",
5253
"internal/**",
5354
"**/*.generated.*",
54-
"scripts/*.d.*"
55+
"scripts/*.d.*",
56+
"**/_namespaces/**"
5557
],
5658
// Note: if adding new languages, make sure settings.template.json is updated too.
5759
"plugins": [
58-
"https://plugins.dprint.dev/typescript-0.88.3.wasm",
59-
"https://plugins.dprint.dev/json-0.19.0.wasm",
60-
"https://plugins.dprint.dev/prettier-0.27.0.json@3557a62b4507c55a47d8cde0683195b14d13c41dda66d0f0b0e111aed107e2fe"
60+
"https://plugins.dprint.dev/typescript-0.90.0.wasm",
61+
"https://plugins.dprint.dev/json-0.19.2.wasm",
62+
"https://plugins.dprint.dev/prettier-0.39.0.json@896b70f29ef8213c1b0ba81a93cee9c2d4f39ac2194040313cd433906db7bc7c"
6163
]
6264
}
File renamed without changes.

.eslintrc.json

+27-22
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@
1717
],
1818
"plugins": [
1919
"@typescript-eslint",
20-
"no-null",
21-
"eslint-plugin-local",
22-
"simple-import-sort"
20+
"eslint-plugin-local"
2321
],
2422
"ignorePatterns": [
2523
"**/node_modules/**",
@@ -61,6 +59,18 @@
6159
"prefer-object-spread": "error",
6260
"unicode-bom": ["error", "never"],
6361

62+
"no-restricted-syntax": [
63+
"error",
64+
{
65+
"selector": "Literal[raw=null]",
66+
"message": "Avoid using null; use undefined instead."
67+
},
68+
{
69+
"selector": "TSNullKeyword",
70+
"message": "Avoid using null; use undefined instead."
71+
}
72+
],
73+
6474
// Enabled in eslint:recommended, but not applicable here
6575
"no-extra-boolean-cast": "off",
6676
"no-case-declarations": "off",
@@ -82,6 +92,10 @@
8292
{ "selector": "property", "format": null }
8393
],
8494

95+
"@typescript-eslint/unified-signatures": "error",
96+
"no-unused-expressions": "off",
97+
"@typescript-eslint/no-unused-expressions": ["error", { "allowTernary": true }],
98+
8599
// Rules enabled in typescript-eslint configs that are not applicable here
86100
"@typescript-eslint/ban-ts-comment": "off",
87101
"@typescript-eslint/class-literal-property-style": "off",
@@ -105,9 +119,15 @@
105119
}
106120
}
107121
],
108-
109-
// Todo: For each of these, investigate whether we want to enable them ✨
110-
"@typescript-eslint/no-unused-vars": "off",
122+
"@typescript-eslint/no-unused-vars": [
123+
"warn",
124+
{
125+
// Ignore: (solely underscores | starting with exactly one underscore)
126+
"argsIgnorePattern": "^(_+$|_[^_])",
127+
"varsIgnorePattern": "^(_+$|_[^_])"
128+
}
129+
],
130+
"@typescript-eslint/no-inferrable-types": "off",
111131

112132
// Pending https://github.com/typescript-eslint/typescript-eslint/issues/4820
113133
"@typescript-eslint/prefer-optional-chain": "off",
@@ -124,14 +144,7 @@
124144
"local/no-in-operator": "error",
125145
"local/debug-assert": "error",
126146
"local/no-keywords": "error",
127-
"local/jsdoc-format": "error",
128-
129-
// eslint-plugin-no-null
130-
"no-null/no-null": "error",
131-
132-
// eslint-plugin-simple-import-sort
133-
"simple-import-sort/imports": "error",
134-
"simple-import-sort/exports": "error"
147+
"local/jsdoc-format": "error"
135148
},
136149
"overrides": [
137150
// By default, the ESLint CLI only looks at .js files. But, it will also look at
@@ -158,14 +171,6 @@
158171
{ "name": "exports" }
159172
]
160173
}
161-
},
162-
{
163-
// These files contain imports in a specific order that are generally unsafe to modify.
164-
"files": ["**/_namespaces/**"],
165-
"rules": {
166-
"simple-import-sort/imports": "off",
167-
"simple-import-sort/exports": "off"
168-
}
169174
}
170175
]
171176
}

.github/ISSUE_TEMPLATE/bug_report.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@ description: 'Create a report to help us improve TypeScript'
33
body:
44
- type: markdown
55
attributes:
6-
value: Please fill in each section completely. Thank you!
6+
value: |
7+
🔍 Please [search thoroughly in GitHub](https://github.com/Microsoft/TypeScript/search?type=Issues) or by the query `site:github.com/microsoft/TypeScript <your keywords>` in your favorite search engine before reporting a new bug as most bugs are very likely to find precedents.
8+
9+
Please fill in each section completely. Thank you!
710
- type: textarea
811
id: search_terms
912
attributes:

.github/ISSUE_TEMPLATE/config.yml

+15-15
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
---
2-
blank_issues_enabled: false
3-
contact_links:
4-
- about: 'Please ask and answer usage questions on Stack Overflow.'
5-
name: Question
6-
url: 'https://stackoverflow.com/questions/tagged/typescript'
7-
- about: 'Alternatively, you can use the TypeScript Community Discord.'
8-
name: Chat
9-
url: 'https://discord.gg/typescript'
10-
- about: 'Please check the FAQ before filing new issues'
11-
name: 'TypeScript FAQ'
12-
url: 'https://github.com/microsoft/TypeScript/wiki/FAQ'
13-
- about: 'Please raise issues about the site on its own repo.'
14-
name: Website
15-
url: 'https://github.com/microsoft/TypeScript-Website/issues/new'
1+
---
2+
blank_issues_enabled: false
3+
contact_links:
4+
- about: 'Please ask and answer usage questions on Stack Overflow.'
5+
name: Question
6+
url: 'https://stackoverflow.com/questions/tagged/typescript'
7+
- about: 'Alternatively, you can use the TypeScript Community Discord.'
8+
name: Chat
9+
url: 'https://discord.gg/typescript'
10+
- about: 'Please check the FAQ before filing new issues'
11+
name: 'TypeScript FAQ'
12+
url: 'https://github.com/microsoft/TypeScript/wiki/FAQ'
13+
- about: 'Please raise issues about the site on its own repo.'
14+
name: Website
15+
url: 'https://github.com/microsoft/TypeScript-Website/issues/new'

.github/ISSUE_TEMPLATE/feature_request.yml

+10-5
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,22 @@ description: 'Suggest an idea'
33
body:
44
- type: markdown
55
attributes:
6-
value: 'Please fill in each section completely. Thank you!'
6+
value: |
7+
💡 Did you know? TypeScript has over 2,000 open suggestions!
8+
9+
🔎 Please [search thoroughly in GitHub](https://github.com/Microsoft/TypeScript/search?type=Issues) or by the query `site:github.com/microsoft/TypeScript <your keywords>` in your favorite search engine before logging new feature requests as most common ideas already have a proposal in progress.
10+
11+
The "Common Feature Requests" section of the FAQ lists many popular requests: https://github.com/Microsoft/TypeScript/wiki/FAQ#common-feature-requests
12+
13+
Please fill in each section completely. Thank you!
714
- type: textarea
815
id: search_terms
916
attributes:
1017
label: '🔍 Search Terms'
1118
description: |
12-
💡 Did you know? TypeScript has over 2,000 open suggestions!
19+
What search terms did you use when trying to find an existing suggestion?
1320
14-
🔎 Please search thoroughly before logging new feature requests as most common ideas already have a proposal in progress.
15-
16-
The "Common Feature Requests" section of the FAQ lists many popular requests: https://github.com/Microsoft/TypeScript/wiki/FAQ#common-feature-requests
21+
List them here so people in the future can find this one more easily.
1722
placeholder: |
1823
List of keywords you searched for before creating this issue. Write them down here so that others can find this suggestion more easily and help provide feedback.
1924

.github/ISSUE_TEMPLATE/lib_change.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: 'Library change'
2-
description: 'Fix or improve issues with built-in type definitions like `lib.dom.d.ts`, `lib.es6.d.ts`, etc.'
2+
description: 'Fix or improve issues with built-in type definitions like `lib.es6.d.ts`, etc.'
33
body:
44
- type: markdown
55
attributes:

.github/workflow-resources/.lsifrc.json

-6
This file was deleted.

.github/workflows/accept-baselines-fix-lints.yaml

+4-2
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,12 @@ jobs:
1717
runs-on: ubuntu-latest
1818

1919
steps:
20-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
20+
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
2121
with:
2222
token: ${{ secrets.TS_BOT_GITHUB_TOKEN }}
23-
- uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
23+
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
24+
with:
25+
node-version: 'lts/*'
2426

2527
- name: Configure Git, Run Tests, Update Baselines, Apply Fixes
2628
run: |

0 commit comments

Comments
 (0)