mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 10:08:06 +02:00
Enable the no-lonely-if
ESLint rule
These changes were mostly done automatically, using `gulp lint --fix`, and only a few spots with comments needed manual tweaking; please see https://eslint.org/docs/latest/rules/no-lonely-if
This commit is contained in:
parent
abb24f82fb
commit
c018070e80
15 changed files with 108 additions and 147 deletions
|
@ -619,17 +619,15 @@ class CompositeGlyph {
|
|||
) {
|
||||
size += 2;
|
||||
}
|
||||
} else {
|
||||
if (
|
||||
!(
|
||||
this.argument1 >= 0 &&
|
||||
this.argument1 <= 255 &&
|
||||
this.argument2 >= 0 &&
|
||||
this.argument2 <= 255
|
||||
)
|
||||
) {
|
||||
size += 2;
|
||||
}
|
||||
} else if (
|
||||
!(
|
||||
this.argument1 >= 0 &&
|
||||
this.argument1 <= 255 &&
|
||||
this.argument2 >= 0 &&
|
||||
this.argument2 <= 255
|
||||
)
|
||||
) {
|
||||
size += 2;
|
||||
}
|
||||
|
||||
return size;
|
||||
|
@ -650,17 +648,15 @@ class CompositeGlyph {
|
|||
) {
|
||||
this.flags |= ARG_1_AND_2_ARE_WORDS;
|
||||
}
|
||||
} else {
|
||||
if (
|
||||
!(
|
||||
this.argument1 >= 0 &&
|
||||
this.argument1 <= 255 &&
|
||||
this.argument2 >= 0 &&
|
||||
this.argument2 <= 255
|
||||
)
|
||||
) {
|
||||
this.flags |= ARG_1_AND_2_ARE_WORDS;
|
||||
}
|
||||
} else if (
|
||||
!(
|
||||
this.argument1 >= 0 &&
|
||||
this.argument1 <= 255 &&
|
||||
this.argument2 >= 0 &&
|
||||
this.argument2 <= 255
|
||||
)
|
||||
) {
|
||||
this.flags |= ARG_1_AND_2_ARE_WORDS;
|
||||
}
|
||||
|
||||
buf.setUint16(pos, this.flags);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue