Skip to content

Commit

Permalink
Fix linter errors
Browse files Browse the repository at this point in the history
  • Loading branch information
oamaok committed Sep 27, 2024
1 parent 95e7f01 commit b058263
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
6 changes: 3 additions & 3 deletions client/src/components/module-parts/ControlledKnob.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -184,9 +184,9 @@ const getHintText = (props: ControlledKnobProps): string => {
}

case 'option': {
return `${props.label}: ${props.options.find(
({ value }) => knobValue == value
)?.label}`
return `${props.label}: ${
props.options.find(({ value }) => knobValue == value)?.label
}`
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions common/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ export type IndexOf<
> = Arr[0] extends Elem
? Acc['length']
: Arr extends [any, ...infer Rest] | readonly [any, ...infer Rest]
? IndexOf<Rest, Elem, [...Acc, 0]>
: never
? IndexOf<Rest, Elem, [...Acc, 0]>
: never

export type Id = string
export type UserRegistration = t.TypeOf<typeof UserRegistration>
Expand Down
9 changes: 5 additions & 4 deletions server/src/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,10 @@ type RouteParamNames<Route extends string> =
? ParamOf<Segment> | RouteParamNames<Rest>
: ParamOf<Route>

type RouteParams<Route extends string> = RouteParamNames<Route> extends string
? { [x in RouteParamNames<Route>]: string }
: {}
type RouteParams<Route extends string> =
RouteParamNames<Route> extends string
? { [x in RouteParamNames<Route>]: string }
: {}

type BaseRequest<Route extends string> = {
url: URL
Expand Down Expand Up @@ -104,7 +105,7 @@ export const serverStatic = <Route extends string>(
const ext = path.split('.').pop()

const mimeType = ext
? mimeTypes[ext] ?? 'application/octet-stream'
? (mimeTypes[ext] ?? 'application/octet-stream')
: 'application/octet-stream'

res.header('Cross-Origin-Opener-Policy', 'same-origin')
Expand Down

0 comments on commit b058263

Please sign in to comment.