From d72741ce0ccc84489d55afb18328acd220206e8b Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20N=C3=A9grier?= Date: Fri, 1 May 2020 23:48:30 +0200 Subject: [PATCH] Fixing linting --- back/package.json | 2 +- front/package.json | 3 ++- front/src/Phaser/Entity/PlayableCaracter.ts | 6 +++--- front/src/Phaser/Login/LogincScene.ts | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/back/package.json b/back/package.json index 1ea43f3..9e735d7 100644 --- a/back/package.json +++ b/back/package.json @@ -9,7 +9,7 @@ "prod": "tsc && node ./dist/server.js", "test": "ts-node node_modules/jasmine/bin/jasmine --config=jasmine.json", "lint": "node_modules/.bin/eslint src/ . --ext .ts", - "fix": "node_modules/.bin/eslint src/ . --ext .ts" + "fix": "node_modules/.bin/eslint --fix src/ . --ext .ts" }, "repository": { "type": "git", diff --git a/front/package.json b/front/package.json index 17c0813..c0f223b 100644 --- a/front/package.json +++ b/front/package.json @@ -24,6 +24,7 @@ "scripts": { "start": "webpack-dev-server --open", "build": "webpack", - "lint": "node_modules/.bin/eslint src/ . --ext .ts" + "lint": "node_modules/.bin/eslint src/ . --ext .ts", + "fix": "node_modules/.bin/eslint --fix src/ . --ext .ts" } } diff --git a/front/src/Phaser/Entity/PlayableCaracter.ts b/front/src/Phaser/Entity/PlayableCaracter.ts index 3b1442c..839a15f 100644 --- a/front/src/Phaser/Entity/PlayableCaracter.ts +++ b/front/src/Phaser/Entity/PlayableCaracter.ts @@ -11,7 +11,7 @@ export class PlayableCaracter extends Phaser.Physics.Arcade.Sprite { super(scene, x, y, texture, frame); // Yes, I know, I'm declaring a sprite inside a sprite. ARP, save me from this madness :) - this.playerName = new BitmapText(scene, x, y - 32, 'main_font', name, 8); + this.playerName = new BitmapText(scene, x, y - 25, 'main_font', name, 8); this.playerName.setOrigin(0.5).setCenterAlign(); scene.add.existing(this.playerName); @@ -43,7 +43,7 @@ export class PlayableCaracter extends Phaser.Physics.Arcade.Sprite { if(this.bubble) { this.bubble.moveBubble(this.x, this.y); } - this.playerName.setPosition(this.x, this.y - 32); + this.playerName.setPosition(this.x, this.y - 25); } stop(){ @@ -54,7 +54,7 @@ export class PlayableCaracter extends Phaser.Physics.Arcade.Sprite { say(text: string) { if (this.bubble) return; this.bubble = new SpeechBubble(this.scene, this, text) - //todo make the buble destroy on player movement? + //todo make the bubble destroy on player movement? setTimeout(() => { this.bubble.destroy(); this.bubble = null; diff --git a/front/src/Phaser/Login/LogincScene.ts b/front/src/Phaser/Login/LogincScene.ts index 24fee6c..8a4c1e9 100644 --- a/front/src/Phaser/Login/LogincScene.ts +++ b/front/src/Phaser/Login/LogincScene.ts @@ -57,7 +57,7 @@ export class LogincScene extends Phaser.Scene { let name = this.nameInput.getText(); if (name === '') { return - }; + } gameManager.connect(name).then(() => { this.scene.start(GameSceneName, { name }); }); -- 2.25.1