diff --git a/.config/.prettierignore b/.config/.prettierignore index 5130c98c0..91fb2132d 100644 --- a/.config/.prettierignore +++ b/.config/.prettierignore @@ -9,6 +9,7 @@ ../src/test/renderer/specs ../src/test/renderer/testProject ../src/test/utils/options/readers/data/invalid2.json +../src/test/converter2/behavior/benchmark.ts ../static/main.js ../example/docs/ **/tmp diff --git a/src/lib/output/router.ts b/src/lib/output/router.ts index a3782fb79..1e380489c 100644 --- a/src/lib/output/router.ts +++ b/src/lib/output/router.ts @@ -2,7 +2,7 @@ import type { Application } from "../application.js"; import { CategoryPlugin } from "../converter/plugins/CategoryPlugin.js"; import { GroupPlugin } from "../converter/plugins/GroupPlugin.js"; import { - Reflection, + type Reflection, type DeclarationReflection, ReflectionKind, type ProjectReflection, @@ -517,12 +517,10 @@ export class GroupRouter extends BaseRouter { } protected override getIdealBaseName(reflection: Reflection): string { - const group = [ - this.getGroup(reflection) - .split("/") - .map(createNormalizedUrl) - .join("/"), - ]; + const group = this.getGroup(reflection) + .split("/") + .map(createNormalizedUrl) + .join("/"); const parts = [createNormalizedUrl(reflection.name)]; while (reflection.parent && !reflection.parent.isProject()) { reflection = reflection.parent; @@ -556,12 +554,10 @@ export class CategoryRouter extends BaseRouter { } protected override getIdealBaseName(reflection: Reflection): string { - const cat = [ - this.getCategory(reflection) - .split("/") - .map(createNormalizedUrl) - .join("/"), - ]; + const cat = this.getCategory(reflection) + .split("/") + .map(createNormalizedUrl) + .join("/"); const parts = [createNormalizedUrl(reflection.name)]; while (reflection.parent && !reflection.parent.isProject()) { reflection = reflection.parent; diff --git a/src/lib/output/themes/default/DefaultThemeRenderContext.ts b/src/lib/output/themes/default/DefaultThemeRenderContext.ts index 9c71a05bb..0f5986b75 100644 --- a/src/lib/output/themes/default/DefaultThemeRenderContext.ts +++ b/src/lib/output/themes/default/DefaultThemeRenderContext.ts @@ -107,7 +107,7 @@ export class DefaultThemeRenderContext { /** Avoid this in favor of urlTo if possible */ relativeURL = (url: string, cacheBust = false) => { - const result = this.theme.router!.baseRelativeUrl(this.page.model, url); + const result = this.router.baseRelativeUrl(this.page.model, url); if (cacheBust && this.theme.owner.cacheBust) { return result + `?cache=${this.theme.owner.renderStartTime}`; } diff --git a/src/lib/utils/perf.ts b/src/lib/utils/perf.ts index f61f29798..b4aabd9e7 100644 --- a/src/lib/utils/perf.ts +++ b/src/lib/utils/perf.ts @@ -34,7 +34,7 @@ export function bench any>( end(); return res; }, - (reason) => { + (reason: unknown) => { end(); throw reason; }, diff --git a/src/test/output/formatter.test.ts b/src/test/output/formatter.test.ts index 1e0d7c3c7..b6fe59a12 100644 --- a/src/test/output/formatter.test.ts +++ b/src/test/output/formatter.test.ts @@ -29,7 +29,7 @@ import { FileRegistry, ParameterReflection, ProjectReflection, - Reflection, + type Reflection, ReflectionFlag, ReflectionKind, SignatureReflection,