Skip to content

Commit

Permalink
Fix formatting for prettier v3 (#684)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasIO authored Nov 6, 2023
1 parent c5d4f00 commit 7a4556e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
5 changes: 1 addition & 4 deletions .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,5 @@
"semi": true,
"tabWidth": 2,
"printWidth": 100,
"plugins": [],
"pluginSearchDirs": [
"."
]
"plugins": []
}
11 changes: 8 additions & 3 deletions packages/core/src/helper/array-helper.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
export function chunk<T>(input: Array<T>, size: number) {
return input.reduce((arr, item, idx) => {
return idx % size === 0 ? [...arr, [item]] : [...arr.slice(0, -1), [...arr.slice(-1)[0], item]];
}, [] as Array<Array<T>>);
return input.reduce(
(arr, item, idx) => {
return idx % size === 0
? [...arr, [item]]
: [...arr.slice(0, -1), [...arr.slice(-1)[0], item]];
},
[] as Array<Array<T>>,
);
}

export function zip<T, U>(a1: Array<T>, a2: Array<U>) {
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/observables/participant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,8 @@ export function connectedParticipantsObserver(
]),
);

const listener = observeRoomEvents(room, ...roomEvents).subscribe((r) =>
subscriber?.next(Array.from(r.participants.values())),
const listener = observeRoomEvents(room, ...roomEvents).subscribe(
(r) => subscriber?.next(Array.from(r.participants.values())),
);
if (room.participants.size > 0) {
subscriber?.next(Array.from(room.participants.values()));
Expand Down

0 comments on commit 7a4556e

Please sign in to comment.