Skip to content

Commit b778ed1

Browse files
Merge commit 'e936eb13d2900f21d79553c32a704307c7ad03dd' into release-5.2
2 parents 10b9962 + e936eb1 commit b778ed1

File tree

717 files changed

+16206
-5001
lines changed

Some content is hidden

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

717 files changed

+16206
-5001
lines changed

.eslintrc.json

+99-94
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,13 @@
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", "simple-import-sort"
19+
"@typescript-eslint", "no-null", "eslint-plugin-local", "simple-import-sort"
1520
],
1621
"ignorePatterns": [
1722
"**/node_modules/**",
@@ -25,16 +30,42 @@
2530
"/coverage/**"
2631
],
2732
"rules": {
28-
"simple-import-sort/imports": "error",
29-
"simple-import-sort/exports": "error",
30-
31-
"@typescript-eslint/adjacent-overload-signatures": "error",
32-
"@typescript-eslint/array-type": "error",
33-
"@typescript-eslint/no-array-constructor": "error",
33+
// eslint
34+
"dot-notation": "error",
35+
"eqeqeq": "error",
36+
"no-caller": "error",
37+
"no-constant-condition": ["error", { "checkLoops": false }],
38+
"no-eval": "error",
39+
"no-extra-bind": "error",
40+
"no-new-func": "error",
41+
"no-new-wrappers": "error",
42+
"no-return-await": "error",
43+
"no-restricted-globals": [
44+
"error",
45+
{ "name": "setTimeout" },
46+
{ "name": "clearTimeout" },
47+
{ "name": "setInterval" },
48+
{ "name": "clearInterval" },
49+
{ "name": "setImmediate" },
50+
{ "name": "clearImmediate" }
51+
],
52+
"no-template-curly-in-string": "error",
53+
"no-throw-literal": "error",
54+
"no-undef-init": "error",
55+
"no-var": "error",
56+
"object-shorthand": "error",
57+
"prefer-const": "error",
58+
"prefer-object-spread": "error",
59+
"unicode-bom": ["error", "never"],
3460

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

68+
// @typescript-eslint/eslint-plugin
3869
"@typescript-eslint/naming-convention": [
3970
"error",
4071
{ "selector": "typeLike", "format": ["PascalCase"], "filter": { "regex": "^(__String|[A-Za-z]+_[A-Za-z]+)$", "match": false } },
@@ -48,110 +79,84 @@
4879
{ "selector": "property", "format": null }
4980
],
5081

51-
"@typescript-eslint/consistent-type-definitions": ["error", "interface"],
52-
"@typescript-eslint/consistent-type-assertions": ["error", { "assertionStyle": "as" }],
53-
54-
"max-statements-per-line": ["error", { "max": 1 }],
55-
56-
"no-duplicate-imports": "off",
57-
"@typescript-eslint/no-duplicate-imports": "error",
58-
59-
"@typescript-eslint/no-inferrable-types": "error",
60-
"@typescript-eslint/no-misused-new": "error",
61-
"@typescript-eslint/no-this-alias": "error",
62-
63-
"no-unused-expressions": "off",
64-
"@typescript-eslint/no-unused-expressions": ["error", { "allowTernary": true }],
65-
66-
"@typescript-eslint/prefer-for-of": "error",
67-
"@typescript-eslint/prefer-function-type": "error",
68-
"@typescript-eslint/prefer-namespace-keyword": "error",
69-
"@typescript-eslint/prefer-as-const": "error",
70-
71-
"quotes": "off",
72-
"@typescript-eslint/quotes": ["error", "double", { "avoidEscape": true, "allowTemplateLiterals": true }],
73-
74-
"semi": "off",
75-
"@typescript-eslint/semi": "error",
76-
"@typescript-eslint/no-extra-semi": "error",
77-
78-
"space-before-function-paren": "off",
79-
"@typescript-eslint/space-before-function-paren": ["error", {
80-
"asyncArrow": "always",
81-
"anonymous": "always",
82-
"named": "never"
83-
}],
82+
// Rules enabled in typescript-eslint configs that are not applicable here
83+
"@typescript-eslint/ban-ts-comment": "off",
84+
"@typescript-eslint/class-literal-property-style": "off",
85+
"@typescript-eslint/consistent-indexed-object-style": "off",
86+
"@typescript-eslint/no-duplicate-enum-values": "off",
87+
"@typescript-eslint/no-empty-function": "off",
88+
"@typescript-eslint/no-namespace": "off",
89+
"@typescript-eslint/no-non-null-asserted-optional-chain": "off",
90+
"@typescript-eslint/no-var-requires": "off",
91+
"@typescript-eslint/no-empty-interface": "off",
92+
"@typescript-eslint/no-explicit-any": "off",
93+
"@typescript-eslint/ban-types": [
94+
"error",
95+
{
96+
"extendDefaults": true,
97+
"types": {
98+
// This is theoretically good, but ts-eslint appears to mistake our declaration of Symbol for the global Symbol type.
99+
// See: https://github.com/typescript-eslint/typescript-eslint/issues/7306
100+
"Symbol": false,
101+
"{}": false // {} is a totally useful and valid type.
102+
}
103+
}
104+
],
84105

85-
"@typescript-eslint/triple-slash-reference": "error",
86-
"@typescript-eslint/type-annotation-spacing": "error",
87-
"@typescript-eslint/unified-signatures": "error",
106+
// Todo: For each of these, investigate whether we want to enable them ✨
107+
"prefer-rest-params": "off",
108+
"prefer-spread": "off",
109+
"@typescript-eslint/no-unused-vars": "off",
88110

89-
"@typescript-eslint/no-extra-non-null-assertion": "error",
111+
// Pending https://github.com/typescript-eslint/typescript-eslint/issues/4820
112+
"@typescript-eslint/prefer-optional-chain": "off",
90113

91114
// scripts/eslint/rules
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", {
96-
"allowNamedFunctions": true ,
97-
"allowDeclarations": true
98-
}],
99-
"local/no-double-space": "error",
115+
"local/only-arrow-functions": [
116+
"error",
117+
{
118+
"allowNamedFunctions": true ,
119+
"allowDeclarations": true
120+
}
121+
],
100122
"local/argument-trivia": "error",
101123
"local/no-in-operator": "error",
102-
"local/simple-indent": "error",
103124
"local/debug-assert": "error",
104125
"local/no-keywords": "error",
105126
"local/jsdoc-format": "error",
106127

107-
// eslint-plugin-import
108-
"import/no-extraneous-dependencies": ["error", { "optionalDependencies": false }],
109-
110128
// eslint-plugin-no-null
111129
"no-null/no-null": "error",
112130

113-
// eslint
114-
"constructor-super": "error",
131+
// eslint-plugin-simple-import-sort
132+
"simple-import-sort/imports": "error",
133+
"simple-import-sort/exports": "error",
134+
135+
// Formatting rules; remove once a formatter enforces these.
115136
"curly": ["error", "multi-line"],
116-
"dot-notation": "error",
117-
"eqeqeq": "error",
118137
"linebreak-style": ["error", "windows"],
138+
"max-statements-per-line": ["error", { "max": 1 }],
119139
"new-parens": "error",
120-
"no-caller": "error",
121-
"no-duplicate-case": "error",
122-
"no-empty": "error",
123-
"no-eval": "error",
124-
"no-extra-bind": "error",
125-
"no-fallthrough": "error",
126-
"no-new-func": "error",
127-
"no-new-wrappers": "error",
128-
"no-return-await": "error",
129-
"no-restricted-globals": ["error",
130-
{ "name": "setTimeout" },
131-
{ "name": "clearTimeout" },
132-
{ "name": "setInterval" },
133-
{ "name": "clearInterval" },
134-
{ "name": "setImmediate" },
135-
{ "name": "clearImmediate" }
136-
],
137-
"no-sparse-arrays": "error",
138-
"no-template-curly-in-string": "error",
139-
"no-throw-literal": "error",
140140
"no-trailing-spaces": "error",
141-
"no-undef-init": "error",
142-
"no-unsafe-finally": "error",
143-
"no-unused-labels": "error",
144-
"no-var": "error",
145-
"object-shorthand": "error",
146-
"prefer-const": "error",
147-
"prefer-object-spread": "error",
148141
"quote-props": ["error", "consistent-as-needed"],
149142
"space-in-parens": "error",
150-
"unicode-bom": ["error", "never"],
151-
"use-isnan": "error",
152-
"no-prototype-builtins": "error",
153-
"no-self-assign": "error",
154-
"no-dupe-else-if": "error"
143+
"@typescript-eslint/brace-style": ["error", "stroustrup", { "allowSingleLine": true }],
144+
"@typescript-eslint/no-extra-semi": "error",
145+
"@typescript-eslint/quotes": ["error", "double", { "avoidEscape": true, "allowTemplateLiterals": true }],
146+
"@typescript-eslint/semi": "error",
147+
"@typescript-eslint/space-before-function-paren": [
148+
"error",
149+
{
150+
"asyncArrow": "always",
151+
"anonymous": "always",
152+
"named": "never"
153+
}
154+
],
155+
"local/object-literal-surrounding-space": "error",
156+
"local/no-type-assertion-whitespace": "error",
157+
"local/type-operator-spacing": "error",
158+
"local/no-double-space": "error",
159+
"local/simple-indent": "error"
155160
},
156161
"overrides": [
157162
// By default, the ESLint CLI only looks at .js files. But, it will also look at

.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)