Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flip imports to case insensitive sorting #51579

Merged
merged 1 commit into from
Nov 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
],
"rules": {
"sort-imports": ["error", {
"ignoreCase": true,
"ignoreDeclarationSort": true,
"allowSeparatedGroups": true
}],
Expand Down
178 changes: 89 additions & 89 deletions src/compiler/binder.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import {
__String,
AccessExpression,
addRelatedInfo,
append,
appendIfUnique,
ArrayBindingElement,
ArrayLiteralExpression,
ArrowFunction,
Expand All @@ -19,129 +23,57 @@ import {
CallExpression,
CaseBlock,
CaseClause,
cast,
CatchClause,
ClassLikeDeclaration,
ClassStaticBlockDeclaration,
CompilerOptions,
concatenate,
ConditionalExpression,
ConditionalTypeNode,
contains,
createBinaryExpressionTrampoline,
createDiagnosticForNodeInSourceFile,
createFileDiagnostic,
createQueue,
createSymbolTable,
Debug,
Declaration,
declarationNameToString,
DeleteExpression,
DestructuringAssignment,
DiagnosticCategory,
DiagnosticMessage,
DiagnosticRelatedInformation,
DiagnosticWithLocation,
Diagnostics,
DiagnosticWithLocation,
DoStatement,
DynamicNamedDeclaration,
ElementAccessChain,
ElementAccessExpression,
EntityNameExpression,
EnumDeclaration,
escapeLeadingUnderscores,
every,
ExportAssignment,
exportAssignmentIsAlias,
ExportDeclaration,
ExportSpecifier,
Expression,
ExpressionStatement,
findAncestor,
FlowFlags,
FlowLabel,
FlowNode,
FlowReduceLabel,
forEach,
forEachChild,
ForInOrOfStatement,
ForStatement,
FunctionDeclaration,
FunctionExpression,
FunctionLikeDeclaration,
GetAccessorDeclaration,
Identifier,
IfStatement,
ImportClause,
InternalSymbolName,
JSDocCallbackTag,
JSDocClassTag,
JSDocEnumTag,
JSDocFunctionType,
JSDocParameterTag,
JSDocPropertyLikeTag,
JSDocSignature,
JSDocTypeLiteral,
JSDocTypedefTag,
JsxAttribute,
JsxAttributes,
LabeledStatement,
LiteralLikeElementAccessExpression,
MappedTypeNode,
MethodDeclaration,
ModifierFlags,
ModuleBlock,
ModuleDeclaration,
Mutable,
NamespaceExportDeclaration,
Node,
NodeArray,
NodeFlags,
NonNullChain,
NonNullExpression,
NumericLiteral,
ObjectLiteralExpression,
OptionalChain,
ParameterDeclaration,
ParenthesizedExpression,
Pattern,
PatternAmbientModule,
PostfixUnaryExpression,
PrefixUnaryExpression,
PrivateIdentifier,
PropertyAccessChain,
PropertyAccessExpression,
PropertyDeclaration,
PropertySignature,
ReturnStatement,
ScriptTarget,
SetAccessorDeclaration,
ShorthandPropertyAssignment,
SignatureDeclaration,
SourceFile,
SpreadElement,
Statement,
StringLiteral,
SwitchStatement,
Symbol,
SymbolFlags,
SymbolTable,
SyntaxKind,
TextRange,
ThrowStatement,
TokenFlags,
TracingNode,
TryStatement,
TypeLiteralNode,
TypeOfExpression,
TypeParameterDeclaration,
VariableDeclaration,
WhileStatement,
WithStatement,
__String,
addRelatedInfo,
append,
appendIfUnique,
cast,
concatenate,
contains,
createBinaryExpressionTrampoline,
createDiagnosticForNodeInSourceFile,
createFileDiagnostic,
createQueue,
createSymbolTable,
declarationNameToString,
escapeLeadingUnderscores,
every,
exportAssignmentIsAlias,
findAncestor,
forEach,
forEachChild,
getAssignedExpandoInitializer,
getAssignmentDeclarationKind,
getAssignmentDeclarationPropertyAccessKind,
Expand Down Expand Up @@ -175,7 +107,11 @@ import {
hasDynamicName,
hasJSDocNodes,
hasSyntacticModifier,
Identifier,
idText,
IfStatement,
ImportClause,
InternalSymbolName,
isAliasableExpression,
isAmbientModule,
isAssignmentExpression,
Expand Down Expand Up @@ -204,8 +140,8 @@ import {
isEnumDeclaration,
isExportAssignment,
isExportDeclaration,
isExportSpecifier,
isExportsIdentifier,
isExportSpecifier,
isExpression,
isExpressionOfOptionalChainRoot,
isExternalModule,
Expand Down Expand Up @@ -272,28 +208,92 @@ import {
isVariableDeclaration,
isVariableDeclarationInitializedToBareOrAccessedRequire,
isVariableStatement,
JSDocCallbackTag,
JSDocClassTag,
JSDocEnumTag,
JSDocFunctionType,
JSDocParameterTag,
JSDocPropertyLikeTag,
JSDocSignature,
JSDocTypedefTag,
JSDocTypeLiteral,
JsxAttribute,
JsxAttributes,
LabeledStatement,
length,
LiteralLikeElementAccessExpression,
MappedTypeNode,
MethodDeclaration,
ModifierFlags,
ModuleBlock,
ModuleDeclaration,
Mutable,
NamespaceExportDeclaration,
Node,
NodeArray,
NodeFlags,
nodeHasName,
nodeIsMissing,
nodeIsPresent,
NonNullChain,
NonNullExpression,
NumericLiteral,
objectAllocator,
ObjectLiteralExpression,
OptionalChain,
ParameterDeclaration,
ParenthesizedExpression,
Pattern,
PatternAmbientModule,
perfLogger,
PostfixUnaryExpression,
PrefixUnaryExpression,
PrivateIdentifier,
PropertyAccessChain,
PropertyAccessExpression,
PropertyDeclaration,
PropertySignature,
removeFileExtension,
ReturnStatement,
ScriptTarget,
SetAccessorDeclaration,
setParent,
setParentRecursive,
setValueDeclaration,
ShorthandPropertyAssignment,
shouldPreserveConstEnums,
SignatureDeclaration,
skipParentheses,
sliceAfter,
some,
SourceFile,
SpreadElement,
Statement,
StringLiteral,
SwitchStatement,
Symbol,
SymbolFlags,
symbolName,
SymbolTable,
SyntaxKind,
TextRange,
ThrowStatement,
TokenFlags,
tokenToString,
tracing,
TracingNode,
tryCast,
tryParsePattern,
TryStatement,
TypeLiteralNode,
TypeOfExpression,
TypeParameterDeclaration,
unescapeLeadingUnderscores,
unreachableCodeIsError,
unusedLabelIsError,
VariableDeclaration,
WhileStatement,
WithStatement,
} from "./_namespaces/ts";
import * as performance from "./_namespaces/ts.performance";

Expand Down
52 changes: 26 additions & 26 deletions src/compiler/builder.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,29 @@
import * as ts from "./_namespaces/ts";
import {
addRange,
AffectedFileResult,
BuildInfo,
arrayFrom,
arrayToMap,
BuilderProgram,
BuilderProgramHost,
BuilderState,
BuildInfo,
BundleBuildInfo,
CancellationToken,
CommandLineOption,
compareStringsCaseSensitive,
compareValues,
CompilerHost,
CompilerOptions,
compilerOptionsAffectDeclarationPath,
compilerOptionsAffectEmit,
compilerOptionsAffectSemanticDiagnostics,
CompilerOptionsValue,
concatenate,
convertToOptionsWithAbsolutePaths,
createBuildInfo,
createGetCanonicalFileName,
createProgram,
CustomTransformers,
Debug,
Diagnostic,
Expand All @@ -21,31 +34,6 @@ import {
EmitAndSemanticDiagnosticsBuilderProgram,
EmitOnly,
EmitResult,
GetCanonicalFileName,
HostForComputeHash,
Path,
Program,
ProjectReference,
ReadBuildProgramHost,
ReadonlyCollection,
SemanticDiagnosticsBuilderProgram,
SourceFile,
SourceMapEmitResult,
WriteFileCallback,
WriteFileCallbackData,
addRange,
arrayFrom,
arrayToMap,
compareStringsCaseSensitive,
compareValues,
compilerOptionsAffectDeclarationPath,
compilerOptionsAffectEmit,
compilerOptionsAffectSemanticDiagnostics,
concatenate,
convertToOptionsWithAbsolutePaths,
createBuildInfo,
createGetCanonicalFileName,
createProgram,
emitSkippedWithNoDiagnostics,
emptyArray,
ensurePathIsNonModuleName,
Expand All @@ -54,6 +42,7 @@ import {
forEachEntry,
forEachKey,
generateDjb2Hash,
GetCanonicalFileName,
getDirectoryPath,
getEmitDeclarations,
getNormalizedAbsolutePath,
Expand All @@ -62,6 +51,7 @@ import {
getRelativePathFromDirectory,
getTsBuildInfoEmitOutputFilePath,
handleNoEmitOptions,
HostForComputeHash,
isArray,
isDeclarationFileName,
isJsonSourceFile,
Expand All @@ -73,13 +63,23 @@ import {
noop,
notImplemented,
outFile,
Path,
Program,
ProjectReference,
ReadBuildProgramHost,
ReadonlyCollection,
returnFalse,
returnUndefined,
SemanticDiagnosticsBuilderProgram,
skipTypeChecking,
some,
SourceFile,
sourceFileMayBeEmitted,
SourceMapEmitResult,
toPath,
tryAddToSet,
WriteFileCallback,
WriteFileCallbackData,
} from "./_namespaces/ts";

/** @internal */
Expand Down
Loading