summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2018-09-06 17:07:11 +0200
committerPierre Ossman <ossman@cendio.se>2018-09-06 17:07:11 +0200
commit942a3127796f9f1b6d6f326cc043d2859c7ee1cb (patch)
treeabc49bcd83a772c636b46ab55229e388a6fa0855
parent22d10c756a797b2649f4bf56f9302c1d48922e17 (diff)
downloadnovnc-942a3127796f9f1b6d6f326cc043d2859c7ee1cb.tar.gz
Enforce object key spacing
-rw-r--r--.eslintrc1
-rw-r--r--app/ui.js2
-rw-r--r--core/base64.js6
-rw-r--r--core/display.js2
-rw-r--r--core/input/fixedkeys.js2
-rw-r--r--core/input/keysym.js2
-rw-r--r--core/input/mouse.js2
-rw-r--r--core/util/events.js2
8 files changed, 12 insertions, 7 deletions
diff --git a/.eslintrc b/.eslintrc
index 3a174fd..4edbb50 100644
--- a/.eslintrc
+++ b/.eslintrc
@@ -34,5 +34,6 @@
"func-call-spacing": ["error"],
"func-names": ["error"],
"func-style": ["error", "declaration", { "allowArrowFunctions": true }],
+ "key-spacing": ["error"],
}
}
diff --git a/app/ui.js b/app/ui.js
index 1fb7034..64a3536 100644
--- a/app/ui.js
+++ b/app/ui.js
@@ -775,7 +775,7 @@ const UI = {
const ctrl = document.getElementById('noVNC_setting_' + name);
let val = WebUtil.readSetting(name);
if (typeof val !== 'undefined' && val !== null && ctrl.type === 'checkbox') {
- if (val.toString().toLowerCase() in {'0':1, 'no':1, 'false':1}) {
+ if (val.toString().toLowerCase() in {'0': 1, 'no': 1, 'false': 1}) {
val = false;
} else {
val = true;
diff --git a/core/base64.js b/core/base64.js
index 7871c53..42ba53b 100644
--- a/core/base64.js
+++ b/core/base64.js
@@ -8,8 +8,8 @@ import * as Log from './util/logging.js';
export default {
/* Convert data (an array of integers) to a Base64 string. */
- toBase64Table : 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='.split(''),
- base64Pad : '=',
+ toBase64Table: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='.split(''),
+ base64Pad: '=',
encode(data) {
"use strict";
@@ -44,7 +44,7 @@ export default {
/* Convert Base64 data to a string */
/* eslint-disable comma-spacing */
- toBinaryTable : [
+ 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,
-1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,62, -1,-1,-1,63,
diff --git a/core/display.js b/core/display.js
index 8c0a0c1..54c2c36 100644
--- a/core/display.js
+++ b/core/display.js
@@ -62,7 +62,7 @@ export default class Display {
this._backbuffer = document.createElement('canvas');
this._drawCtx = this._backbuffer.getContext('2d');
- this._damageBounds = { left:0, top:0,
+ this._damageBounds = { left: 0, top: 0,
right: this._backbuffer.width,
bottom: this._backbuffer.height };
diff --git a/core/input/fixedkeys.js b/core/input/fixedkeys.js
index 6dd4222..daf088e 100644
--- a/core/input/fixedkeys.js
+++ b/core/input/fixedkeys.js
@@ -14,6 +14,8 @@
* See https://www.w3.org/TR/uievents-key/ for possible values.
*/
+/* eslint-disable key-spacing */
+
export default {
// 3.1.1.1. Writing System Keys
diff --git a/core/input/keysym.js b/core/input/keysym.js
index ba58be6..22ba058 100644
--- a/core/input/keysym.js
+++ b/core/input/keysym.js
@@ -1,3 +1,5 @@
+/* eslint-disable key-spacing */
+
export default {
XK_VoidSymbol: 0xffffff, /* Void symbol */
diff --git a/core/input/mouse.js b/core/input/mouse.js
index 4a8710e..38112fd 100644
--- a/core/input/mouse.js
+++ b/core/input/mouse.js
@@ -233,7 +233,7 @@ export default class Mouse {
} else {
y = e.clientY - bounds.top;
}
- this._pos = {x:x, y:y};
+ this._pos = {x: x, y: y};
}
// ===== PUBLIC METHODS =====
diff --git a/core/util/events.js b/core/util/events.js
index a0eddc7..93cdd2b 100644
--- a/core/util/events.js
+++ b/core/util/events.js
@@ -96,7 +96,7 @@ export function setCapture (elem) {
_captureIndex++;
// Track cursor and get initial cursor
- _captureObserver.observe(elem, {attributes:true});
+ _captureObserver.observe(elem, {attributes: true});
_captureElemChanged();
captureElem.style.display = "";