Skip to content

Commit d773ecb

Browse files
committed
Prettier
1 parent 28c7bc1 commit d773ecb

File tree

4 files changed

+28
-11
lines changed

4 files changed

+28
-11
lines changed

src/lib/application.ts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,13 @@ import { Converter } from "./converter/index";
55
import { Renderer } from "./output/renderer";
66
import { Deserializer, JSONOutput, Serializer } from "./serialization";
77
import type { ProjectReflection } from "./models/index";
8-
import { Logger, ConsoleLogger, loadPlugins, writeFile, normalizePath } from "./utils/index";
8+
import {
9+
Logger,
10+
ConsoleLogger,
11+
loadPlugins,
12+
writeFile,
13+
normalizePath,
14+
} from "./utils/index";
915

1016
import {
1117
AbstractComponent,
@@ -585,7 +591,11 @@ export class Application extends ChildableComponent<
585591
const start = Date.now();
586592

587593
const rootDir = deriveRootDir(this.entryPoints);
588-
this.logger.verbose(`Derived root dir is ${rootDir}, will expand ${this.entryPoints.map(normalizePath).join(", ")}`)
594+
this.logger.verbose(
595+
`Derived root dir is ${rootDir}, will expand ${this.entryPoints
596+
.map(normalizePath)
597+
.join(", ")}`
598+
);
589599
const entryPoints = this.entryPoints.flatMap((entry) =>
590600
glob(entry, rootDir)
591601
);

src/lib/models/reflections/ReflectionSymbolId.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ export class ReflectionSymbolId {
3636
) {
3737
if ("name" in symbol) {
3838
declaration ??= symbol?.declarations?.[0];
39-
this.fileName = normalizePath(declaration?.getSourceFile().fileName ?? "\0");
39+
this.fileName = normalizePath(
40+
declaration?.getSourceFile().fileName ?? "\0"
41+
);
4042
if (symbol.declarations?.some(ts.isSourceFile)) {
4143
this.qualifiedName = "";
4244
} else {
@@ -61,10 +63,12 @@ export class ReflectionSymbolId {
6163
toObject(serializer: Serializer) {
6264
return {
6365
sourceFileName: isAbsolute(this.fileName)
64-
? normalizePath(relative(
65-
serializer.projectRoot,
66-
resolveDeclarationMaps(this.fileName)
67-
))
66+
? normalizePath(
67+
relative(
68+
serializer.projectRoot,
69+
resolveDeclarationMaps(this.fileName)
70+
)
71+
)
6872
: this.fileName,
6973
qualifiedName: this.qualifiedName,
7074
};

src/lib/utils/fs.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,19 @@ export function isDir(path: string) {
2323
}
2424

2525
export function deriveRootDir(globPaths: string[]): string {
26-
const normalized = globPaths.map(normalizePath)
26+
const normalized = globPaths.map(normalizePath);
2727
const globs = createMinimatch(normalized);
2828
const rootPaths = globs.flatMap((glob, i) =>
2929
filterMap(glob.set, (set) => {
3030
const stop = set.findIndex((part) => typeof part !== "string");
3131
if (stop === -1) {
3232
return normalized[i];
3333
} else {
34-
const kept = set.slice(0, stop).join('/')
35-
return normalized[i].substring(0, normalized[i].indexOf(kept) + kept.length);
34+
const kept = set.slice(0, stop).join("/");
35+
return normalized[i].substring(
36+
0,
37+
normalized[i].indexOf(kept) + kept.length
38+
);
3639
}
3740
})
3841
);

src/test/merge.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ describe("Merging projects", () => {
2525
app.logger = logger;
2626

2727
const project = app.convert();
28-
logger.expectNoOtherMessages()
28+
logger.expectNoOtherMessages();
2929

3030
equal(project?.name, "typedoc");
3131
equal(

0 commit comments

Comments
 (0)