Skip to content

Commit

Permalink
Fix just compiler
Browse files Browse the repository at this point in the history
  • Loading branch information
jakebailey committed Jul 1, 2024
1 parent 3ed597f commit c0fd8ee
Show file tree
Hide file tree
Showing 55 changed files with 56 additions and 57 deletions.
5 changes: 2 additions & 3 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,6 @@ export default tseslint.config(
"local/no-keywords": "error",
"local/jsdoc-format": "error",
"local/js-extensions": "error",
"local/prefer-direct-import": "error",
},
},
{
Expand Down Expand Up @@ -211,9 +210,9 @@ export default tseslint.config(
},
},
{
files: ["src/harness/**", "src/testRunner/**", "src/tsserver/**", "src/typingsInstaller/**"],
files: ["src/compiler/**"],
rules: {
"local/prefer-direct-import": "off",
"local/prefer-direct-import": "error",
},
},
{
Expand Down
2 changes: 1 addition & 1 deletion src/compiler/binder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ import {
createFileDiagnostic,
createQueue,
createSymbolTable,
Debug,
Declaration,
declarationNameToString,
DeleteExpression,
Expand Down Expand Up @@ -322,6 +321,7 @@ import {
WithStatement,
} from "./_namespaces/ts.js";
import * as performance from "./_namespaces/ts.performance.js";
import * as Debug from "./debug.js";

/** @internal */
export const enum ModuleInstanceState {
Expand Down
2 changes: 1 addition & 1 deletion src/compiler/builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import {
createModuleNotFoundChain,
createProgram,
CustomTransformers,
Debug,
Diagnostic,
DiagnosticCategory,
DiagnosticMessageChain,
Expand Down Expand Up @@ -89,6 +88,7 @@ import {
WriteFileCallback,
WriteFileCallbackData,
} from "./_namespaces/ts.js";
import * as Debug from "./debug.js";

/** @internal */
export interface ReusableDiagnostic extends ReusableDiagnosticRelatedInformation {
Expand Down
2 changes: 1 addition & 1 deletion src/compiler/builderState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import {
CompilerOptions,
computeSignatureWithDiagnostics,
CustomTransformers,
Debug,
EmitOutput,
emptyArray,
GetCanonicalFileName,
Expand Down Expand Up @@ -33,6 +32,7 @@ import {
toPath,
TypeChecker,
} from "./_namespaces/ts.js";
import * as Debug from "./debug.js";

/** @internal */
export function getFileEmitOutput(
Expand Down
2 changes: 1 addition & 1 deletion src/compiler/checker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ import {
createSymbolTable,
createSyntacticTypeNodeBuilder,
createTextWriter,
Debug,
Declaration,
DeclarationName,
declarationNameToString,
Expand Down Expand Up @@ -1116,6 +1115,7 @@ import {
} from "./_namespaces/ts.js";
import * as moduleSpecifiers from "./_namespaces/ts.moduleSpecifiers.js";
import * as performance from "./_namespaces/ts.performance.js";
import * as Debug from "./debug.js";

const ambientModuleSymbolRegex = /^".+"$/;
const anon = "(anonymous)" as __String & string;
Expand Down
2 changes: 1 addition & 1 deletion src/compiler/commandLineParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import {
createCompilerDiagnostic,
createDiagnosticForNodeInSourceFile,
createGetCanonicalFileName,
Debug,
Diagnostic,
DiagnosticArguments,
DiagnosticMessage,
Expand Down Expand Up @@ -122,6 +121,7 @@ import {
WatchFileKind,
WatchOptions,
} from "./_namespaces/ts.js";
import * as Debug from "./debug.js";

const compileOnSaveCommandLineOption: CommandLineOption = {
name: "compileOnSave",
Expand Down
2 changes: 1 addition & 1 deletion src/compiler/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ import {
CharacterCodes,
Comparer,
Comparison,
Debug,
EqualityComparer,
MapLike,
Queue,
SortedArray,
SortedReadonlyArray,
TextSpan,
} from "./_namespaces/ts.js";
import * as Debug from "./debug.js";

/* eslint-disable @typescript-eslint/prefer-for-of */

Expand Down
2 changes: 1 addition & 1 deletion src/compiler/emitter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ import {
createGetCanonicalFileName,
createSourceMapGenerator,
createTextWriter,
Debug,
DebuggerStatement,
DeclarationName,
Decorator,
Expand Down Expand Up @@ -423,6 +422,7 @@ import {
YieldExpression,
} from "./_namespaces/ts.js";
import * as performance from "./_namespaces/ts.performance.js";
import * as Debug from "./debug.js";

const brackets = createBracketsMap();

Expand Down
2 changes: 1 addition & 1 deletion src/compiler/executeCommandLine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import {
createWatchCompilerHostOfFilesAndCompilerOptions,
createWatchProgram,
createWatchStatusReporter as ts_createWatchStatusReporter,
Debug,
Diagnostic,
DiagnosticMessage,
DiagnosticReporter,
Expand Down Expand Up @@ -87,6 +86,7 @@ import {
WatchOfConfigFile,
WatchOptions,
} from "./_namespaces/ts.js";
import * as Debug from "./debug.js";
import * as performance from "./performance.js";

interface Statistic {
Expand Down
2 changes: 1 addition & 1 deletion src/compiler/expressionToTypeNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import {
BindingElement,
ClassExpression,
CompilerOptions,
Debug,
ElementAccessExpression,
ExportAssignment,
Expression,
Expand Down Expand Up @@ -64,6 +63,7 @@ import {
UnionTypeNode,
VariableDeclaration,
} from "./_namespaces/ts.js";
import * as Debug from "./debug.js";

/** @internal */
export function createSyntacticTypeNodeBuilder(options: CompilerOptions, resolver: SyntacticTypeNodeBuilderResolver) {
Expand Down
2 changes: 1 addition & 1 deletion src/compiler/factory/emitHelpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import {
compareValues,
Comparison,
createExpressionFromEntityName,
Debug,
EmitFlags,
EmitHelper,
EmitHelperUniqueNameCallback,
Expand Down Expand Up @@ -36,6 +35,7 @@ import {
TransformationContext,
UnscopedEmitHelper,
} from "../_namespaces/ts.js";
import * as Debug from "../debug.js";

/** @internal */
export const enum PrivateIdentifierKind {
Expand Down
2 changes: 1 addition & 1 deletion src/compiler/factory/emitNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import {
append,
appendIfUnique,
AutoGenerateInfo,
Debug,
EmitFlags,
EmitHelper,
EmitNode,
Expand All @@ -27,6 +26,7 @@ import {
TypeNode,
TypeParameterDeclaration,
} from "../_namespaces/ts.js";
import * as Debug from "../debug.js";

/**
* Associates a node with the current transformation, initializing
Expand Down
2 changes: 1 addition & 1 deletion src/compiler/factory/nodeConverters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import {
cast,
ClassDeclaration,
ConciseBody,
Debug,
Expression,
FunctionDeclaration,
getModifiers,
Expand Down Expand Up @@ -36,6 +35,7 @@ import {
setTextRange,
SyntaxKind,
} from "../_namespaces/ts.js";
import * as Debug from "../debug.js";

/** @internal */
export function createNodeConverters(factory: NodeFactory): NodeConverters {
Expand Down
2 changes: 1 addition & 1 deletion src/compiler/factory/nodeFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ import {
createNodeConverters,
createParenthesizerRules,
createScanner,
Debug,
DebuggerStatement,
Declaration,
DeclarationName,
Expand Down Expand Up @@ -458,6 +457,7 @@ import {
WithStatement,
YieldExpression,
} from "../_namespaces/ts.js";
import * as Debug from "../debug.js";

let nextAutoGenerateId = 0;

Expand Down
2 changes: 1 addition & 1 deletion src/compiler/factory/utilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import {
compareStringsCaseSensitive,
CompilerOptions,
ComputedPropertyName,
Debug,
Declaration,
DefaultKeyword,
EmitFlags,
Expand Down Expand Up @@ -172,6 +171,7 @@ import {
TypeNode,
WrappedExpression,
} from "../_namespaces/ts.js";
import * as Debug from "../debug.js";

// Compound nodes

Expand Down
2 changes: 1 addition & 1 deletion src/compiler/moduleNameResolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import {
contains,
containsPath,
createCompilerDiagnostic,
Debug,
deduplicate,
Diagnostic,
DiagnosticMessage,
Expand Down Expand Up @@ -108,6 +107,7 @@ import {
versionMajorMinor,
VersionRange,
} from "./_namespaces/ts.js";
import * as Debug from "./debug.js";

/** @internal */
export function trace(host: ModuleResolutionHost, message: DiagnosticMessage, ...args: any[]): void {
Expand Down
2 changes: 1 addition & 1 deletion src/compiler/moduleSpecifiers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import {
containsIgnoredPath,
containsPath,
createGetCanonicalFileName,
Debug,
directorySeparator,
emptyArray,
endsWith,
Expand Down Expand Up @@ -126,6 +125,7 @@ import {
TypeChecker,
UserPreferences,
} from "./_namespaces/ts.js";
import * as Debug from "./debug.js";

// Used by importFixes, getEditsForFileRename, and declaration emit to synthesize import module specifiers.

Expand Down
2 changes: 1 addition & 1 deletion src/compiler/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ import {
createScanner,
createTextChangeRange,
createTextSpanFromBounds,
Debug,
Decorator,
DefaultClause,
DeleteExpression,
Expand Down Expand Up @@ -397,6 +396,7 @@ import {
YieldExpression,
} from "./_namespaces/ts.js";
import * as performance from "./_namespaces/ts.performance.js";
import * as Debug from "./debug.js";

const enum SignatureFlags {
None = 0,
Expand Down
2 changes: 1 addition & 1 deletion src/compiler/path.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import {
compareStringsCaseSensitive,
compareValues,
Comparison,
Debug,
endsWith,
equateStringsCaseInsensitive,
equateStringsCaseSensitive,
Expand All @@ -17,6 +16,7 @@ import {
some,
startsWith,
} from "./_namespaces/ts.js";
import * as Debug from "./debug.js";

/**
* Internally, we represent paths as strings with '/' as the directory separator.
Expand Down
2 changes: 1 addition & 1 deletion src/compiler/performance.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {
Debug,
noop,
Performance,
PerformanceHooks,
Expand All @@ -8,6 +7,7 @@ import {
timestamp,
tryGetNativePerformanceHooks,
} from "./_namespaces/ts.js";
import * as Debug from "./debug.js";

/** Performance measurements for the compiler. */

Expand Down
2 changes: 1 addition & 1 deletion src/compiler/program.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ import {
createTypeChecker,
createTypeReferenceDirectiveResolutionCache,
CustomTransformers,
Debug,
DeclarationWithTypeParameterChildren,
Diagnostic,
DiagnosticArguments,
Expand Down Expand Up @@ -332,6 +331,7 @@ import {
writeFileEnsuringDirectories,
} from "./_namespaces/ts.js";
import * as performance from "./_namespaces/ts.performance.js";
import * as Debug from "./debug.js";

export function findConfigFile(searchPath: string, fileExists: (fileName: string) => boolean, configName = "tsconfig.json"): string | undefined {
return forEachAncestorDirectory(searchPath, ancestor => {
Expand Down
2 changes: 1 addition & 1 deletion src/compiler/resolutionCache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import {
createMultiMap,
createTypeReferenceDirectiveResolutionCache,
createTypeReferenceResolutionLoader,
Debug,
Diagnostics,
directorySeparator,
DirectoryWatcherCallback,
Expand Down Expand Up @@ -78,6 +77,7 @@ import {
updateResolutionField,
WatchDirectoryFlags,
} from "./_namespaces/ts.js";
import * as Debug from "./debug.js";

/** @internal */
export interface HasInvalidatedFromResolutionCache {
Expand Down
2 changes: 1 addition & 1 deletion src/compiler/scanner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import {
CommentKind,
CommentRange,
compareValues,
Debug,
DiagnosticMessage,
Diagnostics,
forEach,
Expand All @@ -34,6 +33,7 @@ import {
TextRange,
TokenFlags,
} from "./_namespaces/ts.js";
import * as Debug from "./debug.js";

export type ErrorCallback = (message: DiagnosticMessage, length: number, arg0?: any) => void;

Expand Down
2 changes: 1 addition & 1 deletion src/compiler/semver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ import {
compareStringsCaseSensitive,
compareValues,
Comparison,
Debug,
emptyArray,
every,
isArray,
map,
some,
} from "./_namespaces/ts.js";
import * as Debug from "./debug.js";

// https://semver.org/#spec-item-2
// > A normal version number MUST take the form X.Y.Z where X, Y, and Z are non-negative
Expand Down
Loading

0 comments on commit c0fd8ee

Please sign in to comment.