Skip to content

Commit

Permalink
lint: code fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
eugeny-dementev committed Dec 26, 2024
1 parent e7bbccf commit 50a35ee
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/detectors/MissingStreamDataDetector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,21 +121,26 @@ export default class MissingStreamDataDetector extends BaseIssueDetector {
return issues;
}

private static mapStatsByTrackId(items: CommonParsedInboundStreamStats[][]): Map<string, CommonParsedInboundStreamStats[]> {
private static mapStatsByTrackId(
items: CommonParsedInboundStreamStats[][],
): Map<string, CommonParsedInboundStreamStats[]> {
const statsById = new Map<string, CommonParsedInboundStreamStats[]>();
items.forEach((inboundItems) => {
inboundItems.forEach((inbountItem) => {
const accumulatedItems = statsById.get(inbountItem.track.trackIdentifier) || [];
accumulatedItems.push(inbountItem);
statsById.set(inbountItem.track.trackIdentifier, accumulatedItems);
});
})
});

return statsById;
}

private static isAllBytesReceivedDidntChange(bytesReceived: number, inboundItems: CommonParsedInboundStreamStats[]): boolean {
for (const inboundItem of inboundItems) {
private static isAllBytesReceivedDidntChange(
bytesReceived: number, inboundItems: CommonParsedInboundStreamStats[],
): boolean {
for (let i = 0; i < inboundItems.length; i++) {

Check failure on line 142 in src/detectors/MissingStreamDataDetector.ts

View workflow job for this annotation

GitHub Actions / lint_and_check_build

Unary operator '++' used
const inboundItem = inboundItems[i];
if (inboundItem.bytesReceived !== bytesReceived) {
return false;
}
Expand Down

0 comments on commit 50a35ee

Please sign in to comment.