From a18a2e8e700e08ba4029b37928e813fde282a7df Mon Sep 17 00:00:00 2001 From: danielyxie Date: Wed, 12 Sep 2018 11:19:59 -0500 Subject: [PATCH] Fixed linting errors --- css/loader.scss | 6 +++--- src/ui/numeralFormat.js | 9 +++++++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/css/loader.scss b/css/loader.scss index 449e6d4dc..e076989d7 100644 --- a/css/loader.scss +++ b/css/loader.scss @@ -103,9 +103,9 @@ -o-transform: translateX(-50%); transform: translateX(-50%); } - .killAllMessageWrapperHidden { +.killAllMessageWrapperHidden { display: none; } - .killAllMessageWrapperShow { +.killAllMessageWrapperShow { display: block; -} +} diff --git a/src/ui/numeralFormat.js b/src/ui/numeralFormat.js index df7f1a2b7..9d4a79b90 100644 --- a/src/ui/numeralFormat.js +++ b/src/ui/numeralFormat.js @@ -14,13 +14,18 @@ import 'numeral/locales/no'; import 'numeral/locales/pl'; import 'numeral/locales/ru'; +/* eslint-disable class-methods-use-this */ + class NumeralFormatter { + constructor() { + this.defaultLocale = 'en'; + } + updateLocale(l) { if (numeral.locale(l) == null) { console.warn(`Invalid locale for numeral: ${l}`); - let defaultValue = 'en'; - numeral.locale(defaultValue); + numeral.locale(this.defaultLocale); return false; } return true;