From 3af16b2650ae41ee8cff15698d512e2d51d3fa37 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Thu, 28 Apr 2016 16:19:27 +0200 Subject: [PATCH] Update eslint config --- .eslintrc | 2 +- package.json | 3 +- src/components/entity/ha-entity-toggle.js | 10 +++---- src/components/ha-cards.html | 12 ++++---- src/components/ha-cards.js | 35 +++++++++-------------- src/components/relative-ha-datetime.js | 4 +-- src/dialogs/more-info-dialog.js | 14 ++++----- src/util/nuclear-behavior.js | 6 ++-- 8 files changed, 40 insertions(+), 46 deletions(-) diff --git a/.eslintrc b/.eslintrc index e8ee6fab5b..6ad290e9a3 100644 --- a/.eslintrc +++ b/.eslintrc @@ -1,5 +1,5 @@ { - "extends": "airbnb/base", + "extends": "airbnb-base", "globals": { "__DEV__": false, "__DEMO__": false diff --git a/package.json b/package.json index bf322696a9..71dbc59c01 100644 --- a/package.json +++ b/package.json @@ -31,8 +31,9 @@ "bower": "^1.7.9", "classnames": "^2.2.3", "eslint": "^2.8.0", - "eslint-config-airbnb": "^7.0.0", "html-minifier": "^1.5.0", + "eslint-config-airbnb-base": "^1.0.4", + "eslint-plugin-import": "^1.6.1", "vulcanize": "^1.14.8", "webpack": "^1.13" } diff --git a/src/components/entity/ha-entity-toggle.js b/src/components/entity/ha-entity-toggle.js index b3bbcab409..2ced510434 100644 --- a/src/components/entity/ha-entity-toggle.js +++ b/src/components/entity/ha-entity-toggle.js @@ -41,9 +41,9 @@ export default new Polymer({ const newVal = ev.target.checked; if (newVal && !this.isOn) { - this._call_service(true); + this.callService(true); } else if (!newVal && this.isOn) { - this._call_service(false); + this.callService(false); } }, @@ -59,11 +59,11 @@ export default new Polymer({ }, turnOn() { - this._call_service(true); + this.callService(true); }, turnOff() { - this._call_service(false); + this.callService(false); }, computeIsOn(stateObj) { @@ -74,7 +74,7 @@ export default new Polymer({ // with the state. It will be out of sync if our service call did not // result in the entity to be turned on. Since the state is not changing, // the resync is not called automatic. - _call_service(turnOn) { + callService(turnOn) { let domain; let service; diff --git a/src/components/ha-cards.html b/src/components/ha-cards.html index 3913b7908f..c45971cdbf 100644 --- a/src/components/ha-cards.html +++ b/src/components/ha-cards.html @@ -53,25 +53,25 @@