once last js has gone - will move the overrides to rules

This commit is contained in:
iPromKnight
2024-02-06 11:06:09 +00:00
committed by iPromKnight
parent 7cb69a69d9
commit 4e98e8f7b4
2 changed files with 18 additions and 8 deletions

View File

@@ -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"
}
]
}
]
}
}
]
}

View File

@@ -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<void> {
const titleInfo = parse(torrent.title);
if (!torrent.imdbId && torrent.type !== TorrentType.Anime) {