mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Enable the no-empty-pattern
/no-floating-decimal
/no-self-compare
/no-delete-var
/no-new-object
ESLint rules
The following rules required no code changes: http://eslint.org/docs/rules/no-empty-pattern http://eslint.org/docs/rules/no-floating-decimal http://eslint.org/docs/rules/no-delete-var http://eslint.org/docs/rules/no-new-object There was just one change needed in order to enable: http://eslint.org/docs/rules/no-self-compare; which I think helps readability a lot, since that comparison makes no sense until you realize that we push `NaN` onto the `stack` in some cases *and* furthermore that `NaN !== NaN`.
This commit is contained in:
parent
fd1affa78a
commit
f77c52291e
2 changed files with 6 additions and 1 deletions
|
@ -2121,7 +2121,7 @@ var Font = (function FontClosure() {
|
|||
op >= 0xC0 && op <= 0xDF ? -1 : op >= 0xE0 ? -2 : 0;
|
||||
if (op >= 0x71 && op <= 0x75) {
|
||||
n = stack.pop();
|
||||
if (n === n) {
|
||||
if (!isNaN(n)) {
|
||||
stackDelta = -n * 2;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue