1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-26 10:08:06 +02:00

Enable the ESLint no-debugger and no-alert rules

The `debugger`-statement would only, potentially, make sense during development and we thus want to prevent it from being accidentally included when landing code.
The `alert`, `confirm`, and `prompt` functions should generally be avoided, with the few intended cases manually allowed.

Please find additional details about the ESLint rules at:
 - https://eslint.org/docs/rules/no-debugger
 - https://eslint.org/docs/rules/no-alert
This commit is contained in:
Jonas Jenwald 2020-10-05 13:30:20 +02:00
parent b3e32e2001
commit ba079453bf
4 changed files with 5 additions and 0 deletions

View file

@ -1667,6 +1667,7 @@ const PDFViewerApplication = {
"Warning: The PDF is not fully loaded for printing."
)
.then(notReadyMessage => {
// eslint-disable-next-line no-alert
window.alert(notReadyMessage);
});
return;