Skip to content

Commit

Permalink
Lint cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerrit0 committed Dec 15, 2024
1 parent 096df5e commit fcd750d
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 16 deletions.
1 change: 1 addition & 0 deletions .config/.prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
22 changes: 9 additions & 13 deletions src/lib/output/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/output/themes/default/DefaultThemeRenderContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}`;
}
Expand Down
2 changes: 1 addition & 1 deletion src/lib/utils/perf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export function bench<T extends (..._: any) => any>(
end();
return res;
},
(reason) => {
(reason: unknown) => {
end();
throw reason;
},
Expand Down
2 changes: 1 addition & 1 deletion src/test/output/formatter.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import {
FileRegistry,
ParameterReflection,
ProjectReflection,
Reflection,
type Reflection,
ReflectionFlag,
ReflectionKind,
SignatureReflection,
Expand Down

0 comments on commit fcd750d

Please sign in to comment.