style: align multiline ternary operators
This commit is contained in:
@@ -100,23 +100,23 @@ export function normalizeScreen(
|
||||
...(accountId ? { accountId } : {}),
|
||||
...(input.from ? { from: input.from } : {}),
|
||||
...(input.to ? { to: input.to } : {}),
|
||||
...(input.instrumentUid ?
|
||||
{ instrumentUid: input.instrumentUid.toLowerCase() } :
|
||||
{}),
|
||||
...(input.instrumentUid
|
||||
? { instrumentUid: input.instrumentUid.toLowerCase() }
|
||||
: {}),
|
||||
...(query ? { query } : {}),
|
||||
...(input.candlePeriod ? { candlePeriod: input.candlePeriod } : {}),
|
||||
...(input.candleRange ?
|
||||
{
|
||||
...(input.candleRange
|
||||
? {
|
||||
candleRange: {
|
||||
from: new Date(input.candleRange.from).toISOString(),
|
||||
to: new Date(input.candleRange.to).toISOString(),
|
||||
},
|
||||
} :
|
||||
{}),
|
||||
...(input.categories ?
|
||||
// eslint-disable-next-line sonarjs/no-alphabetical-sort -- Code-unit ordering is intentional for canonical keys and ISO dates; locale collation would change persisted bindings.
|
||||
{ categories: [...new Set(input.categories)].sort() } :
|
||||
{}),
|
||||
}
|
||||
: {}),
|
||||
...(input.categories
|
||||
// eslint-disable-next-line sonarjs/no-alphabetical-sort -- Code-unit ordering is intentional for canonical keys and ISO dates; locale collation would change persisted bindings.
|
||||
? { categories: [...new Set(input.categories)].sort() }
|
||||
: {}),
|
||||
...(input.limit !== undefined ? { limit: input.limit } : {}),
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user