pdf.js/extensions/chromium
Jonas Jenwald c591826f3b Enable the no-nested-ternary ESLint rule (PR 11488 follow-up)
This rule is already enabled in mozilla-central, and helps avoid some confusing formatting, see https://searchfox.org/mozilla-central/rev/9e45d74b956be046e5021a746b0c8912f1c27318/tools/lint/eslint/eslint-plugin-mozilla/lib/configs/recommended.js#209-210

With the recent introduction of Prettier some of the existing nested ternary statements became even more difficult to read, since any possibly helpful indentation was removed.
This particular ESLint rule wasn't entirely straightforward to enable, and I do recognize that there's a certain amount of subjectivity in the changes being made. Generally, the changes in this patch fall into three categories:
 - Cases where a value is only clamped to a certain range (the easiest ones to update).
 - Cases where the values involved are "simple", such as Numbers and Strings, which are re-factored to initialize the variable with the *default* value and only update it when necessary by using `if`/`else if` statements.
 - Cases with more complex and/or larger values, such as TypedArrays, which are re-factored to let the variable be (implicitly) undefined and where all values are then set through `if`/`else if`/`else` statements.

Please find additional details about the ESLint rule at https://eslint.org/docs/rules/no-nested-ternary
2020-01-14 17:49:39 +01:00
..
options Enable the no-nested-ternary ESLint rule (PR 11488 follow-up) 2020-01-14 17:49:39 +01:00
pageAction Enable auto-formatting of the entire code-base using Prettier (issue 11444) 2019-12-26 12:34:24 +01:00
.eslintrc Use eslint-plugin-mozilla and the webextensions environment to avoid defining globals in each file. 2017-05-17 10:30:46 +01:00
.gitignore Renaming of extensions/chrome folder to extensions/chromium, and small tweak to manifest.json description as per #3600 2013-08-21 18:11:35 +02:00
contentscript.js Enable auto-formatting of the entire code-base using Prettier (issue 11444) 2019-12-26 12:34:24 +01:00
contentstyle.css <object> / <embed> support in Chromium extension 2014-05-09 15:46:12 +02:00
extension-router.js Enable auto-formatting of the entire code-base using Prettier (issue 11444) 2019-12-26 12:34:24 +01:00
icon16.png optimize png images using zopflipng 2016-07-10 17:49:16 +08:00
icon19.png optimize png images using zopflipng 2016-07-10 17:49:16 +08:00
icon38.png optimize png images using zopflipng 2016-07-10 17:49:16 +08:00
icon48.png optimize png images using zopflipng 2016-07-10 17:49:16 +08:00
icon128.png optimize png images using zopflipng 2016-07-10 17:49:16 +08:00
manifest.json [CRX] Recognize blob and data-URLs in the router 2017-02-04 01:20:17 +01:00
pdfHandler-vcros.js Enable auto-formatting of the entire code-base using Prettier (issue 11444) 2019-12-26 12:34:24 +01:00
pdfHandler.html [CRX] Remove feature-detect.js 2018-01-26 15:54:35 +01:00
pdfHandler.js Enable auto-formatting of the entire code-base using Prettier (issue 11444) 2019-12-26 12:34:24 +01:00
preferences_schema.json [Chrome extension] Add missing "type" entry for the viewOnLoad preference in the preferences_schema.json file (PR 10502 follow-up) 2019-02-11 10:56:43 +01:00
preserve-referer.js Enable auto-formatting of the entire code-base using Prettier (issue 11444) 2019-12-26 12:34:24 +01:00
restoretab.html Restore extension tab after reload 2015-08-14 19:00:12 +02:00
restoretab.js Enable auto-formatting of the entire code-base using Prettier (issue 11444) 2019-12-26 12:34:24 +01:00
suppress-update.js Enable auto-formatting of the entire code-base using Prettier (issue 11444) 2019-12-26 12:34:24 +01:00
telemetry.js Enable auto-formatting of the entire code-base using Prettier (issue 11444) 2019-12-26 12:34:24 +01:00