mirror of
https://github.com/mozilla/pdf.js.git
synced 2026-07-04 22:25:50 +02:00
Enable the unicorn/logical-assignment-operators ESLint plugin rule
Please see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/logical-assignment-operators.md and https://eslint.org/docs/latest/rules/logical-assignment-operators
This commit is contained in:
parent
5b100c4509
commit
2bc64ec330
@ -178,6 +178,11 @@ export default [
|
||||
"unicorn/prefer-dom-node-remove": "error",
|
||||
"unicorn/prefer-import-meta-properties": "error",
|
||||
"unicorn/prefer-includes": "error",
|
||||
"unicorn/logical-assignment-operators": [
|
||||
"error",
|
||||
"always",
|
||||
{ enforceForIfStatements: false },
|
||||
],
|
||||
"unicorn/prefer-logical-operator-over-ternary": "error",
|
||||
"unicorn/prefer-modern-dom-apis": "error",
|
||||
"unicorn/prefer-modern-math-apis": "error",
|
||||
|
||||
@ -192,7 +192,7 @@ function renderDefaultZoomValue(shortDescription) {
|
||||
document.getElementById("settings-boxes").append(wrapper);
|
||||
|
||||
function renderPreference(value) {
|
||||
value = value || "auto";
|
||||
value ||= "auto";
|
||||
select.value = value;
|
||||
var customOption = select.querySelector("option.custom-zoom");
|
||||
if (select.selectedIndex === -1 && value) {
|
||||
|
||||
@ -150,7 +150,7 @@ limitations under the License.
|
||||
*/
|
||||
function didUpdateSinceLastCheck() {
|
||||
var chromeVersion = /Chrome\/(\d+)\./.exec(navigator.userAgent);
|
||||
chromeVersion = chromeVersion && chromeVersion[1];
|
||||
chromeVersion &&= chromeVersion[1];
|
||||
if (!chromeVersion || localStorage.telemetryLastVersion === chromeVersion) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -3000,7 +3000,7 @@ class Field extends XFAObject {
|
||||
}
|
||||
|
||||
if (!this.ui.imageEdit && ui.children?.[0] && this.h) {
|
||||
borderDims = borderDims || getBorderDims(this.ui[$getExtra]());
|
||||
borderDims ||= getBorderDims(this.ui[$getExtra]());
|
||||
|
||||
let captionHeight = 0;
|
||||
if (this.caption && ["top", "bottom"].includes(this.caption.placement)) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user