diff options
author | Pierre Ossman <ossman@cendio.se> | 2018-09-06 17:25:02 +0200 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2018-09-06 17:25:02 +0200 |
commit | 0ae5c54ab3b372213b8652897ca76cdfdc81b483 (patch) | |
tree | f2a1b48562bc55335240e43cd20b0168d7147b61 | |
parent | 426a8c927bbea710b0429d75c4f3ab7b278c902d (diff) | |
download | novnc-0ae5c54ab3b372213b8652897ca76cdfdc81b483.tar.gz |
Enforce explicit semi-colons
-rw-r--r-- | .eslintrc | 1 | ||||
-rw-r--r-- | core/rfb.js | 4 | ||||
-rw-r--r-- | core/util/cursor.js | 2 | ||||
-rw-r--r-- | tests/test.display.js | 2 | ||||
-rw-r--r-- | tests/test.websock.js | 2 | ||||
-rwxr-xr-x | utils/use_require.js | 4 | ||||
-rw-r--r-- | utils/use_require_helpers.js | 10 |
7 files changed, 13 insertions, 12 deletions
@@ -38,5 +38,6 @@ "key-spacing": ["error"], "keyword-spacing": ["error"], "no-trailing-spaces": ["error"], + "semi": ["error"], } } diff --git a/core/rfb.js b/core/rfb.js index c579389..95af083 100644 --- a/core/rfb.js +++ b/core/rfb.js @@ -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; @@ -2558,4 +2558,4 @@ RFB.encodingHandlers = { // Do nothing } } -} +}; diff --git a/core/util/cursor.js b/core/util/cursor.js index d36b657..e68c840 100644 --- a/core/util/cursor.js +++ b/core/util/cursor.js @@ -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); diff --git a/tests/test.display.js b/tests/test.display.js index ddf1dc5..843f75e 100644 --- a/tests/test.display.js +++ b/tests/test.display.js @@ -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(); diff --git a/tests/test.websock.js b/tests/test.websock.js index 79b03f8..05b83f2 100644 --- a/tests/test.websock.js +++ b/tests/test.websock.js @@ -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(); diff --git a/utils/use_require.js b/utils/use_require.js index c97931c..c575010 100755 --- a/utils/use_require.js +++ b/utils/use_require.js @@ -51,7 +51,7 @@ function promisify(original) { resolve(value); })); }); - } + }; } const readFile = promisify(fs.readFile); @@ -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(() => { diff --git a/utils/use_require_helpers.js b/utils/use_require_helpers.js index a11a9ba..a4f99c7 100644 --- a/utils/use_require_helpers.js +++ b/utils/use_require_helpers.js @@ -12,7 +12,7 @@ function promisify(original) { resolve(value); })); }); - } + }; } const writeFile = promisify(fs.writeFile); @@ -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 ]; }); }, @@ -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 ]; }); }, @@ -73,4 +73,4 @@ module.exports = { opts.plugins.unshift("add-module-exports"); }, }, -} +}; |