Skip to content

Commit 1ee44c5

Browse files
committed
style(routing): apply formatter and doc punctuation
- Collapse multiline use() TypeError to single line - End routing index re-export brief with a period - Reflow maxRenderIterations spread to formatter style
1 parent b796e73 commit 1ee44c5

3 files changed

Lines changed: 5 additions & 6 deletions

File tree

src/routing/Handler.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,9 @@ export class Handler {
7878
viewsDir: options.viewsDir,
7979
emit: (event) => this.events.emit(event),
8080
...(options.maxIterations !== undefined && { maxIterations: options.maxIterations }),
81-
...(options.maxRenderIterations !== undefined &&
82-
{ maxRenderIterations: options.maxRenderIterations }),
81+
...(options.maxRenderIterations !== undefined && {
82+
maxRenderIterations: options.maxRenderIterations
83+
}),
8384
...(options.maxOutputSize !== undefined && { maxOutputSize: options.maxOutputSize })
8485
})
8586
: undefined

src/routing/Router.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,7 @@ export class Router {
121121
use(pathOrMiddleware: string | Types.MiddlewareFn, ...handlers: Types.MiddlewareFn[]): void {
122122
if (typeof pathOrMiddleware === 'string') {
123123
if (handlers.length === 0) {
124-
throw new TypeError(
125-
`use("${pathOrMiddleware}") requires at least one middleware function`
126-
)
124+
throw new TypeError(`use("${pathOrMiddleware}") requires at least one middleware function`)
127125
}
128126
this.handler.addMiddleware(pathOrMiddleware, ...handlers)
129127
} else {

src/routing/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/** Re-exports routing public API */
1+
/** Re-exports routing public API. */
22
export * from '@routing/Handler.ts'
33
export * from '@routing/Report.ts'
44
export * from '@routing/Respond.ts'

0 commit comments

Comments
 (0)