Skip to content

Commit

Permalink
Enforce explicit semi-colons
Browse files Browse the repository at this point in the history
  • Loading branch information
CendioOssman committed Sep 6, 2018
1 parent 426a8c9 commit 0ae5c54
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 12 deletions.
1 change: 1 addition & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,6 @@
"key-spacing": ["error"],
"keyword-spacing": ["error"],
"no-trailing-spaces": ["error"],
"semi": ["error"],
}
}
4 changes: 2 additions & 2 deletions core/rfb.js
Original file line number Diff line number Diff line change
Expand Up @@ -1942,7 +1942,7 @@ RFB.encodingHandlers = {
let data = this._sock.get_rQ();
let index = this._sock.get_rQi();
if (this._fb_depth == 8) {
const pixels = this._FBU.width * curr_height
const pixels = this._FBU.width * curr_height;
const newdata = new Uint8Array(pixels * 4);
for (let i = 0; i < pixels; i++) {
newdata[i * 4 + 0] = ((data[index + i] >> 0) & 0x3) * 255 / 3;
Expand Down Expand Up @@ -2558,4 +2558,4 @@ RFB.encodingHandlers = {
// Do nothing
}
}
}
};
2 changes: 1 addition & 1 deletion core/util/cursor.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export default class Cursor {
return;
}

let cur = []
let cur = [];
for (let y = 0; y < h; y++) {
for (let x = 0; x < w; x++) {
let idx = y * Math.ceil(w / 8) + Math.floor(x / 8);
Expand Down
2 changes: 1 addition & 1 deletion tests/test.display.js
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ describe('Display/Canvas Helper', function () {
});

it('should wait until an image is loaded to attempt to draw it and the rest of the queue', function () {
const img = { complete: false, addEventListener: sinon.spy() }
const img = { complete: false, addEventListener: sinon.spy() };
display._renderQ = [{ type: 'img', x: 3, y: 4, img: img },
{ type: 'fill', x: 1, y: 2, width: 3, height: 4, color: 5 }];
display.drawImage = sinon.spy();
Expand Down
2 changes: 1 addition & 1 deletion tests/test.websock.js
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ describe('Websock', function() {

it('should actually send on the websocket', function () {
sock._websocket.bufferedAmount = 8;
sock._websocket.readyState = WebSocket.OPEN
sock._websocket.readyState = WebSocket.OPEN;
sock._sQ = new Uint8Array([1, 2, 3]);
sock._sQlen = 3;
const encoded = sock._encode_message();
Expand Down
4 changes: 2 additions & 2 deletions utils/use_require.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ function promisify(original) {
resolve(value);
}));
});
}
};
}

const readFile = promisify(fs.readFile);
Expand Down Expand Up @@ -199,7 +199,7 @@ function make_lib_files(import_format, source_maps, with_app_dir, only_legacy) {
.then(() => {
console.log(`Writing ${out_path}`);
return copy(filename, out_path);
})
});
})
.then(() => ensureDir(path.dirname(legacy_path)))
.then(() => {
Expand Down
10 changes: 5 additions & 5 deletions utils/use_require_helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function promisify(original) {
resolve(value);
}));
});
}
};
}

const writeFile = promisify(fs.writeFile);
Expand All @@ -27,7 +27,7 @@ module.exports = {
.then(() => {
console.log(`Please place RequireJS in ${path.join(script_base_path, 'require.js')}`);
const require_path = path.relative(base_out_path,
path.join(script_base_path, 'require.js'))
path.join(script_base_path, 'require.js'));
return [ require_path ];
});
},
Expand Down Expand Up @@ -57,9 +57,9 @@ module.exports = {
console.log(`Please place SystemJS in ${path.join(script_base_path, 'system-production.js')}`);
// FIXME: Should probably be in the legacy directory
const promise_path = path.relative(base_out_path,
path.join(base_out_path, 'vendor', 'promise.js'))
path.join(base_out_path, 'vendor', 'promise.js'));
const systemjs_path = path.relative(base_out_path,
path.join(script_base_path, 'system-production.js'))
path.join(script_base_path, 'system-production.js'));
return [ promise_path, systemjs_path ];
});
},
Expand All @@ -73,4 +73,4 @@ module.exports = {
opts.plugins.unshift("add-module-exports");
},
},
}
};

0 comments on commit 0ae5c54

Please sign in to comment.