Skip to content

Commit b618196

Browse files
committed
Merge remote-tracking branch 'origin/main' into fix/mapped-type-dts-emit-type-param-constraint
2 parents eb0e1e0 + efc9c06 commit b618196

File tree

5,664 files changed

+580449
-182081
lines changed

Some content is hidden

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

5,664 files changed

+580449
-182081
lines changed

.c8rc.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
"include": ["src/**", "built/local/**"],
55
"exclude": ["**/node_modules/**"],
66
"mergeAsync": true
7-
}
7+
}

.devcontainer/Dockerfile

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.154.0/containers/javascript-node/.devcontainer/base.Dockerfile
1+
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/blob/v0.245.2/containers/javascript-node/.devcontainer/base.Dockerfile
22

3-
# [Choice] Node.js version: 14, 12, 10
4-
ARG VARIANT="14-buster"
3+
# [Choice] Node.js version: 18, 16, 14
4+
ARG VARIANT="18-buster"
55
FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:0-${VARIANT}
66

77
RUN sudo -u node npm install -g hereby

.devcontainer/devcontainer.json

+16-11
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,25 @@
33
"build": {
44
"dockerfile": "Dockerfile",
55
"args": {
6-
"VARIANT": "14"
6+
"VARIANT": "18"
77
}
88
},
9-
"settings": {
10-
"terminal.integrated.defaultProfile.linux": "bash",
11-
"terminal.integrated.profiles.linux": {
12-
"bash": {
13-
"path": "/bin/bash",
14-
"icon": "terminal-bash",
9+
"customizations": {
10+
"vscode": {
11+
"settings": {
12+
"terminal.integrated.defaultProfile.linux": "bash",
13+
"terminal.integrated.profiles.linux": {
14+
"bash": {
15+
"path": "/bin/bash",
16+
"icon": "terminal-bash"
17+
}
18+
}
1519
},
16-
},
20+
"extensions": [
21+
"dbaeumer.vscode-eslint",
22+
"dprint.dprint"
23+
]
24+
}
1725
},
18-
"extensions": [
19-
"dbaeumer.vscode-eslint"
20-
],
2126
"remoteUser": "node"
2227
}

.dprint.jsonc

+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
{
2+
"indentWidth": 4,
3+
"lineWidth": 1000,
4+
"newLineKind": "auto",
5+
"useTabs": false,
6+
"typescript": {
7+
"newLineKind": "crlf",
8+
"semiColons": "always",
9+
"quoteStyle": "preferDouble",
10+
"quoteProps": "consistent",
11+
"useBraces": "whenNotSingleLine",
12+
"bracePosition": "sameLineUnlessHanging",
13+
"singleBodyPosition": "sameLine",
14+
"nextControlFlowPosition": "nextLine", // Stroustrup style braces.
15+
"trailingCommas": "onlyMultiLine",
16+
"preferHanging": false,
17+
"operatorPosition": "maintain",
18+
19+
"arrowFunction.useParentheses": "preferNone",
20+
"conditionalExpression.linePerExpression": false, // Keep our "match/case"-ish conditionals.
21+
"functionExpression.spaceAfterFunctionKeyword": true,
22+
"importDeclaration.forceMultiLine": true,
23+
"constructorType.spaceAfterNewKeyword": true,
24+
"constructSignature.spaceAfterNewKeyword": true,
25+
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"
31+
},
32+
"prettier": {
33+
"associations": [
34+
"**/*.{yaml,yml}"
35+
],
36+
"yml.tabWidth": 2,
37+
"yaml.tabWidth": 2,
38+
"yml.singleQuote": true,
39+
"yaml.singleQuote": true
40+
},
41+
"json": {
42+
// This would be good to do in known-JSONC files, but VS Code warns on trailing commas.
43+
"trailingCommas": "never"
44+
},
45+
"excludes": [
46+
"**/node_modules",
47+
"**/*-lock.json",
48+
"coverage/**",
49+
"lib/**",
50+
"built/**",
51+
"tests/**",
52+
"internal/**",
53+
"**/*.generated.*",
54+
"scripts/*.d.*"
55+
],
56+
// Note: if adding new languages, make sure settings.template.json is updated too.
57+
"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"
61+
]
62+
}

.eslintplugin.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ const path = require("path");
33

44
const rulesDir = path.join(__dirname, "scripts", "eslint", "rules");
55
const ext = ".cjs";
6-
const ruleFiles = fs.readdirSync(rulesDir).filter((p) => p.endsWith(ext));
6+
const ruleFiles = fs.readdirSync(rulesDir).filter(p => p.endsWith(ext));
77

88
module.exports = {
9-
rules: Object.fromEntries(ruleFiles.map((p) => {
9+
rules: Object.fromEntries(ruleFiles.map(p => {
1010
return [p.slice(0, -ext.length), require(path.join(rulesDir, p))];
1111
})),
12-
}
12+
};

.eslintrc.json

+22-36
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@
1616
"plugin:@typescript-eslint/stylistic"
1717
],
1818
"plugins": [
19-
"@typescript-eslint", "no-null", "eslint-plugin-local", "simple-import-sort"
19+
"@typescript-eslint",
20+
"no-null",
21+
"eslint-plugin-local",
22+
"simple-import-sort"
2023
],
2124
"ignorePatterns": [
2225
"**/node_modules/**",
@@ -84,18 +87,26 @@
8487
"@typescript-eslint/class-literal-property-style": "off",
8588
"@typescript-eslint/consistent-indexed-object-style": "off",
8689
"@typescript-eslint/no-duplicate-enum-values": "off",
90+
"@typescript-eslint/no-empty-function": "off",
8791
"@typescript-eslint/no-namespace": "off",
8892
"@typescript-eslint/no-non-null-asserted-optional-chain": "off",
8993
"@typescript-eslint/no-var-requires": "off",
9094
"@typescript-eslint/no-empty-interface": "off",
9195
"@typescript-eslint/no-explicit-any": "off",
96+
"@typescript-eslint/ban-types": [
97+
"error",
98+
{
99+
"extendDefaults": true,
100+
"types": {
101+
// This is theoretically good, but ts-eslint appears to mistake our declaration of Symbol for the global Symbol type.
102+
// See: https://github.com/typescript-eslint/typescript-eslint/issues/7306
103+
"Symbol": false,
104+
"{}": false // {} is a totally useful and valid type.
105+
}
106+
}
107+
],
92108

93109
// Todo: For each of these, investigate whether we want to enable them ✨
94-
"@typescript-eslint/ban-types": "off",
95-
"no-useless-escape": "off",
96-
"prefer-rest-params": "off",
97-
"prefer-spread": "off",
98-
"@typescript-eslint/no-empty-function": "off",
99110
"@typescript-eslint/no-unused-vars": "off",
100111

101112
// Pending https://github.com/typescript-eslint/typescript-eslint/issues/4820
@@ -105,7 +116,7 @@
105116
"local/only-arrow-functions": [
106117
"error",
107118
{
108-
"allowNamedFunctions": true ,
119+
"allowNamedFunctions": true,
109120
"allowDeclarations": true
110121
}
111122
],
@@ -120,38 +131,12 @@
120131

121132
// eslint-plugin-simple-import-sort
122133
"simple-import-sort/imports": "error",
123-
"simple-import-sort/exports": "error",
124-
125-
// Formatting rules; remove once a formatter enforces these.
126-
"curly": ["error", "multi-line"],
127-
"linebreak-style": ["error", "windows"],
128-
"max-statements-per-line": ["error", { "max": 1 }],
129-
"new-parens": "error",
130-
"no-trailing-spaces": "error",
131-
"quote-props": ["error", "consistent-as-needed"],
132-
"space-in-parens": "error",
133-
"@typescript-eslint/brace-style": ["error", "stroustrup", { "allowSingleLine": true }],
134-
"@typescript-eslint/no-extra-semi": "error",
135-
"@typescript-eslint/quotes": ["error", "double", { "avoidEscape": true, "allowTemplateLiterals": true }],
136-
"@typescript-eslint/semi": "error",
137-
"@typescript-eslint/space-before-function-paren": [
138-
"error",
139-
{
140-
"asyncArrow": "always",
141-
"anonymous": "always",
142-
"named": "never"
143-
}
144-
],
145-
"local/object-literal-surrounding-space": "error",
146-
"local/no-type-assertion-whitespace": "error",
147-
"local/type-operator-spacing": "error",
148-
"local/no-double-space": "error",
149-
"local/simple-indent": "error"
134+
"simple-import-sort/exports": "error"
150135
},
151136
"overrides": [
152137
// By default, the ESLint CLI only looks at .js files. But, it will also look at
153138
// any files which are referenced in an override config. Most users of typescript-eslint
154-
// get this behavior by default by extending a recommended typescript-eslint config, which
139+
// get this behavior by default by extending a recommended typescript-eslint config, which
155140
// just so happens to override some core ESLint rules. We don't extend from any config, so
156141
// explicitly reference TS files here so the CLI picks them up.
157142
//
@@ -164,7 +149,8 @@
164149
"files": ["*.mjs", "*.mts"],
165150
"rules": {
166151
// These globals don't exist outside of CJS files.
167-
"no-restricted-globals": ["error",
152+
"no-restricted-globals": [
153+
"error",
168154
{ "name": "__filename" },
169155
{ "name": "__dirname" },
170156
{ "name": "require" },

.git-blame-ignore-revs

+2
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,5 @@ b6c053882696af8ddd94a600429f30584d303d7f
66
9a0b85ce2a3f85f498ab2c05474b4c0b96b111c9
77
# Generated module conversion step - unindent
88
94724a8c2e68a4c7e267072ca79971f317c45e4a
9+
# dprint
10+
5e8c261b6ab746213f19ee3501eb8c48a6215dd7

.github/ISSUE_TEMPLATE/Bug_report.md

-73
This file was deleted.

.github/ISSUE_TEMPLATE/Feature_request.md

-61
This file was deleted.

0 commit comments

Comments
 (0)