diff --git a/projects/addon-charts/components/bar-chart/bar-chart.component.ts b/projects/addon-charts/components/bar-chart/bar-chart.component.ts index 8aca27553231b..23c07ef447456 100644 --- a/projects/addon-charts/components/bar-chart/bar-chart.component.ts +++ b/projects/addon-charts/components/bar-chart/bar-chart.component.ts @@ -94,8 +94,9 @@ export class TuiBarChartComponent { private getMax(values: ReadonlyArray, collapsed: boolean): number { return collapsed ? Math.max( - ...values.reduce((result, next) => - result.map((value, index) => value + next[index]), + ...values.reduce( + (result, next) => result.map((value, index) => value + next[index]), + [], ), ) : values.reduce((max, value) => Math.max(...value, max), 0); diff --git a/projects/kit/components/input-time/input-time.component.ts b/projects/kit/components/input-time/input-time.component.ts index 70753f24380a8..bda7524ff5d15 100644 --- a/projects/kit/components/input-time/input-time.component.ts +++ b/projects/kit/components/input-time/input-time.component.ts @@ -296,11 +296,17 @@ export class TuiInputTimeComponent } private findNearestTimeFromItems(value: TuiTime): TuiTime | null { - return this.items.reduce((previous, current) => - Math.abs(current.toAbsoluteMilliseconds() - value.toAbsoluteMilliseconds()) < - Math.abs(previous.toAbsoluteMilliseconds() - value.toAbsoluteMilliseconds()) - ? current - : previous, + return this.items.reduce( + (previous, current) => + Math.abs( + current.toAbsoluteMilliseconds() - value.toAbsoluteMilliseconds(), + ) < + Math.abs( + previous.toAbsoluteMilliseconds() - value.toAbsoluteMilliseconds(), + ) + ? current + : previous, + value, ); } diff --git a/projects/kit/components/multi-select/native-multi-select/native-multi-select-group.component.ts b/projects/kit/components/multi-select/native-multi-select/native-multi-select-group.component.ts index 4cfdbda247714..27ee4e9cc03f8 100644 --- a/projects/kit/components/multi-select/native-multi-select/native-multi-select-group.component.ts +++ b/projects/kit/components/multi-select/native-multi-select/native-multi-select-group.component.ts @@ -41,7 +41,7 @@ export class TuiNativeMultiSelectGroupComponent< onValueChange(selectedOptions: HTMLSelectElement['selectedOptions']): void { const selected = Array.from(selectedOptions).map(option => option.index); - const flatItems = this.items?.reduce((acc, val) => acc.concat(val)) || []; + const flatItems = this.items?.reduce((acc, val) => acc.concat(val), []) || []; const value = flatItems.filter((_, index) => selected.includes(index)); this.host.onSelectionChange(value); diff --git a/projects/kit/components/select/native-select/native-select-group.component.ts b/projects/kit/components/select/native-select/native-select-group.component.ts index 9e68f32c2f732..4213103be5f56 100644 --- a/projects/kit/components/select/native-select/native-select-group.component.ts +++ b/projects/kit/components/select/native-select/native-select-group.component.ts @@ -49,7 +49,7 @@ export class TuiNativeSelectGroupComponent extends AbstractTuiNativeSelect< } onValueChange(index: number): void { - const flatItems = this.items?.reduce((acc, val) => acc.concat(val)); + const flatItems = this.items?.reduce((acc, val) => acc.concat(val), []); this.host.onValueChange(flatItems?.[index] || null); }