Fixed lint errors in all js files

- Also added linter configuration, and make linter fail on error
- fixing ES6 errors and added ES6 transformer
- gulp target to try local build
- linted gulpfile
- cant hook into gulp lint yet, because gulp does currently not support
  ES6 which some rules demand, since gulp cant transpile itself, we have a
  chicken and egg problem.
- ES6 transpiler for test runner
- removed old linter config
- adapted editorconfig to reflect linter config
This commit is contained in:
David Kaltschmidt
2015-05-27 19:46:16 +02:00
committed by Tom Wilkie
parent 42a3f57e11
commit 7d1ee40a2b
30 changed files with 419 additions and 445 deletions

View File

@@ -1,15 +1,15 @@
var reqwest = require('reqwest');
const reqwest = require('reqwest');
var AppActions = require('../actions/app-actions');
const AppActions = require('../actions/app-actions');
var WS_URL = window.WS_URL || 'ws://' + location.host;
const WS_URL = window.WS_URL || 'ws://' + location.host;
var socket;
var reconnectTimer = 0;
var currentUrl = null;
var updateFrequency = '5s';
var topologyTimer = 0;
let socket;
let reconnectTimer = 0;
let currentUrl = null;
let updateFrequency = '5s';
let topologyTimer = 0;
function createWebsocket(topologyUrl) {
if (socket) {
@@ -26,10 +26,10 @@ function createWebsocket(topologyUrl) {
reconnectTimer = setTimeout(function() {
createWebsocket(topologyUrl);
}, 5000);
}
};
socket.onmessage = function(event) {
var msg = JSON.parse(event.data);
const msg = JSON.parse(event.data);
if (msg.add || msg.remove || msg.update) {
AppActions.receiveNodesDelta(msg);
}
@@ -48,7 +48,7 @@ function getTopologies() {
function getNodeDetails(topologyUrl, nodeId) {
if (topologyUrl && nodeId) {
var url = [topologyUrl, nodeId].join('/');
const url = [topologyUrl, nodeId].join('/');
reqwest(url, function(res) {
AppActions.receiveNodeDetails(res.node);
});
@@ -65,4 +65,5 @@ module.exports = {
createWebsocket(topologyUrl);
}
}
}
};