diff --git a/.eslintrc b/.eslintrc index a838680b..e0c2b582 100644 --- a/.eslintrc +++ b/.eslintrc @@ -329,7 +329,7 @@ // disallow use of chained assignment expressions // https://eslint.org/docs/rules/no-multi-assign - // "no-multi-assign": ["error"], + "no-multi-assign": ["error"], // disallow multiple empty lines and only one newline at the end "no-multiple-empty-lines": ["error", { max: 2, maxEOF: 0 }], diff --git a/core/des.js b/core/des.js index 653f0808..8e24fcc3 100644 --- a/core/des.js +++ b/core/des.js @@ -152,7 +152,8 @@ export default function DES(passwd) { for (let i = 0; i < 16; ++i) { const m = i << 1; const n = m + 1; - kn[m] = kn[n] = 0; + kn[m] = 0; + kn[n] = 0; for (let o = 28; o < 59; o += 28) { for (let j = o - 28; j < o; ++j) { const l = j + totrot[i]; diff --git a/core/display.js b/core/display.js index d5784122..229a5a24 100644 --- a/core/display.js +++ b/core/display.js @@ -300,8 +300,10 @@ export default class Display { vx, vy, w, h); } - this._damageBounds.left = this._damageBounds.top = 65535; - this._damageBounds.right = this._damageBounds.bottom = 0; + this._damageBounds.top = 65535; + this._damageBounds.left = 65535; + this._damageBounds.bottom = 0; + this._damageBounds.right = 0; } } diff --git a/core/util/logging.js b/core/util/logging.js index 29347529..61ac6964 100644 --- a/core/util/logging.js +++ b/core/util/logging.js @@ -24,7 +24,10 @@ export function init_logging(level) { _log_level = level; } - Debug = Info = Warn = Error = () => {}; + Debug = () => {}; + Info = () => {}; + Warn = () => {}; + Error = () => {}; if (typeof window.console !== 'undefined') { /* eslint-disable no-console, no-fallthrough */ diff --git a/tests/test.display.js b/tests/test.display.js index 9d4257f0..e3de22cb 100644 --- a/tests/test.display.js +++ b/tests/test.display.js @@ -138,7 +138,8 @@ describe('Display/Canvas Helper', function () { const expected = []; for (let i = 0; i < 4 * 2 * 2; i += 4) { expected[i] = 0xff; - expected[i + 1] = expected[i + 2] = 0; + expected[i + 1] = 0; + expected[i + 2] = 0; expected[i + 3] = 0xff; } expect(display).to.have.displayed(new Uint8Array(expected)); @@ -302,7 +303,8 @@ describe('Display/Canvas Helper', function () { const expected = []; for (let i = 0; i < 4 * display._fb_width * display._fb_height; i += 4) { expected[i] = 0xff; - expected[i + 1] = expected[i + 2] = 0; + expected[i + 1] = 0; + expected[i + 2] = 0; expected[i + 3] = 0xff; } expect(display).to.have.displayed(new Uint8Array(expected)); diff --git a/tests/test.rfb.js b/tests/test.rfb.js index 115ccc90..ddcd3cb8 100644 --- a/tests/test.rfb.js +++ b/tests/test.rfb.js @@ -55,7 +55,8 @@ describe('Remote Frame Buffer Protocol Client', function () { after(FakeWebSocket.restore); before(function () { - this.clock = clock = sinon.useFakeTimers(); + clock = sinon.useFakeTimers(); + this.clock = clock; // sinon doesn't support this yet raf = window.requestAnimationFrame; window.requestAnimationFrame = setTimeout;