Skip to content

Commit 2d2a434

Browse files
authored
Reformat imports to be one identifier per line (#51565)
1 parent 8eed2ca commit 2d2a434

File tree

378 files changed

+16788
-2935
lines changed

Some content is hidden

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

378 files changed

+16788
-2935
lines changed

.eslintrc.json

+5
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@
1313
"@typescript-eslint", "no-null", "import", "eslint-plugin-local"
1414
],
1515
"rules": {
16+
"sort-imports": ["error", {
17+
"ignoreDeclarationSort": true,
18+
"allowSeparatedGroups": true
19+
}],
20+
1621
"@typescript-eslint/adjacent-overload-signatures": "error",
1722
"@typescript-eslint/array-type": "error",
1823
"@typescript-eslint/no-array-constructor": "error",

Herebyfile.mjs

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ import { task } from "hereby";
66
import _glob from "glob";
77
import util from "util";
88
import chalk from "chalk";
9-
import { exec, readJson, getDiffTool, getDirSize, memoize, needsUpdate, Debouncer, Deferred } from "./scripts/build/utils.mjs";
10-
import { runConsoleTests, refBaseline, localBaseline, refRwcBaseline, localRwcBaseline, cleanTestDirs } from "./scripts/build/tests.mjs";
11-
import { buildProject as realBuildProject, cleanProject, watchProject } from "./scripts/build/projects.mjs";
9+
import { Debouncer, Deferred, exec, getDiffTool, getDirSize, memoize, needsUpdate, readJson } from "./scripts/build/utils.mjs";
10+
import { cleanTestDirs, localBaseline, localRwcBaseline, refBaseline, refRwcBaseline, runConsoleTests } from "./scripts/build/tests.mjs";
11+
import { cleanProject, buildProject as realBuildProject, watchProject } from "./scripts/build/projects.mjs";
1212
import { localizationDirectories } from "./scripts/build/localization.mjs";
1313
import cmdLineOptions from "./scripts/build/options.mjs";
1414
import esbuild from "esbuild";

scripts/build/findUpDir.mjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { join, resolve, dirname } from "path";
1+
import { dirname, join, resolve } from "path";
22
import { existsSync } from "fs";
33
import url from "url";
44

scripts/build/projects.mjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { exec, Debouncer } from "./utils.mjs";
1+
import { Debouncer, exec } from "./utils.mjs";
22
import { resolve } from "path";
33
import { findUpRoot } from "./findUpDir.mjs";
44
import cmdLineOptions from "./options.mjs";

src/compiler/binder.ts

+295-58
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,299 @@
11
import {
2-
__String, AccessExpression, addRelatedInfo, append, appendIfUnique, ArrayBindingElement, ArrayLiteralExpression,
3-
ArrowFunction, AssignmentDeclarationKind, BinaryExpression, BinaryOperatorToken, BindableAccessExpression,
4-
BindableObjectDefinePropertyCall, BindablePropertyAssignmentExpression, BindableStaticAccessExpression,
5-
BindableStaticNameExpression, BindableStaticPropertyAssignmentExpression, BindingElement, Block,
6-
BreakOrContinueStatement, CallChain, CallExpression, CaseBlock, CaseClause, cast, CatchClause, ClassLikeDeclaration,
7-
ClassStaticBlockDeclaration, CompilerOptions, concatenate, ConditionalExpression, ConditionalTypeNode, contains,
8-
createBinaryExpressionTrampoline, createDiagnosticForNodeInSourceFile, createFileDiagnostic, createQueue,
9-
createSymbolTable, Debug, Declaration, declarationNameToString, DeleteExpression, DestructuringAssignment,
10-
DiagnosticCategory, DiagnosticMessage, DiagnosticRelatedInformation, Diagnostics, DiagnosticWithLocation,
11-
DoStatement, DynamicNamedDeclaration, ElementAccessChain, ElementAccessExpression, EntityNameExpression,
12-
EnumDeclaration, escapeLeadingUnderscores, every, ExportAssignment, exportAssignmentIsAlias,
13-
ExportDeclaration, ExportSpecifier, Expression, ExpressionStatement, findAncestor, FlowFlags, FlowLabel, FlowNode,
14-
FlowReduceLabel, forEach, forEachChild, ForInOrOfStatement, ForStatement, FunctionDeclaration, FunctionExpression,
15-
FunctionLikeDeclaration, GetAccessorDeclaration, getAssignedExpandoInitializer, getAssignmentDeclarationKind,
16-
getAssignmentDeclarationPropertyAccessKind, getCombinedModifierFlags, getCombinedNodeFlags, getContainingClass,
17-
getEffectiveContainerForJSDocTemplateTag, getElementOrPropertyAccessName, getEmitScriptTarget,
18-
getEnclosingBlockScopeContainer, getErrorSpanForNode, getEscapedTextOfIdentifierOrLiteral, getExpandoInitializer,
19-
getHostSignatureFromJSDoc, getImmediatelyInvokedFunctionExpression, getJSDocTypeTag, getLeftmostAccessExpression,
20-
getNameOfDeclaration, getNameOrArgument, getNodeId, getRangesWhere, getRightMostAssignedExpression,
21-
getSourceFileOfNode, getSourceTextOfNodeFromSourceFile, getSpanOfTokenAtPosition, getStrictOptionValue,
22-
getSymbolNameForPrivateIdentifier, getTextOfIdentifierOrLiteral, getThisContainer, getTokenPosOfNode,
23-
hasDynamicName, hasJSDocNodes, hasSyntacticModifier, Identifier, idText, IfStatement, ImportClause,
24-
InternalSymbolName, isAliasableExpression, isAmbientModule, isAssignmentExpression, isAssignmentOperator,
25-
isAssignmentTarget, isAsyncFunction, isAutoAccessorPropertyDeclaration, isBinaryExpression,
26-
isBindableObjectDefinePropertyCall, isBindableStaticAccessExpression, isBindableStaticNameExpression,
27-
isBindingPattern, isBlock, isBlockOrCatchScoped, isCallExpression, isClassStaticBlockDeclaration,
28-
isConditionalTypeNode, isDeclaration, isDeclarationStatement, isDestructuringAssignment, isDottedName,
29-
isElementAccessExpression, isEmptyObjectLiteral, isEntityNameExpression, isEnumConst, isEnumDeclaration,
30-
isExportAssignment, isExportDeclaration, isExportsIdentifier, isExportSpecifier, isExpression,
31-
isExpressionOfOptionalChainRoot, isExternalModule, isExternalOrCommonJsModule, isForInOrOfStatement,
32-
isFunctionDeclaration, isFunctionLike, isFunctionLikeDeclaration, isFunctionLikeOrClassStaticBlockDeclaration,
33-
isFunctionSymbol, isGlobalScopeAugmentation, isIdentifier, isIdentifierName, isInJSFile, isInTopLevelContext,
34-
isJSDocConstructSignature, isJSDocEnumTag, isJSDocTemplateTag, isJSDocTypeAlias, isJsonSourceFile,
35-
isLeftHandSideExpression, isLogicalOrCoalescingAssignmentOperator, isModuleAugmentationExternal, isModuleBlock,
36-
isModuleDeclaration, isModuleExportsAccessExpression, isNamedDeclaration, isNamespaceExport, isNonNullExpression,
37-
isNullishCoalesce, isObjectLiteralExpression, isObjectLiteralMethod,
38-
isObjectLiteralOrClassExpressionMethodOrAccessor, isOmittedExpression, isOptionalChain, isOptionalChainRoot,
39-
isOutermostOptionalChain, isParameterDeclaration, isParameterPropertyDeclaration, isParenthesizedExpression,
40-
isPartOfTypeQuery, isPrefixUnaryExpression, isPrivateIdentifier, isPrologueDirective,
41-
isPropertyAccessEntityNameExpression, isPropertyAccessExpression, isPropertyNameLiteral, isPrototypeAccess,
42-
isPushOrUnshiftIdentifier, isRequireCall, isShorthandPropertyAssignment, isSignedNumericLiteral, isSourceFile,
43-
isSpecialPropertyDeclaration, isStatement, isStatementButNotDeclaration, isStatic, isString, isStringLiteralLike,
44-
isStringOrNumericLiteralLike, isThisInitializedDeclaration, isTypeAliasDeclaration, isTypeOfExpression,
45-
isVariableDeclaration, isVariableDeclarationInitializedToBareOrAccessedRequire, isVariableStatement,
46-
JSDocCallbackTag, JSDocClassTag, JSDocEnumTag, JSDocFunctionType, JSDocParameterTag, JSDocPropertyLikeTag,
47-
JSDocSignature, JSDocTypedefTag, JSDocTypeLiteral, JsxAttribute, JsxAttributes, LabeledStatement, length,
48-
LiteralLikeElementAccessExpression, MappedTypeNode, MethodDeclaration, ModifierFlags, ModuleBlock,
49-
ModuleDeclaration, Mutable, NamespaceExportDeclaration, Node, NodeArray, NodeFlags, nodeHasName, nodeIsMissing,
50-
nodeIsPresent, NonNullChain, NonNullExpression, NumericLiteral, objectAllocator, ObjectLiteralExpression,
51-
OptionalChain, ParameterDeclaration, ParenthesizedExpression, Pattern, PatternAmbientModule, perfLogger,
52-
PostfixUnaryExpression, PrefixUnaryExpression, PrivateIdentifier, PropertyAccessChain, PropertyAccessExpression,
53-
PropertyDeclaration, PropertySignature, removeFileExtension, ReturnStatement, ScriptTarget,
54-
SetAccessorDeclaration, setParent, setParentRecursive, setValueDeclaration, ShorthandPropertyAssignment,
55-
shouldPreserveConstEnums, SignatureDeclaration, skipParentheses, sliceAfter, some, SourceFile, SpreadElement,
56-
Statement, StringLiteral, SwitchStatement, Symbol, SymbolFlags, symbolName, SymbolTable, SyntaxKind, TextRange,
57-
ThrowStatement, TokenFlags, tokenToString, tracing, TracingNode, tryCast, tryParsePattern, TryStatement,
58-
TypeLiteralNode, TypeOfExpression, TypeParameterDeclaration, unescapeLeadingUnderscores, unreachableCodeIsError,
59-
unusedLabelIsError, VariableDeclaration, WhileStatement, WithStatement,
2+
AccessExpression,
3+
ArrayBindingElement,
4+
ArrayLiteralExpression,
5+
ArrowFunction,
6+
AssignmentDeclarationKind,
7+
BinaryExpression,
8+
BinaryOperatorToken,
9+
BindableAccessExpression,
10+
BindableObjectDefinePropertyCall,
11+
BindablePropertyAssignmentExpression,
12+
BindableStaticAccessExpression,
13+
BindableStaticNameExpression,
14+
BindableStaticPropertyAssignmentExpression,
15+
BindingElement,
16+
Block,
17+
BreakOrContinueStatement,
18+
CallChain,
19+
CallExpression,
20+
CaseBlock,
21+
CaseClause,
22+
CatchClause,
23+
ClassLikeDeclaration,
24+
ClassStaticBlockDeclaration,
25+
CompilerOptions,
26+
ConditionalExpression,
27+
ConditionalTypeNode,
28+
Debug,
29+
Declaration,
30+
DeleteExpression,
31+
DestructuringAssignment,
32+
DiagnosticCategory,
33+
DiagnosticMessage,
34+
DiagnosticRelatedInformation,
35+
DiagnosticWithLocation,
36+
Diagnostics,
37+
DoStatement,
38+
DynamicNamedDeclaration,
39+
ElementAccessChain,
40+
ElementAccessExpression,
41+
EntityNameExpression,
42+
EnumDeclaration,
43+
ExportAssignment,
44+
ExportDeclaration,
45+
ExportSpecifier,
46+
Expression,
47+
ExpressionStatement,
48+
FlowFlags,
49+
FlowLabel,
50+
FlowNode,
51+
FlowReduceLabel,
52+
ForInOrOfStatement,
53+
ForStatement,
54+
FunctionDeclaration,
55+
FunctionExpression,
56+
FunctionLikeDeclaration,
57+
GetAccessorDeclaration,
58+
Identifier,
59+
IfStatement,
60+
ImportClause,
61+
InternalSymbolName,
62+
JSDocCallbackTag,
63+
JSDocClassTag,
64+
JSDocEnumTag,
65+
JSDocFunctionType,
66+
JSDocParameterTag,
67+
JSDocPropertyLikeTag,
68+
JSDocSignature,
69+
JSDocTypeLiteral,
70+
JSDocTypedefTag,
71+
JsxAttribute,
72+
JsxAttributes,
73+
LabeledStatement,
74+
LiteralLikeElementAccessExpression,
75+
MappedTypeNode,
76+
MethodDeclaration,
77+
ModifierFlags,
78+
ModuleBlock,
79+
ModuleDeclaration,
80+
Mutable,
81+
NamespaceExportDeclaration,
82+
Node,
83+
NodeArray,
84+
NodeFlags,
85+
NonNullChain,
86+
NonNullExpression,
87+
NumericLiteral,
88+
ObjectLiteralExpression,
89+
OptionalChain,
90+
ParameterDeclaration,
91+
ParenthesizedExpression,
92+
Pattern,
93+
PatternAmbientModule,
94+
PostfixUnaryExpression,
95+
PrefixUnaryExpression,
96+
PrivateIdentifier,
97+
PropertyAccessChain,
98+
PropertyAccessExpression,
99+
PropertyDeclaration,
100+
PropertySignature,
101+
ReturnStatement,
102+
ScriptTarget,
103+
SetAccessorDeclaration,
104+
ShorthandPropertyAssignment,
105+
SignatureDeclaration,
106+
SourceFile,
107+
SpreadElement,
108+
Statement,
109+
StringLiteral,
110+
SwitchStatement,
111+
Symbol,
112+
SymbolFlags,
113+
SymbolTable,
114+
SyntaxKind,
115+
TextRange,
116+
ThrowStatement,
117+
TokenFlags,
118+
TracingNode,
119+
TryStatement,
120+
TypeLiteralNode,
121+
TypeOfExpression,
122+
TypeParameterDeclaration,
123+
VariableDeclaration,
124+
WhileStatement,
125+
WithStatement,
126+
__String,
127+
addRelatedInfo,
128+
append,
129+
appendIfUnique,
130+
cast,
131+
concatenate,
132+
contains,
133+
createBinaryExpressionTrampoline,
134+
createDiagnosticForNodeInSourceFile,
135+
createFileDiagnostic,
136+
createQueue,
137+
createSymbolTable,
138+
declarationNameToString,
139+
escapeLeadingUnderscores,
140+
every,
141+
exportAssignmentIsAlias,
142+
findAncestor,
143+
forEach,
144+
forEachChild,
145+
getAssignedExpandoInitializer,
146+
getAssignmentDeclarationKind,
147+
getAssignmentDeclarationPropertyAccessKind,
148+
getCombinedModifierFlags,
149+
getCombinedNodeFlags,
150+
getContainingClass,
151+
getEffectiveContainerForJSDocTemplateTag,
152+
getElementOrPropertyAccessName,
153+
getEmitScriptTarget,
154+
getEnclosingBlockScopeContainer,
155+
getErrorSpanForNode,
156+
getEscapedTextOfIdentifierOrLiteral,
157+
getExpandoInitializer,
158+
getHostSignatureFromJSDoc,
159+
getImmediatelyInvokedFunctionExpression,
160+
getJSDocTypeTag,
161+
getLeftmostAccessExpression,
162+
getNameOfDeclaration,
163+
getNameOrArgument,
164+
getNodeId,
165+
getRangesWhere,
166+
getRightMostAssignedExpression,
167+
getSourceFileOfNode,
168+
getSourceTextOfNodeFromSourceFile,
169+
getSpanOfTokenAtPosition,
170+
getStrictOptionValue,
171+
getSymbolNameForPrivateIdentifier,
172+
getTextOfIdentifierOrLiteral,
173+
getThisContainer,
174+
getTokenPosOfNode,
175+
hasDynamicName,
176+
hasJSDocNodes,
177+
hasSyntacticModifier,
178+
idText,
179+
isAliasableExpression,
180+
isAmbientModule,
181+
isAssignmentExpression,
182+
isAssignmentOperator,
183+
isAssignmentTarget,
184+
isAsyncFunction,
185+
isAutoAccessorPropertyDeclaration,
186+
isBinaryExpression,
187+
isBindableObjectDefinePropertyCall,
188+
isBindableStaticAccessExpression,
189+
isBindableStaticNameExpression,
190+
isBindingPattern,
191+
isBlock,
192+
isBlockOrCatchScoped,
193+
isCallExpression,
194+
isClassStaticBlockDeclaration,
195+
isConditionalTypeNode,
196+
isDeclaration,
197+
isDeclarationStatement,
198+
isDestructuringAssignment,
199+
isDottedName,
200+
isElementAccessExpression,
201+
isEmptyObjectLiteral,
202+
isEntityNameExpression,
203+
isEnumConst,
204+
isEnumDeclaration,
205+
isExportAssignment,
206+
isExportDeclaration,
207+
isExportSpecifier,
208+
isExportsIdentifier,
209+
isExpression,
210+
isExpressionOfOptionalChainRoot,
211+
isExternalModule,
212+
isExternalOrCommonJsModule,
213+
isForInOrOfStatement,
214+
isFunctionDeclaration,
215+
isFunctionLike,
216+
isFunctionLikeDeclaration,
217+
isFunctionLikeOrClassStaticBlockDeclaration,
218+
isFunctionSymbol,
219+
isGlobalScopeAugmentation,
220+
isIdentifier,
221+
isIdentifierName,
222+
isInJSFile,
223+
isInTopLevelContext,
224+
isJSDocConstructSignature,
225+
isJSDocEnumTag,
226+
isJSDocTemplateTag,
227+
isJSDocTypeAlias,
228+
isJsonSourceFile,
229+
isLeftHandSideExpression,
230+
isLogicalOrCoalescingAssignmentOperator,
231+
isModuleAugmentationExternal,
232+
isModuleBlock,
233+
isModuleDeclaration,
234+
isModuleExportsAccessExpression,
235+
isNamedDeclaration,
236+
isNamespaceExport,
237+
isNonNullExpression,
238+
isNullishCoalesce,
239+
isObjectLiteralExpression,
240+
isObjectLiteralMethod,
241+
isObjectLiteralOrClassExpressionMethodOrAccessor,
242+
isOmittedExpression,
243+
isOptionalChain,
244+
isOptionalChainRoot,
245+
isOutermostOptionalChain,
246+
isParameterDeclaration,
247+
isParameterPropertyDeclaration,
248+
isParenthesizedExpression,
249+
isPartOfTypeQuery,
250+
isPrefixUnaryExpression,
251+
isPrivateIdentifier,
252+
isPrologueDirective,
253+
isPropertyAccessEntityNameExpression,
254+
isPropertyAccessExpression,
255+
isPropertyNameLiteral,
256+
isPrototypeAccess,
257+
isPushOrUnshiftIdentifier,
258+
isRequireCall,
259+
isShorthandPropertyAssignment,
260+
isSignedNumericLiteral,
261+
isSourceFile,
262+
isSpecialPropertyDeclaration,
263+
isStatement,
264+
isStatementButNotDeclaration,
265+
isStatic,
266+
isString,
267+
isStringLiteralLike,
268+
isStringOrNumericLiteralLike,
269+
isThisInitializedDeclaration,
270+
isTypeAliasDeclaration,
271+
isTypeOfExpression,
272+
isVariableDeclaration,
273+
isVariableDeclarationInitializedToBareOrAccessedRequire,
274+
isVariableStatement,
275+
length,
276+
nodeHasName,
277+
nodeIsMissing,
278+
nodeIsPresent,
279+
objectAllocator,
280+
perfLogger,
281+
removeFileExtension,
282+
setParent,
283+
setParentRecursive,
284+
setValueDeclaration,
285+
shouldPreserveConstEnums,
286+
skipParentheses,
287+
sliceAfter,
288+
some,
289+
symbolName,
290+
tokenToString,
291+
tracing,
292+
tryCast,
293+
tryParsePattern,
294+
unescapeLeadingUnderscores,
295+
unreachableCodeIsError,
296+
unusedLabelIsError,
60297
} from "./_namespaces/ts";
61298
import * as performance from "./_namespaces/ts.performance";
62299

0 commit comments

Comments
 (0)