summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2018-09-06 16:43:31 +0200
committerPierre Ossman <ossman@cendio.se>2018-09-06 16:43:31 +0200
commit6786fd87193a6e3d392c4ab00295c6a2b898c71e (patch)
tree4f9d02e1acd68ea0b3fc17a7e234da2607b9dc98
parent7b536961b2219f33423a7c0709e06779def1c887 (diff)
downloadnovnc-6786fd87193a6e3d392c4ab00295c6a2b898c71e.tar.gz
Enforce comma spacing
-rw-r--r--.eslintrc1
-rw-r--r--app/ui.js10
-rw-r--r--core/base64.js2
-rw-r--r--core/des.js2
-rw-r--r--core/display.js2
-rw-r--r--tests/test.rfb.js2
-rw-r--r--tests/test.websock.js2
7 files changed, 13 insertions, 8 deletions
diff --git a/.eslintrc b/.eslintrc
index a3990b6..e553807 100644
--- a/.eslintrc
+++ b/.eslintrc
@@ -29,5 +29,6 @@
"ArrayExpression": "first",
"ObjectExpression": "first",
"ignoreComments": true }],
+ "comma-spacing": ["error"],
}
}
diff --git a/app/ui.js b/app/ui.js
index dba90ae..1fb7034 100644
--- a/app/ui.js
+++ b/app/ui.js
@@ -145,9 +145,9 @@ const UI = {
// set manually
let port = window.location.port;
if (!port) {
- if (window.location.protocol.substring(0,5) == 'https') {
+ if (window.location.protocol.substring(0, 5) == 'https') {
port = 443;
- } else if (window.location.protocol.substring(0,4) == 'http') {
+ } else if (window.location.protocol.substring(0, 4) == 'http') {
port = 80;
}
}
@@ -936,7 +936,7 @@ const UI = {
},
clipboardReceive(e) {
- Log.Debug(">> UI.clipboardReceive: " + e.detail.text.substr(0,40) + "...");
+ Log.Debug(">> UI.clipboardReceive: " + e.detail.text.substr(0, 40) + "...");
document.getElementById('noVNC_clipboard_text').value = e.detail.text;
Log.Debug("<< UI.clipboardReceive");
},
@@ -948,7 +948,7 @@ const UI = {
clipboardSend() {
const text = document.getElementById('noVNC_clipboard_text').value;
- Log.Debug(">> UI.clipboardSend: " + text.substr(0,40) + "...");
+ Log.Debug(">> UI.clipboardSend: " + text.substr(0, 40) + "...");
UI.rfb.clipboardPasteFrom(text);
Log.Debug("<< UI.clipboardSend");
},
@@ -1551,7 +1551,7 @@ const UI = {
UI.rfb.touchButton = num;
}
- const blist = [0, 1,2,4];
+ const blist = [0, 1, 2, 4];
for (let b = 0; b < blist.length; b++) {
const button = document.getElementById('noVNC_mouse_button' +
blist[b]);
diff --git a/core/base64.js b/core/base64.js
index 895aa46..7871c53 100644
--- a/core/base64.js
+++ b/core/base64.js
@@ -43,6 +43,7 @@ export default {
},
/* Convert Base64 data to a string */
+ /* eslint-disable comma-spacing */
toBinaryTable : [
-1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1,
-1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1,
@@ -53,6 +54,7 @@ export default {
-1,26,27,28, 29,30,31,32, 33,34,35,36, 37,38,39,40,
41,42,43,44, 45,46,47,48, 49,50,51,-1, -1,-1,-1,-1
],
+ /* eslint-enable comma-spacing */
decode(data, offset) {
offset = typeof(offset) !== 'undefined' ? offset : 0;
diff --git a/core/des.js b/core/des.js
index 5adc7ae..175066b 100644
--- a/core/des.js
+++ b/core/des.js
@@ -75,6 +75,8 @@
* fine Java utilities: http://www.acme.com/java/
*/
+/* eslint-disable comma-spacing */
+
export default function DES(passwd) {
"use strict";
diff --git a/core/display.js b/core/display.js
index d6db075..8c0a0c1 100644
--- a/core/display.js
+++ b/core/display.js
@@ -457,7 +457,7 @@ export default class Display {
}
}
- blitRgbImage(x, y , width, height, arr, offset, from_queue) {
+ blitRgbImage(x, y, width, height, arr, offset, from_queue) {
if (this._renderQ.length !== 0 && !from_queue) {
// NB(directxman12): it's technically more performant here to use preallocated arrays,
// but it's a lot of extra work for not a lot of payoff -- if we're using the render queue,
diff --git a/tests/test.rfb.js b/tests/test.rfb.js
index 5bdb6ab..dfbbdf7 100644
--- a/tests/test.rfb.js
+++ b/tests/test.rfb.js
@@ -1876,7 +1876,7 @@ describe('Remote Frame Buffer Protocol Client', function() {
});
it('should fail on an invalid subencoding', function () {
- sinon.spy(client,"_fail");
+ sinon.spy(client, "_fail");
const info = [{ x: 0, y: 0, width: 4, height: 4, encoding: 0x05 }];
const rects = [[45]]; // an invalid subencoding
send_fbu_msg(info, rects, client);
diff --git a/tests/test.websock.js b/tests/test.websock.js
index 8d2b157..79b03f8 100644
--- a/tests/test.websock.js
+++ b/tests/test.websock.js
@@ -264,7 +264,7 @@ describe('Websock', function() {
});
describe('opening', function () {
- it('should pick the correct protocols if none are given' , function () {
+ it('should pick the correct protocols if none are given', function () {
});