refactor: replace ignored numeric literals with constants
Backend security / security (push) Successful in 8s
Backend verify / verify (push) Failing after 2m17s
Conventional commits / commits (pull_request) Successful in 31s
Backend security / security (pull_request) Successful in 8s
Backend verify / verify (pull_request) Failing after 1m56s
Backend security / security (push) Successful in 8s
Backend verify / verify (push) Failing after 2m17s
Conventional commits / commits (pull_request) Successful in 31s
Backend security / security (pull_request) Successful in 8s
Backend verify / verify (pull_request) Failing after 1m56s
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
import { MILLISECONDS_PER_DAY } from '../../../../common/time';
|
||||
|
||||
const FIRST_RANGE_END_INDEX = 1;
|
||||
|
||||
export type CandleRange = { from: Date; to: Date };
|
||||
export type CandleCoverage = CandleRange & {
|
||||
fetchedAt: Date;
|
||||
@@ -80,7 +82,7 @@ export function confirmedCandleCoverage(
|
||||
}
|
||||
}
|
||||
const sorted = [...boundaries].sort((a, b) => a - b);
|
||||
return sorted.slice(1).map((to, index) => {
|
||||
return sorted.slice(FIRST_RANGE_END_INDEX).map((to, index) => {
|
||||
// eslint-disable-next-line security/detect-object-injection -- The index comes from the sorted numeric boundary array.
|
||||
const from = sorted[index];
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user