Skip to content

Commit

Permalink
Prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
cmdcolin committed Nov 25, 2023
1 parent 754dd53 commit 8bdf6a9
Show file tree
Hide file tree
Showing 10 changed files with 34 additions and 34 deletions.
4 changes: 2 additions & 2 deletions packages/core/BaseFeatureWidget/BaseFeatureDetail/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ export function accessNested(arr: string[], obj: Record<string, unknown> = {}) {
return typeof obj2 === 'string'
? obj2
: isObject(obj2) && typeof obj2?.Description === 'string'
? obj2.Description
: undefined
? obj2.Description
: undefined
}
4 changes: 2 additions & 2 deletions packages/core/PluginLoader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,8 @@ export default class PluginLoader {
'url' in def
? new URL(def.url, baseUri)
: 'umdUrl' in def
? new URL(def.umdUrl, baseUri)
: new URL(def.umdLoc.uri, def.umdLoc.baseUri)
? new URL(def.umdUrl, baseUri)
: new URL(def.umdLoc.uri, def.umdLoc.baseUri)

if (parsedUrl.protocol !== 'http:' && parsedUrl.protocol !== 'https:') {
throw new Error(
Expand Down
28 changes: 14 additions & 14 deletions packages/core/configuration/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ export type GetOptions<SCHEMA> = SCHEMA extends ConfigurationSchemaType<
export type GetBase<SCHEMA> = SCHEMA extends undefined
? never
: GetOptions<SCHEMA> extends ConfigurationSchemaOptions<undefined, any>
? undefined
: GetOptions<SCHEMA> extends ConfigurationSchemaOptions<
infer BASE extends AnyConfigurationSchemaType,
any
>
? BASE
: never
? undefined
: GetOptions<SCHEMA> extends ConfigurationSchemaOptions<
infer BASE extends AnyConfigurationSchemaType,
any
>
? BASE
: never

export type GetExplicitIdentifier<SCHEMA> =
GetOptions<SCHEMA> extends ConfigurationSchemaOptions<
Expand All @@ -48,13 +48,13 @@ export type ConfigurationSchemaForModel<MODEL> = MODEL extends IStateTreeNode<
export type ConfigurationSlotName<SCHEMA> = SCHEMA extends undefined
? never
: SCHEMA extends ConfigurationSchemaType<infer D, any>
?
| (keyof D & string)
| GetExplicitIdentifier<SCHEMA>
| (GetBase<SCHEMA> extends ConfigurationSchemaType<any, any>
? ConfigurationSlotName<GetBase<SCHEMA>>
: never)
: never
?
| (keyof D & string)
| GetExplicitIdentifier<SCHEMA>
| (GetBase<SCHEMA> extends ConfigurationSchemaType<any, any>
? ConfigurationSlotName<GetBase<SCHEMA>>
: never)
: never

export type AnyConfigurationSchemaType = ConfigurationSchemaType<any, any>
export type AnyConfigurationModel = Instance<AnyConfigurationSchemaType>
Expand Down
4 changes: 2 additions & 2 deletions packages/core/ui/react-colorful.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,8 @@ const i = (e, r = 0, t = 1) => (e > t ? t : e < r ? r : e),
? a === e
? (r - t) / l
: a === r
? 2 + (t - e) / l
: 4 + (e - r) / l
? 2 + (t - e) / l
: 4 + (e - r) / l
: 0
return {
h: b(60 * (n < 0 ? n + 6 : n)),
Expand Down
4 changes: 2 additions & 2 deletions packages/core/util/simpleFeature.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,8 @@ export default class SimpleFeature implements Feature {
return name === 'subfeatures'
? this.subfeatures
: name === 'parent'
? this.parent()
: this.data[name]
? this.parent()
: this.data[name]
}

/**
Expand Down
4 changes: 2 additions & 2 deletions plugins/dotplot-view/src/DotplotRenderer/DotplotRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,8 @@ export default class DotplotRenderer extends ComparativeRenderer {
r = isCallback
? readConfObject(config, 'color', { feature })
: color === '#f0f'
? t.palette.text.primary
: color
? t.palette.text.primary
: color
}
ctx.fillStyle = r
ctx.strokeStyle = r
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,8 @@ const OverviewBox = observer(function ({
canDisplayCytobands
? undefined
: reversed
? classes.scalebarContigReverse
: classes.scalebarContigForward,
? classes.scalebarContigReverse
: classes.scalebarContigForward,
!canDisplayCytobands ? classes.scalebarBorder : undefined,
)}
style={{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ function Translation(props: {
defaultStarts.includes(codon)
? theme?.palette.startCodon
: defaultStops.includes(codon)
? theme?.palette.stopCodon
: map[Math.abs(frame)]
? theme?.palette.stopCodon
: map[Math.abs(frame)]
}
/>
{render ? (
Expand Down
4 changes: 2 additions & 2 deletions plugins/svg/src/SvgFeatureRenderer/components/Arrow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ const Arrow = observer(function ({
strand * reverseFlip === -1
? left
: strand * reverseFlip === 1
? left + width
: null
? left + width
: null
const y = top + height / 2

return p ? (
Expand Down
8 changes: 4 additions & 4 deletions plugins/wiggle/src/drawXY.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ export function drawXY(
const effectiveC = crossingOrigin
? c
: c === lastCol
? lastMix
: (lastMix = lighten(colord(c), 0.4).toHex())
? lastMix
: (lastMix = lighten(colord(c), 0.4).toHex())
fillRectCtx(leftPx, toY(max), w, getHeight(max), ctx, effectiveC)
lastCol = c
}
Expand Down Expand Up @@ -141,8 +141,8 @@ export function drawXY(
const effectiveC = crossingOrigin
? c
: c === lastCol
? lastMix
: (lastMix = darken(colord(c), 0.4).toHex())
? lastMix
: (lastMix = darken(colord(c), 0.4).toHex())

fillRectCtx(leftPx, toY(min), w, getHeight(min), ctx, effectiveC)
lastCol = c
Expand Down

0 comments on commit 8bdf6a9

Please sign in to comment.