Skip to content

Commit 00dc0b6

Browse files
authored
Flip imports to case insensitive sorting (microsoft#51579)
1 parent 2d2a434 commit 00dc0b6

File tree

318 files changed

+5184
-5183
lines changed

Some content is hidden

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

318 files changed

+5184
-5183
lines changed

.eslintrc.json

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
],
1515
"rules": {
1616
"sort-imports": ["error", {
17+
"ignoreCase": true,
1718
"ignoreDeclarationSort": true,
1819
"allowSeparatedGroups": true
1920
}],

src/compiler/binder.ts

+89-89
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
import {
2+
__String,
23
AccessExpression,
4+
addRelatedInfo,
5+
append,
6+
appendIfUnique,
37
ArrayBindingElement,
48
ArrayLiteralExpression,
59
ArrowFunction,
@@ -19,129 +23,57 @@ import {
1923
CallExpression,
2024
CaseBlock,
2125
CaseClause,
26+
cast,
2227
CatchClause,
2328
ClassLikeDeclaration,
2429
ClassStaticBlockDeclaration,
2530
CompilerOptions,
31+
concatenate,
2632
ConditionalExpression,
2733
ConditionalTypeNode,
34+
contains,
35+
createBinaryExpressionTrampoline,
36+
createDiagnosticForNodeInSourceFile,
37+
createFileDiagnostic,
38+
createQueue,
39+
createSymbolTable,
2840
Debug,
2941
Declaration,
42+
declarationNameToString,
3043
DeleteExpression,
3144
DestructuringAssignment,
3245
DiagnosticCategory,
3346
DiagnosticMessage,
3447
DiagnosticRelatedInformation,
35-
DiagnosticWithLocation,
3648
Diagnostics,
49+
DiagnosticWithLocation,
3750
DoStatement,
3851
DynamicNamedDeclaration,
3952
ElementAccessChain,
4053
ElementAccessExpression,
4154
EntityNameExpression,
4255
EnumDeclaration,
56+
escapeLeadingUnderscores,
57+
every,
4358
ExportAssignment,
59+
exportAssignmentIsAlias,
4460
ExportDeclaration,
4561
ExportSpecifier,
4662
Expression,
4763
ExpressionStatement,
64+
findAncestor,
4865
FlowFlags,
4966
FlowLabel,
5067
FlowNode,
5168
FlowReduceLabel,
69+
forEach,
70+
forEachChild,
5271
ForInOrOfStatement,
5372
ForStatement,
5473
FunctionDeclaration,
5574
FunctionExpression,
5675
FunctionLikeDeclaration,
5776
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,
14577
getAssignedExpandoInitializer,
14678
getAssignmentDeclarationKind,
14779
getAssignmentDeclarationPropertyAccessKind,
@@ -175,7 +107,11 @@ import {
175107
hasDynamicName,
176108
hasJSDocNodes,
177109
hasSyntacticModifier,
110+
Identifier,
178111
idText,
112+
IfStatement,
113+
ImportClause,
114+
InternalSymbolName,
179115
isAliasableExpression,
180116
isAmbientModule,
181117
isAssignmentExpression,
@@ -204,8 +140,8 @@ import {
204140
isEnumDeclaration,
205141
isExportAssignment,
206142
isExportDeclaration,
207-
isExportSpecifier,
208143
isExportsIdentifier,
144+
isExportSpecifier,
209145
isExpression,
210146
isExpressionOfOptionalChainRoot,
211147
isExternalModule,
@@ -272,28 +208,92 @@ import {
272208
isVariableDeclaration,
273209
isVariableDeclarationInitializedToBareOrAccessedRequire,
274210
isVariableStatement,
211+
JSDocCallbackTag,
212+
JSDocClassTag,
213+
JSDocEnumTag,
214+
JSDocFunctionType,
215+
JSDocParameterTag,
216+
JSDocPropertyLikeTag,
217+
JSDocSignature,
218+
JSDocTypedefTag,
219+
JSDocTypeLiteral,
220+
JsxAttribute,
221+
JsxAttributes,
222+
LabeledStatement,
275223
length,
224+
LiteralLikeElementAccessExpression,
225+
MappedTypeNode,
226+
MethodDeclaration,
227+
ModifierFlags,
228+
ModuleBlock,
229+
ModuleDeclaration,
230+
Mutable,
231+
NamespaceExportDeclaration,
232+
Node,
233+
NodeArray,
234+
NodeFlags,
276235
nodeHasName,
277236
nodeIsMissing,
278237
nodeIsPresent,
238+
NonNullChain,
239+
NonNullExpression,
240+
NumericLiteral,
279241
objectAllocator,
242+
ObjectLiteralExpression,
243+
OptionalChain,
244+
ParameterDeclaration,
245+
ParenthesizedExpression,
246+
Pattern,
247+
PatternAmbientModule,
280248
perfLogger,
249+
PostfixUnaryExpression,
250+
PrefixUnaryExpression,
251+
PrivateIdentifier,
252+
PropertyAccessChain,
253+
PropertyAccessExpression,
254+
PropertyDeclaration,
255+
PropertySignature,
281256
removeFileExtension,
257+
ReturnStatement,
258+
ScriptTarget,
259+
SetAccessorDeclaration,
282260
setParent,
283261
setParentRecursive,
284262
setValueDeclaration,
263+
ShorthandPropertyAssignment,
285264
shouldPreserveConstEnums,
265+
SignatureDeclaration,
286266
skipParentheses,
287267
sliceAfter,
288268
some,
269+
SourceFile,
270+
SpreadElement,
271+
Statement,
272+
StringLiteral,
273+
SwitchStatement,
274+
Symbol,
275+
SymbolFlags,
289276
symbolName,
277+
SymbolTable,
278+
SyntaxKind,
279+
TextRange,
280+
ThrowStatement,
281+
TokenFlags,
290282
tokenToString,
291283
tracing,
284+
TracingNode,
292285
tryCast,
293286
tryParsePattern,
287+
TryStatement,
288+
TypeLiteralNode,
289+
TypeOfExpression,
290+
TypeParameterDeclaration,
294291
unescapeLeadingUnderscores,
295292
unreachableCodeIsError,
296293
unusedLabelIsError,
294+
VariableDeclaration,
295+
WhileStatement,
296+
WithStatement,
297297
} from "./_namespaces/ts";
298298
import * as performance from "./_namespaces/ts.performance";
299299

src/compiler/builder.ts

+26-26
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,29 @@
11
import * as ts from "./_namespaces/ts";
22
import {
3+
addRange,
34
AffectedFileResult,
4-
BuildInfo,
5+
arrayFrom,
6+
arrayToMap,
57
BuilderProgram,
68
BuilderProgramHost,
79
BuilderState,
10+
BuildInfo,
811
BundleBuildInfo,
912
CancellationToken,
1013
CommandLineOption,
14+
compareStringsCaseSensitive,
15+
compareValues,
1116
CompilerHost,
1217
CompilerOptions,
18+
compilerOptionsAffectDeclarationPath,
19+
compilerOptionsAffectEmit,
20+
compilerOptionsAffectSemanticDiagnostics,
1321
CompilerOptionsValue,
22+
concatenate,
23+
convertToOptionsWithAbsolutePaths,
24+
createBuildInfo,
25+
createGetCanonicalFileName,
26+
createProgram,
1427
CustomTransformers,
1528
Debug,
1629
Diagnostic,
@@ -21,31 +34,6 @@ import {
2134
EmitAndSemanticDiagnosticsBuilderProgram,
2235
EmitOnly,
2336
EmitResult,
24-
GetCanonicalFileName,
25-
HostForComputeHash,
26-
Path,
27-
Program,
28-
ProjectReference,
29-
ReadBuildProgramHost,
30-
ReadonlyCollection,
31-
SemanticDiagnosticsBuilderProgram,
32-
SourceFile,
33-
SourceMapEmitResult,
34-
WriteFileCallback,
35-
WriteFileCallbackData,
36-
addRange,
37-
arrayFrom,
38-
arrayToMap,
39-
compareStringsCaseSensitive,
40-
compareValues,
41-
compilerOptionsAffectDeclarationPath,
42-
compilerOptionsAffectEmit,
43-
compilerOptionsAffectSemanticDiagnostics,
44-
concatenate,
45-
convertToOptionsWithAbsolutePaths,
46-
createBuildInfo,
47-
createGetCanonicalFileName,
48-
createProgram,
4937
emitSkippedWithNoDiagnostics,
5038
emptyArray,
5139
ensurePathIsNonModuleName,
@@ -54,6 +42,7 @@ import {
5442
forEachEntry,
5543
forEachKey,
5644
generateDjb2Hash,
45+
GetCanonicalFileName,
5746
getDirectoryPath,
5847
getEmitDeclarations,
5948
getNormalizedAbsolutePath,
@@ -62,6 +51,7 @@ import {
6251
getRelativePathFromDirectory,
6352
getTsBuildInfoEmitOutputFilePath,
6453
handleNoEmitOptions,
54+
HostForComputeHash,
6555
isArray,
6656
isDeclarationFileName,
6757
isJsonSourceFile,
@@ -73,13 +63,23 @@ import {
7363
noop,
7464
notImplemented,
7565
outFile,
66+
Path,
67+
Program,
68+
ProjectReference,
69+
ReadBuildProgramHost,
70+
ReadonlyCollection,
7671
returnFalse,
7772
returnUndefined,
73+
SemanticDiagnosticsBuilderProgram,
7874
skipTypeChecking,
7975
some,
76+
SourceFile,
8077
sourceFileMayBeEmitted,
78+
SourceMapEmitResult,
8179
toPath,
8280
tryAddToSet,
81+
WriteFileCallback,
82+
WriteFileCallbackData,
8383
} from "./_namespaces/ts";
8484

8585
/** @internal */

0 commit comments

Comments
 (0)