Skip to content

Commit cf97971

Browse files
committed
style: eslint fixes
1 parent b3a9e67 commit cf97971

File tree

281 files changed

+195
-478
lines changed

Some content is hidden

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

281 files changed

+195
-478
lines changed

src/api/browser.entry.ts

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import ts from "typescript";
2-
32
import { convertDiagnostics, reportCompilerDiagnostics } from "unwritten:compiler/shared";
43
import { createConfig } from "unwritten:config/config";
54
import { createContext as createInterpreterContext } from "unwritten:interpreter:utils/context";
@@ -13,7 +12,6 @@ import { createContext as createRenderContext } from "unwritten:renderer:utils/c
1312
import { createContext as createDefaultContext } from "unwritten:utils:context";
1413

1514
import type { Program } from "typescript";
16-
1715
import type { BrowserAPIOptions } from "unwritten:type-definitions/options";
1816
import type { UnwrittenOutput } from "unwritten:type-definitions/unwritten";
1917

src/api/node.entry.ts

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import ts from "typescript";
2-
32
import { compile } from "unwritten:compiler:node";
43
import { convertDiagnostics, reportCompilerDiagnostics } from "unwritten:compiler/shared";
54
import { createConfig } from "unwritten:config/config";

src/bin/index.ts

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#!/usr/bin/env node
22

33
import { cac } from "cac";
4-
54
import { BuiltInRenderers } from "unwritten:renderer/enums/renderer";
65
import { name, version } from "unwritten:utils/package-json.entry";
76

src/compiler/node.ts

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { getDefaultCompilerOptions, reportCompilerDiagnostics } from "unwritten:
22
import { findFile } from "unwritten:utils:finder";
33

44
import type { CompilerOptions } from "typescript";
5-
65
import type { DefaultNodeContext } from "unwritten:type-definitions/context";
76

87

src/compiler/shared.ts

-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
import { highlight as tinyHighlight } from "tinyhighlight";
2-
32
import { DiagnosticSeverity } from "unwritten:type-definitions/unwritten";
43
import { findCommonIndentation, removeCommonIndentation } from "unwritten:utils/template";
54

65
import type { TokenColors } from "tinyhighlight";
76
import type { CompilerOptions, Diagnostic, DiagnosticMessageChain, SourceFile } from "typescript";
8-
97
import type { DefaultContext } from "unwritten:type-definitions/context";
108
import type { DiagnosticMessage } from "unwritten:type-definitions/unwritten";
119

src/config/config.test.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
/* eslint-disable eslint-plugin-typescript/naming-convention */
2-
import { beforeAll, expect, it, vitest } from "vitest";
3-
42
import { createConfig } from "unwritten:config/config";
53
import { createRenderContext } from "unwritten:tests:utils/context";
64
import { scope } from "unwritten:tests:utils/scope";
75
import { mkdirSync, readFileSync, writeFileSync } from "unwritten:tests:utils/virtual-fs";
6+
import { beforeAll, expect, it, vitest } from "vitest";
87

98

109
scope("Integration", "Config", async () => {

src/config/generator.entry.test.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
import { afterEach, beforeAll, expect, it, vitest } from "vitest";
2-
31
import { generateConfig } from "unwritten:config/generator.entry";
42
import { scope } from "unwritten:tests:utils/scope";
53
import { clearVirtualFS, existsSync } from "unwritten:tests:utils/virtual-fs";
4+
import { afterEach, beforeAll, expect, it, vitest } from "vitest";
65

76

87
scope("Integration", "generateConfig", () => {

src/interpreter/ast/entities/circular.test.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
import { assert, expect, it } from "vitest";
2-
31
import { createInterfaceEntity } from "unwritten:interpreter:ast/entities/index";
42
import { EntityKind } from "unwritten:interpreter/enums/entity";
53
import { TypeKind } from "unwritten:interpreter/enums/type";
64
import { compile } from "unwritten:tests:utils/compile";
75
import { scope } from "unwritten:tests:utils/scope";
86
import { ts } from "unwritten:utils/template";
7+
import { assert, expect, it } from "vitest";
98

109

1110
scope("Interpreter", EntityKind.Circular, () => {

src/interpreter/ast/entities/circular.ts

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { getPositionBySymbol } from "unwritten:interpreter:ast/shared/position";
44
import { EntityKind } from "unwritten:interpreter/enums/entity";
55

66
import type { Symbol } from "typescript";
7-
87
import type { CircularEntity } from "unwritten:interpreter:type-definitions/entities";
98
import type { InterpreterContext } from "unwritten:type-definitions/context";
109

src/interpreter/ast/entities/class.test.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import { expect, it } from "vitest";
2-
31
import { createClassEntity } from "unwritten:interpreter:ast/entities/index";
42
import { getSymbolId } from "unwritten:interpreter:ast/shared/id";
53
import { EntityKind } from "unwritten:interpreter/enums/entity";
@@ -8,6 +6,7 @@ import { scope } from "unwritten:tests:utils/scope";
86
import { isJSDocText } from "unwritten:typeguards/jsdoc";
97
import { assert } from "unwritten:utils/general";
108
import { ts } from "unwritten:utils/template";
9+
import { expect, it } from "vitest";
1110

1211

1312
scope("Interpreter", EntityKind.Class, () => {

src/interpreter/ast/entities/class.ts

-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ import { isExpressionType } from "unwritten:typeguards/types";
2626
import { assert } from "unwritten:utils:general";
2727

2828
import type { ClassLikeDeclaration, HeritageClause, NodeArray, Symbol } from "typescript";
29-
3029
import type { ClassEntity } from "unwritten:interpreter:type-definitions/entities";
3130
import type { ExpressionType } from "unwritten:interpreter:type-definitions/types";
3231
import type { InterpreterContext } from "unwritten:type-definitions/context";

src/interpreter/ast/entities/constructor.test.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import { expect, it } from "vitest";
2-
31
import { createClassEntity } from "unwritten:interpreter:ast/entities/index";
42
import { EntityKind } from "unwritten:interpreter/enums/entity";
53
import { compile } from "unwritten:tests:utils/compile";
@@ -8,6 +6,7 @@ import { isJSDocText } from "unwritten:typeguards/jsdoc";
86
import { isCircularType } from "unwritten:typeguards/types";
97
import { assert } from "unwritten:utils/general";
108
import { ts } from "unwritten:utils/template";
9+
import { expect, it } from "vitest";
1110

1211

1312
scope("Interpreter", EntityKind.Getter, () => {

src/interpreter/ast/entities/constructor.ts

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { createFunctionLikeEntity } from "unwritten:interpreter:ast/entities/ind
22
import { EntityKind } from "unwritten:interpreter/enums/entity";
33

44
import type { Symbol } from "typescript";
5-
65
import type { ConstructorEntity } from "unwritten:interpreter:type-definitions/entities";
76
import type { InterpreterContext } from "unwritten:type-definitions/context";
87

src/interpreter/ast/entities/enum.test.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import { assert, expect, it } from "vitest";
2-
31
import { createEnumEntity } from "unwritten:interpreter:ast/entities/index";
42
import { getSymbolId } from "unwritten:interpreter:ast/shared/id";
53
import { EntityKind } from "unwritten:interpreter/enums/entity";
@@ -8,6 +6,7 @@ import { compile } from "unwritten:tests:utils/compile";
86
import { scope } from "unwritten:tests:utils/scope";
97
import { isJSDocText } from "unwritten:typeguards/jsdoc";
108
import { ts } from "unwritten:utils/template";
9+
import { assert, expect, it } from "vitest";
1110

1211

1312
scope("Interpreter", EntityKind.Enum, () => {

src/interpreter/ast/entities/enum.ts

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import { assert } from "unwritten:utils:general";
1010
import { getTypeByDeclaration } from "../type";
1111

1212
import type { EnumDeclaration, Symbol, EnumMember as TSEnumMember } from "typescript";
13-
1413
import type { EnumEntity, EnumMemberEntity, MergedEnumEntity } from "unwritten:interpreter:type-definitions/entities";
1514
import type { InterpreterContext } from "unwritten:type-definitions/context";
1615

src/interpreter/ast/entities/export-assignment.test.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import { expect, it } from "vitest";
2-
31
import { createExportAssignmentEntity } from "unwritten:interpreter:ast/entities/index";
42
import { TypeKind } from "unwritten:interpreter/enums/type";
53
import { compile } from "unwritten:tests:utils/compile";
@@ -8,6 +6,7 @@ import { isExportAssignmentEntity } from "unwritten:typeguards/entities";
86
import { isJSDocText } from "unwritten:typeguards/jsdoc";
97
import { assert } from "unwritten:utils/general";
108
import { ts } from "unwritten:utils/template";
9+
import { expect, it } from "vitest";
1110

1211

1312
scope("Interpreter", "Export assignment", () => {

src/interpreter/ast/entities/export-assignment.ts

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import { assert } from "unwritten:utils/general";
1010
import { getTypeByType } from "../type";
1111

1212
import type { Symbol } from "typescript";
13-
1413
import type { ExportAssignmentEntity } from "unwritten:interpreter:type-definitions/entities";
1514
import type { InterpreterContext } from "unwritten:type-definitions/context";
1615

src/interpreter/ast/entities/function-like.test.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
import { describe, expect, it } from "vitest";
2-
31
import { createFunctionLikeEntity } from "unwritten:interpreter:ast/entities/index";
42
import { EntityKind } from "unwritten:interpreter/enums/entity";
53
import { compile } from "unwritten:tests:utils/compile";
64
import { scope } from "unwritten:tests:utils/scope";
75
import { ts } from "unwritten:utils/template";
6+
import { describe, expect, it } from "vitest";
87

98

109
scope("Interpreter", EntityKind.Function, () => {

src/interpreter/ast/entities/function-like.ts

-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import { withCachedEntity, withLockedSymbol } from "unwritten:interpreter/utils/
1313
import { assert } from "unwritten:utils/general";
1414

1515
import type { Symbol } from "typescript";
16-
1716
import type {
1817
FunctionLikeEntityKinds,
1918
InferFunctionLikeEntityKind

src/interpreter/ast/entities/function.test.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import { expect, it } from "vitest";
2-
31
import { getSymbolId } from "unwritten:interpreter:ast/shared/id";
42
import { EntityKind } from "unwritten:interpreter/enums/entity";
53
import { TypeKind } from "unwritten:interpreter/enums/type";
@@ -9,6 +7,7 @@ import { isJSDocText } from "unwritten:typeguards/jsdoc";
97
import { isUnresolvedType } from "unwritten:typeguards/types";
108
import { assert } from "unwritten:utils/general";
119
import { ts } from "unwritten:utils/template";
10+
import { expect, it } from "vitest";
1211

1312
import { createFunctionEntity } from "./function";
1413

src/interpreter/ast/entities/function.ts

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { createFunctionLikeEntity } from "unwritten:interpreter:ast/entities/ind
22
import { EntityKind } from "unwritten:interpreter/enums/entity";
33

44
import type { Symbol } from "typescript";
5-
65
import type { FunctionEntity } from "unwritten:interpreter:type-definitions/entities";
76
import type { InterpreterContext } from "unwritten:type-definitions/context";
87

src/interpreter/ast/entities/getter.test.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
import { expect, it } from "vitest";
2-
31
import { createClassEntity } from "unwritten:interpreter:ast/entities/index";
42
import { EntityKind } from "unwritten:interpreter/enums/entity";
53
import { compile } from "unwritten:tests:utils/compile";
64
import { scope } from "unwritten:tests:utils/scope";
75
import { isJSDocText } from "unwritten:typeguards/jsdoc";
86
import { assert } from "unwritten:utils/general";
97
import { ts } from "unwritten:utils/template";
8+
import { expect, it } from "vitest";
109

1110

1211
scope("Interpreter", EntityKind.Getter, () => {

src/interpreter/ast/entities/getter.ts

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { createFunctionLikeEntity } from "unwritten:interpreter:ast/entities/ind
22
import { EntityKind } from "unwritten:interpreter/enums/entity";
33

44
import type { Symbol } from "typescript";
5-
65
import type { GetterEntity } from "unwritten:interpreter:type-definitions/entities";
76
import type { InterpreterContext } from "unwritten:type-definitions/context";
87

src/interpreter/ast/entities/index.test.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
import { expect, it } from "vitest";
2-
31
import { getExportsFromIndexFile, getFilesInDirectory } from "unwritten:tests:utils/export";
42
import { scope } from "unwritten:tests:utils/scope";
3+
import { expect, it } from "vitest";
54

65

76
scope("Interpreter", "Entities", () => {

src/interpreter/ast/entities/interface.test.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
import { assert, expect, it } from "vitest";
2-
31
import { createInterfaceEntity } from "unwritten:interpreter:ast/entities/index";
42
import { EntityKind } from "unwritten:interpreter/enums/entity";
53
import { TypeKind } from "unwritten:interpreter/enums/type";
64
import { compile } from "unwritten:tests:utils/compile";
75
import { scope } from "unwritten:tests:utils/scope";
86
import { isJSDocText } from "unwritten:typeguards/jsdoc";
97
import { ts } from "unwritten:utils/template";
8+
import { assert, expect, it } from "vitest";
109

1110

1211
scope("Interpreter", EntityKind.Interface, () => {

src/interpreter/ast/entities/interface.ts

-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ import { isExpressionType } from "unwritten:typeguards/types";
2323
import { assert } from "unwritten:utils:general";
2424

2525
import type { HeritageClause, InterfaceDeclaration, NodeArray, Symbol } from "typescript";
26-
2726
import type { InterfaceEntity, MergedInterfaceEntity } from "unwritten:interpreter:type-definitions/entities";
2827
import type { ExpressionType } from "unwritten:interpreter:type-definitions/types";
2928
import type { InterpreterContext } from "unwritten:type-definitions/context";

src/interpreter/ast/entities/method.test.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
import { expect, it } from "vitest";
2-
31
import { createClassEntity } from "unwritten:interpreter:ast/entities/index";
42
import { EntityKind } from "unwritten:interpreter/enums/entity";
53
import { compile } from "unwritten:tests:utils/compile";
64
import { scope } from "unwritten:tests:utils/scope";
75
import { isJSDocText } from "unwritten:typeguards/jsdoc";
86
import { assert } from "unwritten:utils/general";
97
import { ts } from "unwritten:utils/template";
8+
import { expect, it } from "vitest";
109

1110

1211
scope("Interpreter", EntityKind.Method, () => {

src/interpreter/ast/entities/method.ts

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { createFunctionLikeEntity } from "unwritten:interpreter:ast/entities/ind
22
import { EntityKind } from "unwritten:interpreter/enums/entity";
33

44
import type { Symbol } from "typescript";
5-
65
import type { MethodEntity } from "unwritten:interpreter:type-definitions/entities";
76
import type { InterpreterContext } from "unwritten:type-definitions/context";
87

src/interpreter/ast/entities/module.test.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
import { expect, it } from "vitest";
2-
31
import { createModuleEntity } from "unwritten:interpreter:ast/entities/index";
42
import { EntityKind } from "unwritten:interpreter/enums/entity";
53
import { compile } from "unwritten:tests:utils/compile";
64
import { scope } from "unwritten:tests:utils/scope";
75
import { isJSDocText } from "unwritten:typeguards/jsdoc";
86
import { assert } from "unwritten:utils/general";
97
import { ts } from "unwritten:utils/template";
8+
import { expect, it } from "vitest";
109

1110

1211
scope("Interpreter", EntityKind.Module, () => {

src/interpreter/ast/entities/module.ts

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import { withCachedEntity, withLockedSymbol } from "unwritten:interpreter/utils/
88
import { createSourceFileEntity } from "./source-file";
99

1010
import type { Symbol } from "typescript";
11-
1211
import type { ModuleEntity } from "unwritten:interpreter:type-definitions/entities";
1312
import type { InterpreterContext } from "unwritten:type-definitions/context";
1413

src/interpreter/ast/entities/namespace.test.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
import { expect, it } from "vitest";
2-
31
import { createNamespaceEntity } from "unwritten:interpreter:ast/entities/index";
42
import { EntityKind } from "unwritten:interpreter/enums/entity";
53
import { compile } from "unwritten:tests:utils/compile";
64
import { scope } from "unwritten:tests:utils/scope";
75
import { isJSDocText } from "unwritten:typeguards/jsdoc";
86
import { assert } from "unwritten:utils/general";
97
import { ts } from "unwritten:utils/template";
8+
import { expect, it } from "vitest";
109

1110

1211
scope("Interpreter", EntityKind.Namespace, () => {

src/interpreter/ast/entities/namespace.ts

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import { withCachedEntity, withLockedSymbol } from "unwritten:interpreter/utils/
99
import { assert } from "unwritten:utils/general";
1010

1111
import type { Symbol } from "typescript";
12-
1312
import type { NamespaceEntity } from "unwritten:interpreter:type-definitions/entities";
1413
import type { InterpreterContext } from "unwritten:type-definitions/context";
1514

src/interpreter/ast/entities/parameter.test.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import { expect, it } from "vitest";
2-
31
import { createFunctionEntity } from "unwritten:interpreter:ast/entities/index";
42
import { EntityKind } from "unwritten:interpreter/enums/entity";
53
import { TypeKind } from "unwritten:interpreter/enums/type";
@@ -8,6 +6,7 @@ import { scope } from "unwritten:tests:utils/scope";
86
import { isJSDocText } from "unwritten:typeguards/jsdoc";
97
import { assert } from "unwritten:utils/general";
108
import { ts } from "unwritten:utils/template";
9+
import { expect, it } from "vitest";
1110

1211

1312
scope("Interpreter", EntityKind.Parameter, () => {

src/interpreter/ast/entities/parameter.ts

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import { assert } from "unwritten:utils:general";
1111
import { getTypeBySymbol } from "../type";
1212

1313
import type { Symbol } from "typescript";
14-
1514
import type { ParameterEntity } from "unwritten:interpreter:type-definitions/entities";
1615
import type { InterpreterContext } from "unwritten:type-definitions/context";
1716

src/interpreter/ast/entities/property.test.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import { assert, expect, it } from "vitest";
2-
31
import {
42
createClassEntity,
53
createTypeAliasEntity,
@@ -12,6 +10,7 @@ import { scope } from "unwritten:tests:utils/scope";
1210
import { isJSDocText } from "unwritten:typeguards/jsdoc";
1311
import { isObjectType, isStringLiteralType, isTypeReferenceType } from "unwritten:typeguards/types";
1412
import { ts } from "unwritten:utils/template";
13+
import { assert, expect, it } from "vitest";
1514

1615

1716
scope("Interpreter", EntityKind.Property, () => {

src/interpreter/ast/entities/property.ts

-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ import type {
2525
ShorthandPropertyAssignment,
2626
Symbol
2727
} from "typescript";
28-
2928
import type { PropertyEntity } from "unwritten:interpreter:type-definitions/entities";
3029
import type { InterpreterContext } from "unwritten:type-definitions/context";
3130

src/interpreter/ast/entities/setter.test.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
import { expect, it } from "vitest";
2-
31
import { createClassEntity } from "unwritten:interpreter:ast/entities/index";
42
import { EntityKind } from "unwritten:interpreter/enums/entity";
53
import { compile } from "unwritten:tests:utils/compile";
64
import { scope } from "unwritten:tests:utils/scope";
75
import { isJSDocText } from "unwritten:typeguards/jsdoc";
86
import { assert } from "unwritten:utils/general";
97
import { ts } from "unwritten:utils/template";
8+
import { expect, it } from "vitest";
109

1110

1211
scope("Interpreter", EntityKind.Setter, () => {

0 commit comments

Comments
 (0)