Skip to content

Commit 31519c3

Browse files
committed
Merge remote-tracking branch 'origin/main' into fix/concrete-obj-assignable-to-partially-concrete-constraint-of-mapped-type
# Conflicts: # src/compiler/checker.ts
2 parents 8d329ae + 2a37eb2 commit 31519c3

File tree

49,196 files changed

+2275171
-1690816
lines changed

Some content is hidden

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

49,196 files changed

+2275171
-1690816
lines changed

.c8rc.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"reporter": ["lcovonly", "cobertura"],
3+
"src": "src",
4+
"include": ["src/**", "built/local/**"],
5+
"exclude": ["**/node_modules/**"],
6+
"mergeAsync": true
7+
}

.devcontainer/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
ARG VARIANT="14-buster"
55
FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:0-${VARIANT}
66

7-
RUN sudo -u node npm install -g gulp-cli
7+
RUN sudo -u node npm install -g hereby

.dockerignore

Lines changed: 0 additions & 48 deletions
This file was deleted.

.eslintignore

Lines changed: 0 additions & 4 deletions
This file was deleted.

.eslintplugin.js

Lines changed: 12 additions & 0 deletions
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 = ".cjs";
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

Lines changed: 73 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2+
"root": true,
23
"parser": "@typescript-eslint/parser",
34
"parserOptions": {
45
"warnOnUnsupportedTypeScriptVersion": false,
5-
"ecmaVersion": 6,
66
"sourceType": "module"
77
},
88
"env": {
@@ -11,11 +11,26 @@
1111
"es6": true
1212
},
1313
"plugins": [
14-
"@typescript-eslint", "jsdoc", "no-null", "import"
14+
"@typescript-eslint", "no-null", "import", "eslint-plugin-local", "simple-import-sort"
15+
],
16+
"ignorePatterns": [
17+
"**/node_modules/**",
18+
"/built/**",
19+
"/tests/**",
20+
"/lib/**",
21+
"/src/lib/*.generated.d.ts",
22+
"/scripts/**/*.js",
23+
"/scripts/**/*.d.*",
24+
"/internal/**",
25+
"/coverage/**"
1526
],
1627
"rules": {
28+
"simple-import-sort/imports": "error",
29+
"simple-import-sort/exports": "error",
30+
1731
"@typescript-eslint/adjacent-overload-signatures": "error",
1832
"@typescript-eslint/array-type": "error",
33+
"@typescript-eslint/no-array-constructor": "error",
1934

2035
"brace-style": "off",
2136
"@typescript-eslint/brace-style": ["error", "stroustrup", { "allowSingleLine": true }],
@@ -27,8 +42,8 @@
2742
{ "selector": "variable", "format": ["camelCase", "PascalCase", "UPPER_CASE"], "leadingUnderscore": "allow", "filter": { "regex": "^(_{1,2}filename|_{1,2}dirname|_+|[A-Za-z]+_[A-Za-z]+)$", "match": false } },
2843
{ "selector": "function", "format": ["camelCase", "PascalCase"], "leadingUnderscore": "allow", "filter": { "regex": "^[A-Za-z]+_[A-Za-z]+$", "match": false } },
2944
{ "selector": "parameter", "format": ["camelCase"], "leadingUnderscore": "allow", "filter": { "regex": "^(_+|[A-Za-z]+_[A-Z][a-z]+)$", "match": false } },
30-
{ "selector": "method", "format": ["camelCase", "PascalCase"], "leadingUnderscore": "allow", "filter": { "regex": "^[A-Za-z]+_[A-Za-z]+$", "match": false } },
31-
{ "selector": "memberLike", "format": ["camelCase"], "leadingUnderscore": "allow", "filter": { "regex": "^[A-Za-z]+_[A-Za-z]+$", "match": false } },
45+
{ "selector": "method", "format": ["camelCase", "PascalCase"], "leadingUnderscore": "allow", "filter": { "regex": "^([0-9]+|[A-Za-z]+_[A-Za-z]+)$", "match": false } },
46+
{ "selector": "memberLike", "format": ["camelCase"], "leadingUnderscore": "allow", "filter": { "regex": "^([0-9]+|[A-Za-z]+_[A-Za-z]+)$", "match": false } },
3247
{ "selector": "enumMember", "format": ["camelCase", "PascalCase"], "leadingUnderscore": "allow", "filter": { "regex": "^[A-Za-z]+_[A-Za-z]+$", "match": false } },
3348
{ "selector": "property", "format": null }
3449
],
@@ -51,12 +66,14 @@
5166
"@typescript-eslint/prefer-for-of": "error",
5267
"@typescript-eslint/prefer-function-type": "error",
5368
"@typescript-eslint/prefer-namespace-keyword": "error",
69+
"@typescript-eslint/prefer-as-const": "error",
5470

5571
"quotes": "off",
5672
"@typescript-eslint/quotes": ["error", "double", { "avoidEscape": true, "allowTemplateLiterals": true }],
5773

5874
"semi": "off",
5975
"@typescript-eslint/semi": "error",
76+
"@typescript-eslint/no-extra-semi": "error",
6077

6178
"space-before-function-paren": "off",
6279
"@typescript-eslint/space-before-function-paren": ["error", {
@@ -69,31 +86,30 @@
6986
"@typescript-eslint/type-annotation-spacing": "error",
7087
"@typescript-eslint/unified-signatures": "error",
7188

89+
"@typescript-eslint/no-extra-non-null-assertion": "error",
90+
7291
// 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", {
92+
"local/object-literal-surrounding-space": "error",
93+
"local/no-type-assertion-whitespace": "error",
94+
"local/type-operator-spacing": "error",
95+
"local/only-arrow-functions": ["error", {
7796
"allowNamedFunctions": true ,
7897
"allowDeclarations": true
7998
}],
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",
99+
"local/no-double-space": "error",
100+
"local/argument-trivia": "error",
101+
"local/no-in-operator": "error",
102+
"local/simple-indent": "error",
103+
"local/debug-assert": "error",
104+
"local/no-keywords": "error",
105+
"local/jsdoc-format": "error",
87106

88107
// eslint-plugin-import
89108
"import/no-extraneous-dependencies": ["error", { "optionalDependencies": false }],
90109

91110
// eslint-plugin-no-null
92111
"no-null/no-null": "error",
93112

94-
// eslint-plugin-jsdoc
95-
"jsdoc/check-alignment": "error",
96-
97113
// eslint
98114
"constructor-super": "error",
99115
"curly": ["error", "multi-line"],
@@ -132,6 +148,43 @@
132148
"quote-props": ["error", "consistent-as-needed"],
133149
"space-in-parens": "error",
134150
"unicode-bom": ["error", "never"],
135-
"use-isnan": "error"
136-
}
151+
"use-isnan": "error",
152+
"no-prototype-builtins": "error",
153+
"no-self-assign": "error",
154+
"no-dupe-else-if": "error"
155+
},
156+
"overrides": [
157+
// By default, the ESLint CLI only looks at .js files. But, it will also look at
158+
// any files which are referenced in an override config. Most users of typescript-eslint
159+
// get this behavior by default by extending a recommended typescript-eslint config, which
160+
// just so happens to override some core ESLint rules. We don't extend from any config, so
161+
// explicitly reference TS files here so the CLI picks them up.
162+
//
163+
// ESLint in VS Code will lint any opened file (so long as it's not eslintignore'd), so
164+
// that will work regardless of the below.
165+
//
166+
// The same applies to mjs files; ESLint appears to not scan those either.
167+
{ "files": ["*.ts", "*.mts", "*.cts", "*.mjs", "*.cjs"] },
168+
{
169+
"files": ["*.mjs", "*.mts"],
170+
"rules": {
171+
// These globals don't exist outside of CJS files.
172+
"no-restricted-globals": ["error",
173+
{ "name": "__filename" },
174+
{ "name": "__dirname" },
175+
{ "name": "require" },
176+
{ "name": "module" },
177+
{ "name": "exports" }
178+
]
179+
}
180+
},
181+
{
182+
// These files contain imports in a specific order that are generally unsafe to modify.
183+
"files": ["**/_namespaces/**"],
184+
"rules": {
185+
"simple-import-sort/imports": "off",
186+
"simple-import-sort/exports": "off"
187+
}
188+
}
189+
]
137190
}

.git-blame-ignore-revs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Generated module conversion step - inlineImports
2+
07758c08ab72481885e662c98d67a0e3a071b032
3+
# Generated module conversion step - stripNamespaces
4+
b6c053882696af8ddd94a600429f30584d303d7f
5+
# Generated module conversion step - explicitify
6+
9a0b85ce2a3f85f498ab2c05474b4c0b96b111c9
7+
# Generated module conversion step - unindent
8+
94724a8c2e68a4c7e267072ca79971f317c45e4a

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
*.js linguist-language=TypeScript
2+
**/*.json linguist-language=jsonc
23
* -text

.github/ISSUE_TEMPLATE/Bug_report.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,18 +43,16 @@ Please keep and fill in the line that best applies:
4343
### ⏯ Playground Link
4444

4545
<!--
46-
A link to a TypeScript Playground "Share" link which shows this behavior
47-
48-
The TypeScript Workbench can be used for more complex setups, try
49-
https://www.typescriptlang.org/dev/bug-workbench/
46+
A link to a TypeScript Playground "Share" link which shows this behavior.
47+
This should have the same code as the code snippet below, and use whichever settings are relevant to your report.
5048
5149
As a last resort, you can link to a repo, but these will be slower for us to investigate.
5250
-->
5351
[Playground link with relevant code](https://www.typescriptlang.org/play?#code/PTAEFkE9QYwewCYFNQHM5IM6gBZIE5JA)
5452

5553
### 💻 Code
5654

57-
<!-- Please post the relevant code sample here as well-->
55+
<!-- Please post the relevant code sample here as well. This code and the Playground code should be the same, do not use separate examples -->
5856
```ts
5957
// We can quickly address your report if:
6058
// - The code sample is short. Nearly all TypeScript bugs can be demonstrated in 20-30 lines of code!
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
name : CodeQL Configuration
22

33
paths:
4-
- './src'
4+
- src
5+
- scripts
6+
- Herebyfile.mjs
7+
paths-ignore:
8+
- src/lib

0 commit comments

Comments
 (0)