From 4e98e8f7b4a5b5ef9182ed69aca1073b51465764 Mon Sep 17 00:00:00 2001 From: iPromKnight Date: Tue, 6 Feb 2024 11:06:09 +0000 Subject: [PATCH] once last js has gone - will move the overrides to rules --- src/node/consumer/.eslintrc.json | 24 +++++++++++++++------ src/node/consumer/src/lib/torrentEntries.js | 2 +- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/src/node/consumer/.eslintrc.json b/src/node/consumer/.eslintrc.json index 784351f..85b3aad 100644 --- a/src/node/consumer/.eslintrc.json +++ b/src/node/consumer/.eslintrc.json @@ -59,12 +59,22 @@ } ], "prefer-destructuring": "error", - "@typescript-eslint/consistent-type-assertions": [ - "error", - { - "assertionStyle": "as", - "objectLiteralTypeAssertions": "never" + "@typescript-eslint/consistent-type-assertions": "off", + "@typescript-eslint/explicit-function-return-type": "off" + }, + "overrides": [ + { + "files": ["*.ts", "*.mts", "*.cts", "*.tsx"], + "rules": { + "@typescript-eslint/explicit-function-return-type": "error", + "@typescript-eslint/consistent-type-assertions": [ + "error", + { + "assertionStyle": "as", + "objectLiteralTypeAssertions": "never" + } + ] } - ] - } + } + ] } \ No newline at end of file diff --git a/src/node/consumer/src/lib/torrentEntries.js b/src/node/consumer/src/lib/torrentEntries.js index 69882db..c72bb17 100644 --- a/src/node/consumer/src/lib/torrentEntries.js +++ b/src/node/consumer/src/lib/torrentEntries.js @@ -8,7 +8,7 @@ import { parsingService } from './services/parsing_service'; import { torrentFileService } from './services/torrent_file_service'; import { torrentSubtitleService } from './services/torrent_subtitle_service'; -export async function createTorrentEntry(torrent, overwrite = false) { +export async function createTorrentEntry(torrent, overwrite = false) : Promise { const titleInfo = parse(torrent.title); if (!torrent.imdbId && torrent.type !== TorrentType.Anime) {