From 37cfc2cc1264c12e5de753ded3d2290b7b41734c Mon Sep 17 00:00:00 2001 From: freearhey <7253922+freearhey@users.noreply.github.com> Date: Tue, 29 Jul 2025 04:01:22 +0300 Subject: [PATCH] Fixes linter issues --- scripts/core/dataProcessor.ts | 2 +- scripts/generators/countriesGenerator.ts | 2 +- scripts/generators/rawGenerator.ts | 2 +- scripts/generators/sourcesGenerator.ts | 2 +- scripts/generators/subdivisionsGenerator.ts | 2 +- scripts/models/stream.ts | 4 ++-- scripts/tables/subdivisionTable.ts | 4 ++-- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/scripts/core/dataProcessor.ts b/scripts/core/dataProcessor.ts index 9ca948d1d3..d36569fd53 100644 --- a/scripts/core/dataProcessor.ts +++ b/scripts/core/dataProcessor.ts @@ -78,7 +78,7 @@ export class DataProcessor { const feedsGroupedByChannelId = feeds.groupBy((feed: Feed) => feed.channelId) const feedsGroupedById = feeds.groupBy((feed: Feed) => feed.id) - let logos = new Collection(data.logos).map(data => new Logo(data).withFeed(feedsGroupedById)) + const logos = new Collection(data.logos).map(data => new Logo(data).withFeed(feedsGroupedById)) const logosGroupedByChannelId = logos.groupBy((logo: Logo) => logo.channelId) const logosGroupedByStreamId = logos.groupBy((logo: Logo) => logo.getStreamId()) diff --git a/scripts/generators/countriesGenerator.ts b/scripts/generators/countriesGenerator.ts index 7fe42b82d5..d7fc542cb4 100644 --- a/scripts/generators/countriesGenerator.ts +++ b/scripts/generators/countriesGenerator.ts @@ -1,4 +1,4 @@ -import { Country, Subdivision, Stream, Playlist } from '../models' +import { Country, Stream, Playlist } from '../models' import { Collection, Storage, File } from '@freearhey/core' import { PUBLIC_DIR } from '../constants' import { Generator } from './generator' diff --git a/scripts/generators/rawGenerator.ts b/scripts/generators/rawGenerator.ts index 3249c81852..49578cd81a 100644 --- a/scripts/generators/rawGenerator.ts +++ b/scripts/generators/rawGenerator.ts @@ -23,7 +23,7 @@ export class RawGenerator implements Generator { async generate() { const files = this.streams.groupBy((stream: Stream) => stream.getFilename()) - for (let filename of files.keys()) { + for (const filename of files.keys()) { const streams = new Collection(files.get(filename)).map((stream: Stream) => { const groupTitle = stream.getCategoryNames().join(';') if (groupTitle) stream.groupTitle = groupTitle diff --git a/scripts/generators/sourcesGenerator.ts b/scripts/generators/sourcesGenerator.ts index 30018815b5..34d267fcfa 100644 --- a/scripts/generators/sourcesGenerator.ts +++ b/scripts/generators/sourcesGenerator.ts @@ -23,7 +23,7 @@ export class SourcesGenerator implements Generator { async generate() { const files: Dictionary = this.streams.groupBy((stream: Stream) => stream.getFilename()) - for (let filename of files.keys()) { + for (const filename of files.keys()) { if (!filename) continue let streams = new Collection(files.get(filename)) diff --git a/scripts/generators/subdivisionsGenerator.ts b/scripts/generators/subdivisionsGenerator.ts index e552596a1e..8d70285b2d 100644 --- a/scripts/generators/subdivisionsGenerator.ts +++ b/scripts/generators/subdivisionsGenerator.ts @@ -1,4 +1,4 @@ -import { Country, Subdivision, Stream, Playlist } from '../models' +import { Subdivision, Stream, Playlist } from '../models' import { Collection, Storage, File } from '@freearhey/core' import { PUBLIC_DIR } from '../constants' import { Generator } from './generator' diff --git a/scripts/models/stream.ts b/scripts/models/stream.ts index 164a8229b9..cd734493b8 100644 --- a/scripts/models/stream.ts +++ b/scripts/models/stream.ts @@ -35,7 +35,7 @@ export class Stream { this.id = id || undefined this.channelId = data.channelId || undefined this.feedId = data.feedId || undefined - this.title = data.title || undefined + this.title = data.title || '' this.url = data.url this.referrer = data.referrer || undefined this.userAgent = data.userAgent || undefined @@ -81,7 +81,7 @@ export class Stream { } function parseDirectives(string: string) { - let directives = new Collection() + const directives = new Collection() if (!string) return directives diff --git a/scripts/tables/subdivisionTable.ts b/scripts/tables/subdivisionTable.ts index 13460738d3..925d9094e3 100644 --- a/scripts/tables/subdivisionTable.ts +++ b/scripts/tables/subdivisionTable.ts @@ -33,9 +33,9 @@ export class SubdivisionTable implements Table { if (!parsedCountrySubdivisions.length) return - output += `\r\n
\r\n\${country.name}\r\n` + output += `\r\n
\r\n${country.name}\r\n` - let data = new Collection() + const data = new Collection() parsedCountrySubdivisions.forEach((logItem: LogItem) => { const file = new File(logItem.filepath)