From fec23eb236373ab9f28061788ded4eefc36e29b5 Mon Sep 17 00:00:00 2001 From: kovacsv Date: Mon, 12 Jul 2021 18:41:38 +0200 Subject: [PATCH] Add more eslint rules. --- .eslintrc.json | 5 ++++- source/viewer/navigation.js | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index db5ea0e..3b77d62 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -15,6 +15,7 @@ "ecmaVersion": 12 }, "rules": { + "semi": "error", "no-var": "error", "guard-for-in": "error", "no-use-before-define": "error", @@ -25,7 +26,9 @@ "no-prototype-builtins": "error", "no-eval": "error", "no-useless-escape": "error", - "prefer-arrow-callback" : "error", + "no-multiple-empty-lines": "error", + "comma-spacing": "error", + "prefer-arrow-callback": "error", "quotes": ["error", "single"], "block-scoped-var": "error", "no-loop-func": "error", diff --git a/source/viewer/navigation.js b/source/viewer/navigation.js index 2def81b..2707f37 100644 --- a/source/viewer/navigation.js +++ b/source/viewer/navigation.js @@ -36,7 +36,7 @@ OV.MouseInteraction = class constructor () { this.prev = new OV.Coord2D (0.0, 0.0); - this.curr = new OV.Coord2D (0.0, 0,0); + this.curr = new OV.Coord2D (0.0, 0.0); this.diff = new OV.Coord2D (0.0, 0.0); this.buttons = []; } @@ -100,7 +100,7 @@ OV.TouchInteraction = class constructor () { this.prevPos = new OV.Coord2D (0.0, 0.0); - this.currPos = new OV.Coord2D (0.0, 0,0); + this.currPos = new OV.Coord2D (0.0, 0.0); this.diffPos = new OV.Coord2D (0.0, 0.0); this.prevDist = 0.0; this.currDist = 0.0;