From ce5b8f00c4a866b81814e063b1c491f16f25ab6a Mon Sep 17 00:00:00 2001 From: Henning Jacobs Date: Sat, 14 Jan 2017 01:56:27 +0100 Subject: [PATCH] fix eslint warnings --- app/.eslintrc.yml | 1 + app/package.json | 2 +- app/src/app.js | 4 ++-- app/src/cluster.js | 2 +- app/src/pod.js | 10 ++++------ 5 files changed, 9 insertions(+), 10 deletions(-) diff --git a/app/.eslintrc.yml b/app/.eslintrc.yml index d6e3613..b60734f 100644 --- a/app/.eslintrc.yml +++ b/app/.eslintrc.yml @@ -21,6 +21,7 @@ rules: - error no-unused-vars: - warn + - argsIgnorePattern: "^_" semi: - error - never diff --git a/app/package.json b/app/package.json index 462db97..a451813 100644 --- a/app/package.json +++ b/app/package.json @@ -36,7 +36,7 @@ "babel-preset-es2015": "^6.18.0", "babel-runtime": "^6.20.0", "brfs": "^1.4.3", - "eslint": "^3.12.2", + "eslint": "^3.13.1", "eslint-loader": "^1.6.1", "rimraf": "^2.5.4", "transform-loader": "^0.2.3", diff --git a/app/src/app.js b/app/src/app.js index aa9de73..880a2b3 100644 --- a/app/src/app.js +++ b/app/src/app.js @@ -345,7 +345,7 @@ export default class App { } } - tick(time) { + tick(_time) { this.renderer.render(this.stage) } @@ -399,7 +399,7 @@ export default class App { } const eventSource = this.eventSource = new EventSource(url, {credentials: 'include'}) this.keepAlive() - eventSource.onerror = function(event) { + eventSource.onerror = function(_event) { that._errors++ if (that._errors <= 1) { // immediately reconnect on first error diff --git a/app/src/cluster.js b/app/src/cluster.js index c171cee..165929a 100644 --- a/app/src/cluster.js +++ b/app/src/cluster.js @@ -87,7 +87,7 @@ export default class Cluster extends PIXI.Graphics { topHandle.interactive = true topHandle.buttonMode = true const that = this - topHandle.on('click', function(event) { + topHandle.on('click', function(_event) { App.current.toggleCluster(that.cluster.id) }) var text = new PIXI.Text(this.cluster.api_server_url, {fontFamily: 'ShareTechMono', fontSize: 10, fill: 0x000000}) diff --git a/app/src/pod.js b/app/src/pod.js index d3591a8..f1cee12 100644 --- a/app/src/pod.js +++ b/app/src/pod.js @@ -123,17 +123,17 @@ export class Pod extends PIXI.Graphics { } } - pulsate(time) { + pulsate(_time) { const v = Math.sin((PIXI.ticker.shared.lastTime % 1000) / 1000. * Math.PI) this.alpha = v * this._progress } - crashing(time) { + crashing(_time) { const v = Math.sin((PIXI.ticker.shared.lastTime % 1000) / 1000. * Math.PI) this.tint = PIXI.utils.rgb2hex([1, v, v]) } - terminating(time) { + terminating(_time) { const v = Math.sin(((1000 + PIXI.ticker.shared.lastTime) % 1000) / 1000. * Math.PI) this.cross.alpha = v } @@ -204,11 +204,9 @@ export class Pod extends PIXI.Graphics { this.tooltip.visible = false }) podBox.lineStyle(1, App.current.theme.primaryColor, 1) - let i = 0 const w = 10 / this.pod.containers.length - for (const container of this.pod.containers) { + for (let i = 0; i < this.pod.containers.length; i++) { podBox.drawRect(i * w, 0, w, 10) - i++ } let color if (this.pod.phase == 'Succeeded') {