mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 14:48:08 +02:00
Merge pull request #18571 from timvandermeij/linting
Enable the `unicorn/{prefer-includes,throw-new-error}` linting rules
This commit is contained in:
commit
cd3d188f99
2 changed files with 3 additions and 2 deletions
|
@ -45,7 +45,6 @@
|
|||
"ignore": ["display", "pdfjs", "pdfjs-lib", "pdfjs-web", "web", "fluent-bundle", "fluent-dom"],
|
||||
}],
|
||||
"mozilla/avoid-removeChild": "error",
|
||||
"mozilla/use-includes-instead-of-indexOf": "error",
|
||||
"no-unsanitized/method": "error",
|
||||
"no-unsanitized/property": "error",
|
||||
"sort-exports/sort-exports": ["error", {
|
||||
|
@ -70,6 +69,7 @@
|
|||
"unicorn/prefer-date-now": "error",
|
||||
"unicorn/prefer-dom-node-append": "error",
|
||||
"unicorn/prefer-dom-node-remove": "error",
|
||||
"unicorn/prefer-includes": "error",
|
||||
"unicorn/prefer-logical-operator-over-ternary": "error",
|
||||
"unicorn/prefer-modern-dom-apis": "error",
|
||||
"unicorn/prefer-modern-math-apis": "error",
|
||||
|
@ -79,6 +79,7 @@
|
|||
"unicorn/prefer-string-replace-all": "error",
|
||||
"unicorn/prefer-string-starts-ends-with": "error",
|
||||
"unicorn/prefer-ternary": ["error", "only-single-line"],
|
||||
"unicorn/throw-new-error": "error",
|
||||
|
||||
// Possible errors
|
||||
"for-direction": "error",
|
||||
|
|
|
@ -1075,7 +1075,7 @@ class Driver {
|
|||
this.output.textContent += message;
|
||||
}
|
||||
|
||||
if (message.lastIndexOf("\n") >= 0 && !this.disableScrolling.checked) {
|
||||
if (message.includes("\n") && !this.disableScrolling.checked) {
|
||||
// Scroll to the bottom of the page
|
||||
this.output.scrollTop = this.output.scrollHeight;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue