Disallow multi-assign
This commit is contained in:
parent
b527d65c14
commit
3ab566204d
|
|
@ -329,7 +329,7 @@
|
||||||
|
|
||||||
// disallow use of chained assignment expressions
|
// disallow use of chained assignment expressions
|
||||||
// https://eslint.org/docs/rules/no-multi-assign
|
// 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
|
// disallow multiple empty lines and only one newline at the end
|
||||||
"no-multiple-empty-lines": ["error", { max: 2, maxEOF: 0 }],
|
"no-multiple-empty-lines": ["error", { max: 2, maxEOF: 0 }],
|
||||||
|
|
|
||||||
|
|
@ -152,7 +152,8 @@ export default function DES(passwd) {
|
||||||
for (let i = 0; i < 16; ++i) {
|
for (let i = 0; i < 16; ++i) {
|
||||||
const m = i << 1;
|
const m = i << 1;
|
||||||
const n = m + 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 o = 28; o < 59; o += 28) {
|
||||||
for (let j = o - 28; j < o; ++j) {
|
for (let j = o - 28; j < o; ++j) {
|
||||||
const l = j + totrot[i];
|
const l = j + totrot[i];
|
||||||
|
|
|
||||||
|
|
@ -300,8 +300,10 @@ export default class Display {
|
||||||
vx, vy, w, h);
|
vx, vy, w, h);
|
||||||
}
|
}
|
||||||
|
|
||||||
this._damageBounds.left = this._damageBounds.top = 65535;
|
this._damageBounds.top = 65535;
|
||||||
this._damageBounds.right = this._damageBounds.bottom = 0;
|
this._damageBounds.left = 65535;
|
||||||
|
this._damageBounds.bottom = 0;
|
||||||
|
this._damageBounds.right = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,10 @@ export function init_logging(level) {
|
||||||
_log_level = level;
|
_log_level = level;
|
||||||
}
|
}
|
||||||
|
|
||||||
Debug = Info = Warn = Error = () => {};
|
Debug = () => {};
|
||||||
|
Info = () => {};
|
||||||
|
Warn = () => {};
|
||||||
|
Error = () => {};
|
||||||
|
|
||||||
if (typeof window.console !== 'undefined') {
|
if (typeof window.console !== 'undefined') {
|
||||||
/* eslint-disable no-console, no-fallthrough */
|
/* eslint-disable no-console, no-fallthrough */
|
||||||
|
|
|
||||||
|
|
@ -138,7 +138,8 @@ describe('Display/Canvas Helper', function () {
|
||||||
const expected = [];
|
const expected = [];
|
||||||
for (let i = 0; i < 4 * 2 * 2; i += 4) {
|
for (let i = 0; i < 4 * 2 * 2; i += 4) {
|
||||||
expected[i] = 0xff;
|
expected[i] = 0xff;
|
||||||
expected[i + 1] = expected[i + 2] = 0;
|
expected[i + 1] = 0;
|
||||||
|
expected[i + 2] = 0;
|
||||||
expected[i + 3] = 0xff;
|
expected[i + 3] = 0xff;
|
||||||
}
|
}
|
||||||
expect(display).to.have.displayed(new Uint8Array(expected));
|
expect(display).to.have.displayed(new Uint8Array(expected));
|
||||||
|
|
@ -302,7 +303,8 @@ describe('Display/Canvas Helper', function () {
|
||||||
const expected = [];
|
const expected = [];
|
||||||
for (let i = 0; i < 4 * display._fb_width * display._fb_height; i += 4) {
|
for (let i = 0; i < 4 * display._fb_width * display._fb_height; i += 4) {
|
||||||
expected[i] = 0xff;
|
expected[i] = 0xff;
|
||||||
expected[i + 1] = expected[i + 2] = 0;
|
expected[i + 1] = 0;
|
||||||
|
expected[i + 2] = 0;
|
||||||
expected[i + 3] = 0xff;
|
expected[i + 3] = 0xff;
|
||||||
}
|
}
|
||||||
expect(display).to.have.displayed(new Uint8Array(expected));
|
expect(display).to.have.displayed(new Uint8Array(expected));
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,8 @@ describe('Remote Frame Buffer Protocol Client', function () {
|
||||||
after(FakeWebSocket.restore);
|
after(FakeWebSocket.restore);
|
||||||
|
|
||||||
before(function () {
|
before(function () {
|
||||||
this.clock = clock = sinon.useFakeTimers();
|
clock = sinon.useFakeTimers();
|
||||||
|
this.clock = clock;
|
||||||
// sinon doesn't support this yet
|
// sinon doesn't support this yet
|
||||||
raf = window.requestAnimationFrame;
|
raf = window.requestAnimationFrame;
|
||||||
window.requestAnimationFrame = setTimeout;
|
window.requestAnimationFrame = setTimeout;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue