Skip to content

Commit 9f19e4c

Browse files
committed
Merge branch 'main' into no-objectAllocator
2 parents c6ffac9 + 4bfb4e6 commit 9f19e4c

File tree

51,634 files changed

+2935724
-1661636
lines changed

Some content is hidden

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

51,634 files changed

+2935724
-1661636
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: 3 additions & 3 deletions
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

Lines changed: 16 additions & 11 deletions
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

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
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": "whenMultiple",
23+
"constructorType.spaceAfterNewKeyword": true,
24+
"constructSignature.spaceAfterNewKeyword": true,
25+
26+
"module.sortImportDeclarations": "caseInsensitive",
27+
"module.sortExportDeclarations": "caseInsensitive",
28+
"exportDeclaration.sortNamedExports": "caseInsensitive",
29+
"importDeclaration.sortNamedImports": "caseInsensitive"
30+
},
31+
"prettier": {
32+
"newLineKind": "lf",
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+
"**/.git",
47+
"**/node_modules",
48+
"**/*-lock.json",
49+
"coverage/**",
50+
"lib/**",
51+
"built/**",
52+
"tests/**",
53+
"internal/**",
54+
"**/*.generated.*",
55+
"scripts/*.d.*",
56+
"**/_namespaces/**"
57+
],
58+
// Note: if adding new languages, make sure settings.template.json is updated too.
59+
"plugins": [
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"
63+
]
64+
}

.eslint-plugin-local.cjs

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+
};

.eslintplugin.js

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

.eslintrc.json

Lines changed: 88 additions & 106 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,15 @@
1010
"node": true,
1111
"es6": true
1212
},
13+
"extends": [
14+
"eslint:recommended",
15+
"plugin:@typescript-eslint/recommended",
16+
"plugin:@typescript-eslint/stylistic"
17+
],
1318
"plugins": [
14-
"@typescript-eslint", "no-null", "import", "eslint-plugin-local"
19+
"@typescript-eslint",
20+
"no-null",
21+
"eslint-plugin-local"
1522
],
1623
"ignorePatterns": [
1724
"**/node_modules/**",
@@ -25,19 +32,42 @@
2532
"/coverage/**"
2633
],
2734
"rules": {
28-
"sort-imports": ["error", {
29-
"ignoreCase": true,
30-
"ignoreDeclarationSort": true,
31-
"allowSeparatedGroups": true
32-
}],
33-
34-
"@typescript-eslint/adjacent-overload-signatures": "error",
35-
"@typescript-eslint/array-type": "error",
36-
"@typescript-eslint/no-array-constructor": "error",
35+
// eslint
36+
"dot-notation": "error",
37+
"eqeqeq": "error",
38+
"no-caller": "error",
39+
"no-constant-condition": ["error", { "checkLoops": false }],
40+
"no-eval": "error",
41+
"no-extra-bind": "error",
42+
"no-new-func": "error",
43+
"no-new-wrappers": "error",
44+
"no-return-await": "error",
45+
"no-restricted-globals": [
46+
"error",
47+
{ "name": "setTimeout" },
48+
{ "name": "clearTimeout" },
49+
{ "name": "setInterval" },
50+
{ "name": "clearInterval" },
51+
{ "name": "setImmediate" },
52+
{ "name": "clearImmediate" }
53+
],
54+
"no-template-curly-in-string": "error",
55+
"no-throw-literal": "error",
56+
"no-undef-init": "error",
57+
"no-var": "error",
58+
"object-shorthand": "error",
59+
"prefer-const": "error",
60+
"prefer-object-spread": "error",
61+
"unicode-bom": ["error", "never"],
3762

38-
"brace-style": "off",
39-
"@typescript-eslint/brace-style": ["error", "stroustrup", { "allowSingleLine": true }],
63+
// Enabled in eslint:recommended, but not applicable here
64+
"no-extra-boolean-cast": "off",
65+
"no-case-declarations": "off",
66+
"no-cond-assign": "off",
67+
"no-control-regex": "off",
68+
"no-inner-declarations": "off",
4069

70+
// @typescript-eslint/eslint-plugin
4171
"@typescript-eslint/naming-convention": [
4272
"error",
4373
{ "selector": "typeLike", "format": ["PascalCase"], "filter": { "regex": "^(__String|[A-Za-z]+_[A-Za-z]+)$", "match": false } },
@@ -51,115 +81,66 @@
5181
{ "selector": "property", "format": null }
5282
],
5383

54-
"@typescript-eslint/consistent-type-definitions": ["error", "interface"],
55-
"@typescript-eslint/consistent-type-assertions": ["error", { "assertionStyle": "as" }],
56-
57-
"max-statements-per-line": ["error", { "max": 1 }],
58-
59-
"no-duplicate-imports": "off",
60-
"@typescript-eslint/no-duplicate-imports": "error",
61-
62-
"@typescript-eslint/no-inferrable-types": "error",
63-
"@typescript-eslint/no-misused-new": "error",
64-
"@typescript-eslint/no-this-alias": "error",
65-
84+
"@typescript-eslint/unified-signatures": "error",
6685
"no-unused-expressions": "off",
6786
"@typescript-eslint/no-unused-expressions": ["error", { "allowTernary": true }],
6887

69-
"@typescript-eslint/prefer-for-of": "error",
70-
"@typescript-eslint/prefer-function-type": "error",
71-
"@typescript-eslint/prefer-namespace-keyword": "error",
72-
"@typescript-eslint/prefer-as-const": "error",
73-
74-
"quotes": "off",
75-
"@typescript-eslint/quotes": ["error", "double", { "avoidEscape": true, "allowTemplateLiterals": true }],
76-
77-
"semi": "off",
78-
"@typescript-eslint/semi": "error",
79-
"@typescript-eslint/no-extra-semi": "error",
80-
81-
"space-before-function-paren": "off",
82-
"@typescript-eslint/space-before-function-paren": ["error", {
83-
"asyncArrow": "always",
84-
"anonymous": "always",
85-
"named": "never"
86-
}],
87-
88-
"@typescript-eslint/triple-slash-reference": "error",
89-
"@typescript-eslint/type-annotation-spacing": "error",
90-
"@typescript-eslint/unified-signatures": "error",
88+
// Rules enabled in typescript-eslint configs that are not applicable here
89+
"@typescript-eslint/ban-ts-comment": "off",
90+
"@typescript-eslint/class-literal-property-style": "off",
91+
"@typescript-eslint/consistent-indexed-object-style": "off",
92+
"@typescript-eslint/no-duplicate-enum-values": "off",
93+
"@typescript-eslint/no-empty-function": "off",
94+
"@typescript-eslint/no-namespace": "off",
95+
"@typescript-eslint/no-non-null-asserted-optional-chain": "off",
96+
"@typescript-eslint/no-var-requires": "off",
97+
"@typescript-eslint/no-empty-interface": "off",
98+
"@typescript-eslint/no-explicit-any": "off",
99+
"@typescript-eslint/ban-types": [
100+
"error",
101+
{
102+
"extendDefaults": true,
103+
"types": {
104+
// This is theoretically good, but ts-eslint appears to mistake our declaration of Symbol for the global Symbol type.
105+
// See: https://github.com/typescript-eslint/typescript-eslint/issues/7306
106+
"Symbol": false,
107+
"{}": false // {} is a totally useful and valid type.
108+
}
109+
}
110+
],
111+
"@typescript-eslint/no-unused-vars": [
112+
"warn",
113+
{
114+
// Ignore: (solely underscores | starting with exactly one underscore)
115+
"argsIgnorePattern": "^(_+$|_[^_])",
116+
"varsIgnorePattern": "^(_+$|_[^_])"
117+
}
118+
],
91119

92-
"@typescript-eslint/no-extra-non-null-assertion": "error",
120+
// Pending https://github.com/typescript-eslint/typescript-eslint/issues/4820
121+
"@typescript-eslint/prefer-optional-chain": "off",
93122

94123
// scripts/eslint/rules
95-
"local/object-literal-surrounding-space": "error",
96-
"local/no-type-assertion-whitespace": "error",
97-
"local/type-operator-spacing": "error",
98-
"local/only-arrow-functions": ["error", {
99-
"allowNamedFunctions": true ,
100-
"allowDeclarations": true
101-
}],
102-
"local/no-double-space": "error",
103-
"local/boolean-trivia": "error",
124+
"local/only-arrow-functions": [
125+
"error",
126+
{
127+
"allowNamedFunctions": true,
128+
"allowDeclarations": true
129+
}
130+
],
131+
"local/argument-trivia": "error",
104132
"local/no-in-operator": "error",
105-
"local/simple-indent": "error",
106133
"local/debug-assert": "error",
107134
"local/no-keywords": "error",
108135
"local/jsdoc-format": "error",
109136

110-
// eslint-plugin-import
111-
"import/no-extraneous-dependencies": ["error", { "optionalDependencies": false }],
112-
113137
// eslint-plugin-no-null
114-
"no-null/no-null": "error",
115-
116-
// eslint
117-
"constructor-super": "error",
118-
"curly": ["error", "multi-line"],
119-
"dot-notation": "error",
120-
"eqeqeq": "error",
121-
"linebreak-style": ["error", "windows"],
122-
"new-parens": "error",
123-
"no-caller": "error",
124-
"no-duplicate-case": "error",
125-
"no-empty": "error",
126-
"no-eval": "error",
127-
"no-extra-bind": "error",
128-
"no-fallthrough": "error",
129-
"no-new-func": "error",
130-
"no-new-wrappers": "error",
131-
"no-return-await": "error",
132-
"no-restricted-globals": ["error",
133-
{ "name": "setTimeout" },
134-
{ "name": "clearTimeout" },
135-
{ "name": "setInterval" },
136-
{ "name": "clearInterval" },
137-
{ "name": "setImmediate" },
138-
{ "name": "clearImmediate" }
139-
],
140-
"no-sparse-arrays": "error",
141-
"no-template-curly-in-string": "error",
142-
"no-throw-literal": "error",
143-
"no-trailing-spaces": "error",
144-
"no-undef-init": "error",
145-
"no-unsafe-finally": "error",
146-
"no-unused-labels": "error",
147-
"no-var": "error",
148-
"object-shorthand": "error",
149-
"prefer-const": "error",
150-
"prefer-object-spread": "error",
151-
"quote-props": ["error", "consistent-as-needed"],
152-
"space-in-parens": "error",
153-
"unicode-bom": ["error", "never"],
154-
"use-isnan": "error",
155-
"no-prototype-builtins": "error",
156-
"no-self-assign": "error",
157-
"no-dupe-else-if": "error"
138+
"no-null/no-null": "error"
158139
},
159140
"overrides": [
160141
// By default, the ESLint CLI only looks at .js files. But, it will also look at
161142
// any files which are referenced in an override config. Most users of typescript-eslint
162-
// get this behavior by default by extending a recommended typescript-eslint config, which
143+
// get this behavior by default by extending a recommended typescript-eslint config, which
163144
// just so happens to override some core ESLint rules. We don't extend from any config, so
164145
// explicitly reference TS files here so the CLI picks them up.
165146
//
@@ -172,7 +153,8 @@
172153
"files": ["*.mjs", "*.mts"],
173154
"rules": {
174155
// These globals don't exist outside of CJS files.
175-
"no-restricted-globals": ["error",
156+
"no-restricted-globals": [
157+
"error",
176158
{ "name": "__filename" },
177159
{ "name": "__dirname" },
178160
{ "name": "require" },

.git-blame-ignore-revs

Lines changed: 2 additions & 0 deletions
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

.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

0 commit comments

Comments
 (0)