Skip to content

Commit

Permalink
Merge pull request #631 from 3flex/enable-caughterrors
Browse files Browse the repository at this point in the history
Enable checks for caught errors for no-unused-vars rule
  • Loading branch information
nielsvanvelzen authored Oct 21, 2024
2 parents 7335724 + 36a692a commit 0d48b0d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 10 deletions.
5 changes: 1 addition & 4 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
8 changes: 4 additions & 4 deletions src/components/documentManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,7 @@ export abstract class DocumentManager {
info.push(
parseISO8601Date(item.PremiereDate).toLocaleDateString()
);
} catch (e) {
} catch {
console.log(`Error parsing date: ${item.PremiereDate}`);
}
}
Expand All @@ -661,7 +661,7 @@ export abstract class DocumentManager {
info.push(
parseISO8601Date(item.StartDate).toLocaleDateString()
);
} catch (e) {
} catch {
console.log(`Error parsing date: ${item.PremiereDate}`);
}
}
Expand All @@ -683,7 +683,7 @@ export abstract class DocumentManager {
item.EndDate
).getFullYear()}`;
}
} catch (e) {
} catch {
console.log(`Error parsing date: ${item.EndDate}`);
}
}
Expand All @@ -702,7 +702,7 @@ export abstract class DocumentManager {
.getFullYear()
.toString()
);
} catch (e) {
} catch {
console.log(`Error parsing date: ${item.PremiereDate}`);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/fetchhelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ async function fetchWithCredentials(
);

return response;
} catch (e) {
} catch {
throw new Error(
`fetchWithCredentials: timed out connecting to url: ${url}`
);
Expand Down
2 changes: 1 addition & 1 deletion src/components/maincontroller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,7 @@ export async function getMaxBitrate(): Promise<number> {
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.');

Expand Down

0 comments on commit 0d48b0d

Please sign in to comment.