fix eslint warnings

This commit is contained in:
Henning Jacobs
2017-01-14 01:56:27 +01:00
parent 29f9fc251b
commit ce5b8f00c4
5 changed files with 9 additions and 10 deletions

View File

@@ -21,6 +21,7 @@ rules:
- error - error
no-unused-vars: no-unused-vars:
- warn - warn
- argsIgnorePattern: "^_"
semi: semi:
- error - error
- never - never

View File

@@ -36,7 +36,7 @@
"babel-preset-es2015": "^6.18.0", "babel-preset-es2015": "^6.18.0",
"babel-runtime": "^6.20.0", "babel-runtime": "^6.20.0",
"brfs": "^1.4.3", "brfs": "^1.4.3",
"eslint": "^3.12.2", "eslint": "^3.13.1",
"eslint-loader": "^1.6.1", "eslint-loader": "^1.6.1",
"rimraf": "^2.5.4", "rimraf": "^2.5.4",
"transform-loader": "^0.2.3", "transform-loader": "^0.2.3",

View File

@@ -345,7 +345,7 @@ export default class App {
} }
} }
tick(time) { tick(_time) {
this.renderer.render(this.stage) this.renderer.render(this.stage)
} }
@@ -399,7 +399,7 @@ export default class App {
} }
const eventSource = this.eventSource = new EventSource(url, {credentials: 'include'}) const eventSource = this.eventSource = new EventSource(url, {credentials: 'include'})
this.keepAlive() this.keepAlive()
eventSource.onerror = function(event) { eventSource.onerror = function(_event) {
that._errors++ that._errors++
if (that._errors <= 1) { if (that._errors <= 1) {
// immediately reconnect on first error // immediately reconnect on first error

View File

@@ -87,7 +87,7 @@ export default class Cluster extends PIXI.Graphics {
topHandle.interactive = true topHandle.interactive = true
topHandle.buttonMode = true topHandle.buttonMode = true
const that = this const that = this
topHandle.on('click', function(event) { topHandle.on('click', function(_event) {
App.current.toggleCluster(that.cluster.id) App.current.toggleCluster(that.cluster.id)
}) })
var text = new PIXI.Text(this.cluster.api_server_url, {fontFamily: 'ShareTechMono', fontSize: 10, fill: 0x000000}) var text = new PIXI.Text(this.cluster.api_server_url, {fontFamily: 'ShareTechMono', fontSize: 10, fill: 0x000000})

View File

@@ -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) const v = Math.sin((PIXI.ticker.shared.lastTime % 1000) / 1000. * Math.PI)
this.alpha = v * this._progress this.alpha = v * this._progress
} }
crashing(time) { crashing(_time) {
const v = Math.sin((PIXI.ticker.shared.lastTime % 1000) / 1000. * Math.PI) const v = Math.sin((PIXI.ticker.shared.lastTime % 1000) / 1000. * Math.PI)
this.tint = PIXI.utils.rgb2hex([1, v, v]) 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) const v = Math.sin(((1000 + PIXI.ticker.shared.lastTime) % 1000) / 1000. * Math.PI)
this.cross.alpha = v this.cross.alpha = v
} }
@@ -204,11 +204,9 @@ export class Pod extends PIXI.Graphics {
this.tooltip.visible = false this.tooltip.visible = false
}) })
podBox.lineStyle(1, App.current.theme.primaryColor, 1) podBox.lineStyle(1, App.current.theme.primaryColor, 1)
let i = 0
const w = 10 / this.pod.containers.length 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) podBox.drawRect(i * w, 0, w, 10)
i++
} }
let color let color
if (this.pod.phase == 'Succeeded') { if (this.pod.phase == 'Succeeded') {