]> git.proxmox.com Git - mirror_novnc.git/commitdiff
Enforce object key spacing
authorPierre Ossman <ossman@cendio.se>
Thu, 6 Sep 2018 15:07:11 +0000 (17:07 +0200)
committerPierre Ossman <ossman@cendio.se>
Thu, 6 Sep 2018 15:07:11 +0000 (17:07 +0200)
.eslintrc
app/ui.js
core/base64.js
core/display.js
core/input/fixedkeys.js
core/input/keysym.js
core/input/mouse.js
core/util/events.js

index 3a174fd0e2e83e4cf44df583249615f736313c6b..4edbb507524411847656b569324ac23256972b06 100644 (file)
--- a/.eslintrc
+++ b/.eslintrc
@@ -34,5 +34,6 @@
         "func-call-spacing": ["error"],
         "func-names": ["error"],
         "func-style": ["error", "declaration", { "allowArrowFunctions": true }],
+        "key-spacing": ["error"],
     }
 }
index 1fb7034d5b23c23fb07a522d943327e8461b9083..64a35369dc1ae1ba1dbd726e4f65186feb46ccb7 100644 (file)
--- 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;
index 7871c538fa46cc3717ba4b1be65a6612b50eff8f..42ba53b6aed60362513d6007d8e4345b4db4eef8 100644 (file)
@@ -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,
index 8c0a0c12503b7837b01fc5558e03d1533ae4c05b..54c2c360193f192596ba5d8e36365a80a96f2959 100644 (file)
@@ -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 };
 
index 6dd4222349b64f2dbf5d03229e7e9dc69b6fbb08..daf088e3884bb4eaf44b0100a2958afe66023bd1 100644 (file)
@@ -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
index ba58be6848b307b54feeb11001edf36aa8821d14..22ba0584eae170150e21827c50142158bb359995 100644 (file)
@@ -1,3 +1,5 @@
+/* eslint-disable key-spacing */
+
 export default {
     XK_VoidSymbol:                  0xffffff, /* Void symbol */
 
index 4a8710efe5dcc74a2e48ea69a5642bfe86c1a1b5..38112fdf9d596c296979483088122b1c82a4ca09 100644 (file)
@@ -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 =====
index a0eddc71f2a2148c7f906bfb003b0a1654070ae9..93cdd2bc92af55f4a4a6bc17d3b6fc57fe63d7c1 100644 (file)
@@ -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 = "";