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
@ -47,11 +47,13 @@
|
||||
"eqeqeq": ["error", "always"],
|
||||
"no-caller": "error",
|
||||
"no-else-return": "error",
|
||||
"no-empty-pattern": "error",
|
||||
"no-eval": "error",
|
||||
"no-extend-native": "error",
|
||||
"no-extra-bind": "error",
|
||||
"no-extra-label": "error",
|
||||
"no-fallthrough": "error",
|
||||
"no-floating-decimal": "error",
|
||||
"no-global-assign": "error",
|
||||
"no-implied-eval": "error",
|
||||
"no-lone-blocks": "error",
|
||||
@ -64,6 +66,7 @@
|
||||
"no-octal": "error",
|
||||
"no-redeclare": "error",
|
||||
"no-self-assign": "error",
|
||||
"no-self-compare": "error",
|
||||
"no-unused-expressions": "error",
|
||||
"no-unused-labels": "error",
|
||||
"no-useless-call": "error",
|
||||
@ -76,6 +79,7 @@
|
||||
|
||||
// Variables
|
||||
"no-catch-shadow": "error",
|
||||
"no-delete-var": "error",
|
||||
"no-label-var": "error",
|
||||
"no-shadow-restricted-names": "error",
|
||||
"no-undef-init": "error",
|
||||
@ -97,6 +101,7 @@
|
||||
"new-parens": "error",
|
||||
"no-array-constructor": "error",
|
||||
"no-multiple-empty-lines": ["error", { "max": 2, "maxEOF": 0, "maxBOF": 1, }],
|
||||
"no-new-object": "error",
|
||||
"no-tabs": "error",
|
||||
"no-trailing-spaces": ["error", { "skipBlankLines": false, }],
|
||||
"no-whitespace-before-property": "error",
|
||||
|
@ -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…
Reference in New Issue
Block a user