Skip to content

Commit

Permalink
Fix eslint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
RafalWilinski committed Apr 21, 2020
1 parent cd01089 commit 9588d4b
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
"lines-around-directive": "error",
"max-depth": "error",
"max-len": "off",
"max-lines": "error",
"max-lines": "off",
"max-nested-callbacks": "error",
"max-params": "error",
"max-statements": "off",
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/gather-os-metrics.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ module.exports = (io, span) => {
stat.loop = eventLoopStats.sense();

span.os.push(stat);
if (!span.responses[0] || last.timestamp + span.interval * 1000 < Date.now()) {
if (!span.responses[0] || (last.timestamp + span.interval) * 1000 < Date.now()) {
span.responses.push(defaultResponse);
}

Expand Down
6 changes: 3 additions & 3 deletions src/helpers/socket-io-init.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ module.exports = (server, config) => {
io = socketIo(server);
}

io.on('connection', (socket) => {
io.on('connection', socket => {
if (config.authorize) {
config
.authorize(socket)
.then((authorized) => {
.then(authorized => {
if (!authorized) socket.disconnect('unauthorized');
else addSocketEvents(socket, config);
})
Expand All @@ -36,7 +36,7 @@ module.exports = (server, config) => {
}
});

config.spans.forEach((span) => {
config.spans.forEach(span => {
span.os = [];
span.responses = [];
const interval = setInterval(() => gatherOsMetrics(io, span), span.interval * 1000);
Expand Down
2 changes: 1 addition & 1 deletion src/public/javascripts/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ socket.on('esm_start', function (data) {
});

var spanNode = document.createElement('span');
var textNode = document.createTextNode((span.retention * span.interval) / 60 + 'M');
var textNode = document.createTextNode(((span.retention * span.interval) / 60) + 'M');

spanNode.appendChild(textNode);
spanNode.setAttribute('id', index);
Expand Down

0 comments on commit 9588d4b

Please sign in to comment.