Skip to content

Commit

Permalink
Stop using deprecated tsconfig options
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerrit0 committed Apr 28, 2024
1 parent 2e4eed3 commit b255bc0
Show file tree
Hide file tree
Showing 71 changed files with 145 additions and 143 deletions.
8 changes: 8 additions & 0 deletions .eslintrc
Expand Up @@ -38,6 +38,14 @@
"rules": {
"@typescript-eslint/no-floating-promises": "error",
"@typescript-eslint/await-thenable": "error",
"@typescript-eslint/consistent-type-imports": [
"error",
{
"fixStyle": "inline-type-imports",
"prefer": "type-imports",
"disallowTypeAnnotations": false
}
],

// This one is just annoying since it complains at incomplete code
"no-empty": "off",
Expand Down
10 changes: 5 additions & 5 deletions src/lib/application.ts
Expand Up @@ -3,21 +3,21 @@ import ts from "typescript";

import { Converter } from "./converter/index";
import { Renderer } from "./output/renderer";
import { Deserializer, JSONOutput, Serializer } from "./serialization";
import { Deserializer, type JSONOutput, Serializer } from "./serialization";
import type { ProjectReflection } from "./models/index";
import {
Logger,
ConsoleLogger,
loadPlugins,
writeFile,
OptionsReader,
type OptionsReader,
TSConfigReader,
TypeDocReader,
PackageJsonReader,
} from "./utils/index";

import {
AbstractComponent,
type AbstractComponent,
ChildableComponent,
Component,
} from "./utils/component";
Expand All @@ -26,7 +26,7 @@ import type { TypeDocOptions } from "./utils/options/declaration";
import { unique } from "./utils/array";
import { ok } from "assert";
import {
DocumentationEntryPoint,
type DocumentationEntryPoint,
EntryPointStrategy,
getEntryPoints,
getPackageDirectories,
Expand All @@ -44,7 +44,7 @@ import { resetReflectionID } from "./models/reflections/abstract";
import { addInferredDeclarationMapPaths } from "./models/reflections/ReflectionSymbolId";
import {
Internationalization,
TranslatedString,
type TranslatedString,
} from "./internationalization/internationalization";

// eslint-disable-next-line @typescript-eslint/no-var-requires
Expand Down
2 changes: 1 addition & 1 deletion src/lib/converter/comments/blockLexer.ts
@@ -1,5 +1,5 @@
import ts from "typescript";
import { Token, TokenSyntaxKind } from "./lexer";
import { type Token, TokenSyntaxKind } from "./lexer";
import { ReflectionSymbolId } from "../../models/reflections/ReflectionSymbolId";
import { resolveAliasedSymbol } from "../utils/symbols";

Expand Down
2 changes: 1 addition & 1 deletion src/lib/converter/comments/declarationReferenceResolver.ts
Expand Up @@ -3,7 +3,7 @@ import {
ContainerReflection,
DeclarationReflection,
ReferenceReflection,
Reflection,
type Reflection,
ReflectionKind,
} from "../../models";
import { assertNever, filterMap } from "../../utils";
Expand Down
2 changes: 1 addition & 1 deletion src/lib/converter/comments/discovery.ts
@@ -1,6 +1,6 @@
import ts from "typescript";
import { ReflectionKind } from "../../models";
import { assertNever, Logger } from "../../utils";
import { assertNever, type Logger } from "../../utils";
import { CommentStyle } from "../../utils/options/declaration";
import { nicePath } from "../../utils/paths";
import { ok } from "assert";
Expand Down
4 changes: 2 additions & 2 deletions src/lib/converter/comments/index.ts
@@ -1,13 +1,13 @@
import ts from "typescript";
import { Comment, ReflectionKind } from "../../models";
import { assertNever, Logger } from "../../utils";
import { assertNever, type Logger } from "../../utils";
import type {
CommentStyle,
JsDocCompatibility,
} from "../../utils/options/declaration";
import { lexBlockComment } from "./blockLexer";
import {
DiscoveredComment,
type DiscoveredComment,
discoverComment,
discoverFileComment,
discoverNodeComment,
Expand Down
2 changes: 1 addition & 1 deletion src/lib/converter/comments/lineLexer.ts
@@ -1,5 +1,5 @@
import type * as ts from "typescript";
import { Token, TokenSyntaxKind } from "./lexer";
import { type Token, TokenSyntaxKind } from "./lexer";

export function* lexLineComments(
file: string,
Expand Down
10 changes: 5 additions & 5 deletions src/lib/converter/comments/linkResolver.ts
@@ -1,14 +1,14 @@
import ts from "typescript";
import {
Comment,
CommentDisplayPart,
type Comment,
type CommentDisplayPart,
DeclarationReflection,
InlineTagDisplayPart,
Reflection,
type InlineTagDisplayPart,
type Reflection,
ReflectionSymbolId,
} from "../../models";
import {
DeclarationReference,
type DeclarationReference,
parseDeclarationReference,
} from "./declarationReference";
import { resolveDeclarationReference } from "./declarationReferenceResolver";
Expand Down
8 changes: 4 additions & 4 deletions src/lib/converter/comments/parser.ts
Expand Up @@ -2,14 +2,14 @@ import { ok } from "assert";
import type { CommentParserConfig } from ".";
import {
Comment,
CommentDisplayPart,
type CommentDisplayPart,
CommentTag,
InlineTagDisplayPart,
type InlineTagDisplayPart,
} from "../../models";
import { assertNever, Logger, removeIf } from "../../utils";
import { assertNever, type Logger, removeIf } from "../../utils";
import type { MinimalSourceFile } from "../../utils/minimalSourceFile";
import { nicePath } from "../../utils/paths";
import { Token, TokenSyntaxKind } from "./lexer";
import { type Token, TokenSyntaxKind } from "./lexer";
import { extractTagName } from "./tagName";
import type {
TranslatedString,
Expand Down
2 changes: 1 addition & 1 deletion src/lib/converter/comments/rawLexer.ts
@@ -1,4 +1,4 @@
import { Token, TokenSyntaxKind } from "./lexer";
import { type Token, TokenSyntaxKind } from "./lexer";

export function* lexCommentString(
file: string,
Expand Down
4 changes: 2 additions & 2 deletions src/lib/converter/context.ts
Expand Up @@ -2,8 +2,8 @@ import { ok as assert } from "assert";
import ts from "typescript";

import {
Reflection,
ProjectReflection,
type Reflection,
type ProjectReflection,
ContainerReflection,
DeclarationReflection,
ReflectionKind,
Expand Down
12 changes: 6 additions & 6 deletions src/lib/converter/converter.ts
Expand Up @@ -3,12 +3,12 @@ import ts from "typescript";
import type { Application } from "../application";
import {
Comment,
CommentDisplayPart,
type CommentDisplayPart,
ProjectReflection,
Reflection,
type Reflection,
ReflectionKind,
ReflectionSymbolId,
SomeType,
type ReflectionSymbolId,
type SomeType,
} from "../models/index";
import { Context } from "./context";
import { ConverterComponent } from "./components";
Expand All @@ -31,8 +31,8 @@ import { lexCommentString } from "./comments/rawLexer";
import {
resolvePartLinks,
resolveLinks,
ExternalSymbolResolver,
ExternalResolveResult,
type ExternalSymbolResolver,
type ExternalResolveResult,
} from "./comments/linkResolver";
import type { DeclarationReference } from "./comments/declarationReference";

Expand Down
2 changes: 1 addition & 1 deletion src/lib/converter/factories/signature.ts
Expand Up @@ -7,7 +7,7 @@ import {
ParameterReflection,
PredicateType,
ReferenceType,
Reflection,
type Reflection,
ReflectionFlag,
ReflectionKind,
SignatureReflection,
Expand Down
2 changes: 1 addition & 1 deletion src/lib/converter/plugins/CategoryPlugin.ts
@@ -1,6 +1,6 @@
import {
ContainerReflection,
DeclarationReflection,
type DeclarationReflection,
Comment,
} from "../../models";
import { ReflectionCategory } from "../../models";
Expand Down
10 changes: 5 additions & 5 deletions src/lib/converter/plugins/CommentPlugin.ts
Expand Up @@ -2,17 +2,17 @@ import { Component, ConverterComponent } from "../components";
import { Converter } from "../converter";
import type { Context } from "../context";
import {
Reflection,
type Reflection,
ReflectionFlag,
ReflectionKind,
TypeParameterReflection,
type TypeParameterReflection,
DeclarationReflection,
SignatureReflection,
ParameterReflection,
type ParameterReflection,
Comment,
ReflectionType,
SourceReference,
TypeVisitor,
type SourceReference,
type TypeVisitor,
CommentTag,
} from "../../models";
import {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/converter/plugins/GroupPlugin.ts
@@ -1,7 +1,7 @@
import {
ReflectionKind,
ContainerReflection,
DeclarationReflection,
type DeclarationReflection,
} from "../../models/reflections/index";
import { ReflectionGroup } from "../../models/ReflectionGroup";
import { Component, ConverterComponent } from "../components";
Expand Down
8 changes: 4 additions & 4 deletions src/lib/converter/plugins/ImplementsPlugin.ts
@@ -1,14 +1,14 @@
import ts from "typescript";
import { ApplicationEvents } from "../../application-events";
import {
ContainerReflection,
type ContainerReflection,
DeclarationReflection,
ProjectReflection,
Reflection,
type ProjectReflection,
type Reflection,
ReflectionKind,
SignatureReflection,
} from "../../models/reflections/index";
import { ReferenceType, ReflectionType, Type } from "../../models/types";
import { ReferenceType, ReflectionType, type Type } from "../../models/types";
import { filterMap, zip } from "../../utils/array";
import { Component, ConverterComponent } from "../components";
import type { Context } from "../context";
Expand Down
4 changes: 2 additions & 2 deletions src/lib/converter/plugins/InheritDocPlugin.ts
@@ -1,7 +1,7 @@
import {
Comment,
DeclarationReflection,
ProjectReflection,
type ProjectReflection,
ReflectionKind,
ReflectionType,
SignatureReflection,
Expand All @@ -10,7 +10,7 @@ import { Component, ConverterComponent } from "../components";
import { Converter } from "../converter";
import type { Context } from "../context";
import type { Reflection } from "../../models/reflections/abstract";
import { Option, DefaultMap, ValidationOptions } from "../../utils";
import { Option, DefaultMap, type ValidationOptions } from "../../utils";
import { zip } from "../../utils/array";
import { parseDeclarationReference } from "../comments/declarationReference";
import { resolveDeclarationReference } from "../comments/declarationReferenceResolver";
Expand Down
8 changes: 4 additions & 4 deletions src/lib/converter/plugins/LinkResolverPlugin.ts
@@ -1,13 +1,13 @@
import { Component, ConverterComponent } from "../components";
import type { Context, ExternalResolveResult } from "../../converter";
import { ConverterEvents } from "../converter-events";
import { Option, ValidationOptions } from "../../utils";
import { Option, type ValidationOptions } from "../../utils";
import {
ContainerReflection,
DeclarationReflection,
ProjectReflection,
Reflection,
ReflectionCategory,
type ProjectReflection,
type Reflection,
type ReflectionCategory,
} from "../../models";
import { discoverAllReferenceTypes } from "../../utils/reflections";
import { ApplicationEvents } from "../../application-events";
Expand Down
2 changes: 1 addition & 1 deletion src/lib/converter/plugins/SourcePlugin.ts
Expand Up @@ -15,7 +15,7 @@ import {
AssumedRepository,
gitIsInstalled,
GitRepository,
Repository,
type Repository,
} from "../utils/repository";
import { BasePath } from "../utils/base-path";

Expand Down
8 changes: 4 additions & 4 deletions src/lib/converter/plugins/TypePlugin.ts
@@ -1,11 +1,11 @@
import {
ReflectionKind,
DeclarationReflection,
DeclarationHierarchy,
ProjectReflection,
Reflection,
type DeclarationHierarchy,
type ProjectReflection,
type Reflection,
} from "../../models/reflections/index";
import { Type, ReferenceType } from "../../models/types";
import { type Type, ReferenceType } from "../../models/types";
import { Component, ConverterComponent } from "../components";
import { Converter } from "../converter";
import type { Context } from "../context";
Expand Down
2 changes: 1 addition & 1 deletion src/lib/converter/symbols.ts
Expand Up @@ -5,7 +5,7 @@ import {
IntrinsicType,
LiteralType,
ReferenceReflection,
Reflection,
type Reflection,
ReflectionFlag,
ReflectionKind,
ConversionFlags,
Expand Down
2 changes: 1 addition & 1 deletion src/lib/converter/types.ts
Expand Up @@ -25,7 +25,7 @@ import {
OptionalType,
RestType,
TemplateLiteralType,
SomeType,
type SomeType,
} from "../models";
import { ReflectionSymbolId } from "../models/reflections/ReflectionSymbolId";
import { zip } from "../utils/array";
Expand Down
2 changes: 1 addition & 1 deletion src/lib/converter/utils/reflections.ts
@@ -1,4 +1,4 @@
import { IntrinsicType, SomeType, UnionType } from "../../models";
import { IntrinsicType, type SomeType, UnionType } from "../../models";

export function removeUndefined(type: SomeType): SomeType {
if (type instanceof UnionType) {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/models/reflections/container.ts
@@ -1,4 +1,4 @@
import { Reflection, TraverseCallback, TraverseProperty } from "./abstract";
import { Reflection, type TraverseCallback, TraverseProperty } from "./abstract";
import { ReflectionCategory } from "../ReflectionCategory";
import { ReflectionGroup } from "../ReflectionGroup";
import type { ReflectionKind } from "./kind";
Expand Down
4 changes: 2 additions & 2 deletions src/lib/models/reflections/declaration.ts
@@ -1,11 +1,11 @@
import type * as ts from "typescript";
import { ReferenceType, ReflectionType, Type, type SomeType } from "../types";
import { type ReferenceType, ReflectionType, type Type, type SomeType } from "../types";
import { type TraverseCallback, TraverseProperty } from "./abstract";
import { ContainerReflection } from "./container";
import type { SignatureReflection } from "./signature";
import type { TypeParameterReflection } from "./type-parameter";
import type { Serializer, JSONOutput, Deserializer } from "../../serialization";
import { Comment, CommentDisplayPart } from "../comments";
import { Comment, type CommentDisplayPart } from "../comments";
import { SourceReference } from "../sources/file";
import { ReflectionSymbolId } from "./ReflectionSymbolId";
import { ReflectionKind } from "./kind";
Expand Down
2 changes: 1 addition & 1 deletion src/lib/models/reflections/parameter.ts
@@ -1,6 +1,6 @@
import type { SomeType } from "..";
import { ReflectionType } from "../types";
import { Reflection, TraverseCallback, TraverseProperty } from "./abstract";
import { Reflection, type TraverseCallback, TraverseProperty } from "./abstract";
import type { SignatureReflection } from "./signature";
import type { Serializer, JSONOutput, Deserializer } from "../../serialization";

Expand Down
4 changes: 2 additions & 2 deletions src/lib/models/reflections/project.ts
@@ -1,4 +1,4 @@
import { Reflection, TraverseProperty } from "./abstract";
import { type Reflection, TraverseProperty } from "./abstract";
import { ContainerReflection } from "./container";
import { ReferenceReflection } from "./reference";
import type { DeclarationReflection } from "./declaration";
Expand All @@ -9,7 +9,7 @@ import type { TypeParameterReflection } from "./type-parameter";
import { removeIf, removeIfPresent } from "../../utils";
import type * as ts from "typescript";
import { ReflectionKind } from "./kind";
import { Comment, CommentDisplayPart } from "../comments";
import { Comment, type CommentDisplayPart } from "../comments";
import { ReflectionSymbolId } from "./ReflectionSymbolId";
import type { Serializer } from "../../serialization/serializer";
import type { Deserializer, JSONOutput } from "../../serialization/index";
Expand Down
4 changes: 2 additions & 2 deletions src/lib/models/reflections/signature.ts
@@ -1,5 +1,5 @@
import { SomeType, ReflectionType, ReferenceType } from "../types";
import { Reflection, TraverseProperty, TraverseCallback } from "./abstract";
import { type SomeType, ReflectionType, type ReferenceType } from "../types";
import { Reflection, TraverseProperty, type TraverseCallback } from "./abstract";
import type { ParameterReflection } from "./parameter";
import type { TypeParameterReflection } from "./type-parameter";
import type { DeclarationReflection } from "./declaration";
Expand Down
2 changes: 1 addition & 1 deletion src/lib/models/reflections/type-parameter.ts
@@ -1,5 +1,5 @@
import type { SomeType } from "../types";
import { Reflection, TraverseCallback } from "./abstract";
import { Reflection, type TraverseCallback } from "./abstract";
import type { DeclarationReflection } from "./declaration";
import { ReflectionKind } from "./kind";
import type { Serializer, JSONOutput, Deserializer } from "../../serialization";
Expand Down

0 comments on commit b255bc0

Please sign in to comment.