diff --git a/eslint.config.mjs b/eslint.config.mjs index fbac9b43..f73f483d 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -50,10 +50,7 @@ export default [ '@typescript-eslint/explicit-function-return-type': 'error', '@typescript-eslint/no-explicit-any': 'warn', '@typescript-eslint/no-unused-expressions': 'warn', - '@typescript-eslint/no-unused-vars': [ - 'error', - { caughtErrors: 'none' } - ], + '@typescript-eslint/no-unused-vars': 'error', '@typescript-eslint/prefer-ts-expect-error': 'error', curly: 'error', 'import/newline-after-import': 'error', diff --git a/src/components/documentManager.ts b/src/components/documentManager.ts index f19d2e12..27cc9ae1 100644 --- a/src/components/documentManager.ts +++ b/src/components/documentManager.ts @@ -650,7 +650,7 @@ export abstract class DocumentManager { info.push( parseISO8601Date(item.PremiereDate).toLocaleDateString() ); - } catch (e) { + } catch { console.log(`Error parsing date: ${item.PremiereDate}`); } } @@ -661,7 +661,7 @@ export abstract class DocumentManager { info.push( parseISO8601Date(item.StartDate).toLocaleDateString() ); - } catch (e) { + } catch { console.log(`Error parsing date: ${item.PremiereDate}`); } } @@ -683,7 +683,7 @@ export abstract class DocumentManager { item.EndDate ).getFullYear()}`; } - } catch (e) { + } catch { console.log(`Error parsing date: ${item.EndDate}`); } } @@ -702,7 +702,7 @@ export abstract class DocumentManager { .getFullYear() .toString() ); - } catch (e) { + } catch { console.log(`Error parsing date: ${item.PremiereDate}`); } } diff --git a/src/components/fetchhelper.ts b/src/components/fetchhelper.ts index c9ec5e9b..371a22e7 100644 --- a/src/components/fetchhelper.ts +++ b/src/components/fetchhelper.ts @@ -69,7 +69,7 @@ async function fetchWithCredentials( ); return response; - } catch (e) { + } catch { throw new Error( `fetchWithCredentials: timed out connecting to url: ${url}` ); diff --git a/src/components/maincontroller.ts b/src/components/maincontroller.ts index 3c84ebd0..e269a159 100644 --- a/src/components/maincontroller.ts +++ b/src/components/maincontroller.ts @@ -685,7 +685,7 @@ export async function getMaxBitrate(): Promise { detectedBitrate = bitrate; return Math.min(detectedBitrate, getMaxBitrateSupport()); - } catch (e) { + } catch { // The client can set this number console.log('Error detecting bitrate, will return device maximum.');