Skip to content

Commit

Permalink
style: eslint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
schoero committed Jan 18, 2025
1 parent b3a9e67 commit cf97971
Show file tree
Hide file tree
Showing 281 changed files with 195 additions and 478 deletions.
2 changes: 0 additions & 2 deletions src/api/browser.entry.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import ts from "typescript";

import { convertDiagnostics, reportCompilerDiagnostics } from "unwritten:compiler/shared";
import { createConfig } from "unwritten:config/config";
import { createContext as createInterpreterContext } from "unwritten:interpreter:utils/context";
Expand All @@ -13,7 +12,6 @@ import { createContext as createRenderContext } from "unwritten:renderer:utils/c
import { createContext as createDefaultContext } from "unwritten:utils:context";

import type { Program } from "typescript";

import type { BrowserAPIOptions } from "unwritten:type-definitions/options";
import type { UnwrittenOutput } from "unwritten:type-definitions/unwritten";

Expand Down
1 change: 0 additions & 1 deletion src/api/node.entry.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import ts from "typescript";

import { compile } from "unwritten:compiler:node";
import { convertDiagnostics, reportCompilerDiagnostics } from "unwritten:compiler/shared";
import { createConfig } from "unwritten:config/config";
Expand Down
1 change: 0 additions & 1 deletion src/bin/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/usr/bin/env node

import { cac } from "cac";

import { BuiltInRenderers } from "unwritten:renderer/enums/renderer";
import { name, version } from "unwritten:utils/package-json.entry";

Expand Down
1 change: 0 additions & 1 deletion src/compiler/node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { getDefaultCompilerOptions, reportCompilerDiagnostics } from "unwritten:
import { findFile } from "unwritten:utils:finder";

import type { CompilerOptions } from "typescript";

import type { DefaultNodeContext } from "unwritten:type-definitions/context";


Expand Down
2 changes: 0 additions & 2 deletions src/compiler/shared.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import { highlight as tinyHighlight } from "tinyhighlight";

import { DiagnosticSeverity } from "unwritten:type-definitions/unwritten";
import { findCommonIndentation, removeCommonIndentation } from "unwritten:utils/template";

import type { TokenColors } from "tinyhighlight";
import type { CompilerOptions, Diagnostic, DiagnosticMessageChain, SourceFile } from "typescript";

import type { DefaultContext } from "unwritten:type-definitions/context";
import type { DiagnosticMessage } from "unwritten:type-definitions/unwritten";

Expand Down
3 changes: 1 addition & 2 deletions src/config/config.test.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
/* eslint-disable eslint-plugin-typescript/naming-convention */
import { beforeAll, expect, it, vitest } from "vitest";

import { createConfig } from "unwritten:config/config";
import { createRenderContext } from "unwritten:tests:utils/context";
import { scope } from "unwritten:tests:utils/scope";
import { mkdirSync, readFileSync, writeFileSync } from "unwritten:tests:utils/virtual-fs";
import { beforeAll, expect, it, vitest } from "vitest";


scope("Integration", "Config", async () => {
Expand Down
3 changes: 1 addition & 2 deletions src/config/generator.entry.test.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { afterEach, beforeAll, expect, it, vitest } from "vitest";

import { generateConfig } from "unwritten:config/generator.entry";
import { scope } from "unwritten:tests:utils/scope";
import { clearVirtualFS, existsSync } from "unwritten:tests:utils/virtual-fs";
import { afterEach, beforeAll, expect, it, vitest } from "vitest";


scope("Integration", "generateConfig", () => {
Expand Down
3 changes: 1 addition & 2 deletions src/interpreter/ast/entities/circular.test.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import { assert, expect, it } from "vitest";

import { createInterfaceEntity } from "unwritten:interpreter:ast/entities/index";
import { EntityKind } from "unwritten:interpreter/enums/entity";
import { TypeKind } from "unwritten:interpreter/enums/type";
import { compile } from "unwritten:tests:utils/compile";
import { scope } from "unwritten:tests:utils/scope";
import { ts } from "unwritten:utils/template";
import { assert, expect, it } from "vitest";


scope("Interpreter", EntityKind.Circular, () => {
Expand Down
1 change: 0 additions & 1 deletion src/interpreter/ast/entities/circular.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { getPositionBySymbol } from "unwritten:interpreter:ast/shared/position";
import { EntityKind } from "unwritten:interpreter/enums/entity";

import type { Symbol } from "typescript";

import type { CircularEntity } from "unwritten:interpreter:type-definitions/entities";
import type { InterpreterContext } from "unwritten:type-definitions/context";

Expand Down
3 changes: 1 addition & 2 deletions src/interpreter/ast/entities/class.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { expect, it } from "vitest";

import { createClassEntity } from "unwritten:interpreter:ast/entities/index";
import { getSymbolId } from "unwritten:interpreter:ast/shared/id";
import { EntityKind } from "unwritten:interpreter/enums/entity";
Expand All @@ -8,6 +6,7 @@ import { scope } from "unwritten:tests:utils/scope";
import { isJSDocText } from "unwritten:typeguards/jsdoc";
import { assert } from "unwritten:utils/general";
import { ts } from "unwritten:utils/template";
import { expect, it } from "vitest";


scope("Interpreter", EntityKind.Class, () => {
Expand Down
1 change: 0 additions & 1 deletion src/interpreter/ast/entities/class.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import { isExpressionType } from "unwritten:typeguards/types";
import { assert } from "unwritten:utils:general";

import type { ClassLikeDeclaration, HeritageClause, NodeArray, Symbol } from "typescript";

import type { ClassEntity } from "unwritten:interpreter:type-definitions/entities";
import type { ExpressionType } from "unwritten:interpreter:type-definitions/types";
import type { InterpreterContext } from "unwritten:type-definitions/context";
Expand Down
3 changes: 1 addition & 2 deletions src/interpreter/ast/entities/constructor.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { expect, it } from "vitest";

import { createClassEntity } from "unwritten:interpreter:ast/entities/index";
import { EntityKind } from "unwritten:interpreter/enums/entity";
import { compile } from "unwritten:tests:utils/compile";
Expand All @@ -8,6 +6,7 @@ import { isJSDocText } from "unwritten:typeguards/jsdoc";
import { isCircularType } from "unwritten:typeguards/types";
import { assert } from "unwritten:utils/general";
import { ts } from "unwritten:utils/template";
import { expect, it } from "vitest";


scope("Interpreter", EntityKind.Getter, () => {
Expand Down
1 change: 0 additions & 1 deletion src/interpreter/ast/entities/constructor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { createFunctionLikeEntity } from "unwritten:interpreter:ast/entities/ind
import { EntityKind } from "unwritten:interpreter/enums/entity";

import type { Symbol } from "typescript";

import type { ConstructorEntity } from "unwritten:interpreter:type-definitions/entities";
import type { InterpreterContext } from "unwritten:type-definitions/context";

Expand Down
3 changes: 1 addition & 2 deletions src/interpreter/ast/entities/enum.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { assert, expect, it } from "vitest";

import { createEnumEntity } from "unwritten:interpreter:ast/entities/index";
import { getSymbolId } from "unwritten:interpreter:ast/shared/id";
import { EntityKind } from "unwritten:interpreter/enums/entity";
Expand All @@ -8,6 +6,7 @@ import { compile } from "unwritten:tests:utils/compile";
import { scope } from "unwritten:tests:utils/scope";
import { isJSDocText } from "unwritten:typeguards/jsdoc";
import { ts } from "unwritten:utils/template";
import { assert, expect, it } from "vitest";


scope("Interpreter", EntityKind.Enum, () => {
Expand Down
1 change: 0 additions & 1 deletion src/interpreter/ast/entities/enum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { assert } from "unwritten:utils:general";
import { getTypeByDeclaration } from "../type";

import type { EnumDeclaration, Symbol, EnumMember as TSEnumMember } from "typescript";

import type { EnumEntity, EnumMemberEntity, MergedEnumEntity } from "unwritten:interpreter:type-definitions/entities";
import type { InterpreterContext } from "unwritten:type-definitions/context";

Expand Down
3 changes: 1 addition & 2 deletions src/interpreter/ast/entities/export-assignment.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { expect, it } from "vitest";

import { createExportAssignmentEntity } from "unwritten:interpreter:ast/entities/index";
import { TypeKind } from "unwritten:interpreter/enums/type";
import { compile } from "unwritten:tests:utils/compile";
Expand All @@ -8,6 +6,7 @@ import { isExportAssignmentEntity } from "unwritten:typeguards/entities";
import { isJSDocText } from "unwritten:typeguards/jsdoc";
import { assert } from "unwritten:utils/general";
import { ts } from "unwritten:utils/template";
import { expect, it } from "vitest";


scope("Interpreter", "Export assignment", () => {
Expand Down
1 change: 0 additions & 1 deletion src/interpreter/ast/entities/export-assignment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { assert } from "unwritten:utils/general";
import { getTypeByType } from "../type";

import type { Symbol } from "typescript";

import type { ExportAssignmentEntity } from "unwritten:interpreter:type-definitions/entities";
import type { InterpreterContext } from "unwritten:type-definitions/context";

Expand Down
3 changes: 1 addition & 2 deletions src/interpreter/ast/entities/function-like.test.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import { describe, expect, it } from "vitest";

import { createFunctionLikeEntity } from "unwritten:interpreter:ast/entities/index";
import { EntityKind } from "unwritten:interpreter/enums/entity";
import { compile } from "unwritten:tests:utils/compile";
import { scope } from "unwritten:tests:utils/scope";
import { ts } from "unwritten:utils/template";
import { describe, expect, it } from "vitest";


scope("Interpreter", EntityKind.Function, () => {
Expand Down
1 change: 0 additions & 1 deletion src/interpreter/ast/entities/function-like.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import { withCachedEntity, withLockedSymbol } from "unwritten:interpreter/utils/
import { assert } from "unwritten:utils/general";

import type { Symbol } from "typescript";

import type {
FunctionLikeEntityKinds,
InferFunctionLikeEntityKind
Expand Down
3 changes: 1 addition & 2 deletions src/interpreter/ast/entities/function.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { expect, it } from "vitest";

import { getSymbolId } from "unwritten:interpreter:ast/shared/id";
import { EntityKind } from "unwritten:interpreter/enums/entity";
import { TypeKind } from "unwritten:interpreter/enums/type";
Expand All @@ -9,6 +7,7 @@ import { isJSDocText } from "unwritten:typeguards/jsdoc";
import { isUnresolvedType } from "unwritten:typeguards/types";
import { assert } from "unwritten:utils/general";
import { ts } from "unwritten:utils/template";
import { expect, it } from "vitest";

import { createFunctionEntity } from "./function";

Expand Down
1 change: 0 additions & 1 deletion src/interpreter/ast/entities/function.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { createFunctionLikeEntity } from "unwritten:interpreter:ast/entities/ind
import { EntityKind } from "unwritten:interpreter/enums/entity";

import type { Symbol } from "typescript";

import type { FunctionEntity } from "unwritten:interpreter:type-definitions/entities";
import type { InterpreterContext } from "unwritten:type-definitions/context";

Expand Down
3 changes: 1 addition & 2 deletions src/interpreter/ast/entities/getter.test.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import { expect, it } from "vitest";

import { createClassEntity } from "unwritten:interpreter:ast/entities/index";
import { EntityKind } from "unwritten:interpreter/enums/entity";
import { compile } from "unwritten:tests:utils/compile";
import { scope } from "unwritten:tests:utils/scope";
import { isJSDocText } from "unwritten:typeguards/jsdoc";
import { assert } from "unwritten:utils/general";
import { ts } from "unwritten:utils/template";
import { expect, it } from "vitest";


scope("Interpreter", EntityKind.Getter, () => {
Expand Down
1 change: 0 additions & 1 deletion src/interpreter/ast/entities/getter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { createFunctionLikeEntity } from "unwritten:interpreter:ast/entities/ind
import { EntityKind } from "unwritten:interpreter/enums/entity";

import type { Symbol } from "typescript";

import type { GetterEntity } from "unwritten:interpreter:type-definitions/entities";
import type { InterpreterContext } from "unwritten:type-definitions/context";

Expand Down
3 changes: 1 addition & 2 deletions src/interpreter/ast/entities/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { expect, it } from "vitest";

import { getExportsFromIndexFile, getFilesInDirectory } from "unwritten:tests:utils/export";
import { scope } from "unwritten:tests:utils/scope";
import { expect, it } from "vitest";


scope("Interpreter", "Entities", () => {
Expand Down
3 changes: 1 addition & 2 deletions src/interpreter/ast/entities/interface.test.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import { assert, expect, it } from "vitest";

import { createInterfaceEntity } from "unwritten:interpreter:ast/entities/index";
import { EntityKind } from "unwritten:interpreter/enums/entity";
import { TypeKind } from "unwritten:interpreter/enums/type";
import { compile } from "unwritten:tests:utils/compile";
import { scope } from "unwritten:tests:utils/scope";
import { isJSDocText } from "unwritten:typeguards/jsdoc";
import { ts } from "unwritten:utils/template";
import { assert, expect, it } from "vitest";


scope("Interpreter", EntityKind.Interface, () => {
Expand Down
1 change: 0 additions & 1 deletion src/interpreter/ast/entities/interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import { isExpressionType } from "unwritten:typeguards/types";
import { assert } from "unwritten:utils:general";

import type { HeritageClause, InterfaceDeclaration, NodeArray, Symbol } from "typescript";

import type { InterfaceEntity, MergedInterfaceEntity } from "unwritten:interpreter:type-definitions/entities";
import type { ExpressionType } from "unwritten:interpreter:type-definitions/types";
import type { InterpreterContext } from "unwritten:type-definitions/context";
Expand Down
3 changes: 1 addition & 2 deletions src/interpreter/ast/entities/method.test.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import { expect, it } from "vitest";

import { createClassEntity } from "unwritten:interpreter:ast/entities/index";
import { EntityKind } from "unwritten:interpreter/enums/entity";
import { compile } from "unwritten:tests:utils/compile";
import { scope } from "unwritten:tests:utils/scope";
import { isJSDocText } from "unwritten:typeguards/jsdoc";
import { assert } from "unwritten:utils/general";
import { ts } from "unwritten:utils/template";
import { expect, it } from "vitest";


scope("Interpreter", EntityKind.Method, () => {
Expand Down
1 change: 0 additions & 1 deletion src/interpreter/ast/entities/method.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { createFunctionLikeEntity } from "unwritten:interpreter:ast/entities/ind
import { EntityKind } from "unwritten:interpreter/enums/entity";

import type { Symbol } from "typescript";

import type { MethodEntity } from "unwritten:interpreter:type-definitions/entities";
import type { InterpreterContext } from "unwritten:type-definitions/context";

Expand Down
3 changes: 1 addition & 2 deletions src/interpreter/ast/entities/module.test.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import { expect, it } from "vitest";

import { createModuleEntity } from "unwritten:interpreter:ast/entities/index";
import { EntityKind } from "unwritten:interpreter/enums/entity";
import { compile } from "unwritten:tests:utils/compile";
import { scope } from "unwritten:tests:utils/scope";
import { isJSDocText } from "unwritten:typeguards/jsdoc";
import { assert } from "unwritten:utils/general";
import { ts } from "unwritten:utils/template";
import { expect, it } from "vitest";


scope("Interpreter", EntityKind.Module, () => {
Expand Down
1 change: 0 additions & 1 deletion src/interpreter/ast/entities/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { withCachedEntity, withLockedSymbol } from "unwritten:interpreter/utils/
import { createSourceFileEntity } from "./source-file";

import type { Symbol } from "typescript";

import type { ModuleEntity } from "unwritten:interpreter:type-definitions/entities";
import type { InterpreterContext } from "unwritten:type-definitions/context";

Expand Down
3 changes: 1 addition & 2 deletions src/interpreter/ast/entities/namespace.test.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import { expect, it } from "vitest";

import { createNamespaceEntity } from "unwritten:interpreter:ast/entities/index";
import { EntityKind } from "unwritten:interpreter/enums/entity";
import { compile } from "unwritten:tests:utils/compile";
import { scope } from "unwritten:tests:utils/scope";
import { isJSDocText } from "unwritten:typeguards/jsdoc";
import { assert } from "unwritten:utils/general";
import { ts } from "unwritten:utils/template";
import { expect, it } from "vitest";


scope("Interpreter", EntityKind.Namespace, () => {
Expand Down
1 change: 0 additions & 1 deletion src/interpreter/ast/entities/namespace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { withCachedEntity, withLockedSymbol } from "unwritten:interpreter/utils/
import { assert } from "unwritten:utils/general";

import type { Symbol } from "typescript";

import type { NamespaceEntity } from "unwritten:interpreter:type-definitions/entities";
import type { InterpreterContext } from "unwritten:type-definitions/context";

Expand Down
3 changes: 1 addition & 2 deletions src/interpreter/ast/entities/parameter.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { expect, it } from "vitest";

import { createFunctionEntity } from "unwritten:interpreter:ast/entities/index";
import { EntityKind } from "unwritten:interpreter/enums/entity";
import { TypeKind } from "unwritten:interpreter/enums/type";
Expand All @@ -8,6 +6,7 @@ import { scope } from "unwritten:tests:utils/scope";
import { isJSDocText } from "unwritten:typeguards/jsdoc";
import { assert } from "unwritten:utils/general";
import { ts } from "unwritten:utils/template";
import { expect, it } from "vitest";


scope("Interpreter", EntityKind.Parameter, () => {
Expand Down
1 change: 0 additions & 1 deletion src/interpreter/ast/entities/parameter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import { assert } from "unwritten:utils:general";
import { getTypeBySymbol } from "../type";

import type { Symbol } from "typescript";

import type { ParameterEntity } from "unwritten:interpreter:type-definitions/entities";
import type { InterpreterContext } from "unwritten:type-definitions/context";

Expand Down
3 changes: 1 addition & 2 deletions src/interpreter/ast/entities/property.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { assert, expect, it } from "vitest";

import {
createClassEntity,
createTypeAliasEntity,
Expand All @@ -12,6 +10,7 @@ import { scope } from "unwritten:tests:utils/scope";
import { isJSDocText } from "unwritten:typeguards/jsdoc";
import { isObjectType, isStringLiteralType, isTypeReferenceType } from "unwritten:typeguards/types";
import { ts } from "unwritten:utils/template";
import { assert, expect, it } from "vitest";


scope("Interpreter", EntityKind.Property, () => {
Expand Down
1 change: 0 additions & 1 deletion src/interpreter/ast/entities/property.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import type {
ShorthandPropertyAssignment,
Symbol
} from "typescript";

import type { PropertyEntity } from "unwritten:interpreter:type-definitions/entities";
import type { InterpreterContext } from "unwritten:type-definitions/context";

Expand Down
3 changes: 1 addition & 2 deletions src/interpreter/ast/entities/setter.test.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import { expect, it } from "vitest";

import { createClassEntity } from "unwritten:interpreter:ast/entities/index";
import { EntityKind } from "unwritten:interpreter/enums/entity";
import { compile } from "unwritten:tests:utils/compile";
import { scope } from "unwritten:tests:utils/scope";
import { isJSDocText } from "unwritten:typeguards/jsdoc";
import { assert } from "unwritten:utils/general";
import { ts } from "unwritten:utils/template";
import { expect, it } from "vitest";


scope("Interpreter", EntityKind.Setter, () => {
Expand Down
Loading

0 comments on commit cf97971

Please sign in to comment.