From 8db111c2fb90445cdb2be8d97432a0c95536e283 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Sat, 26 Jan 2019 19:34:07 -0800 Subject: [PATCH] Update lint tools (#2576) * Update lint * Prettier Hass.io * Update prettier --- .eslintrc-hound.json | 3 +- demo/src/custom-cards/ha-demo-card.ts | 38 +- gallery/src/demos/demo-util-long-press.ts | 32 +- hassio/src/hassio-pages-with-tabs.js | 10 +- hassio/src/system/hassio-supervisor-info.js | 15 +- package.json | 2 +- src/auth/ha-auth-flow.js | 10 +- src/auth/ha-authorize.ts | 34 +- src/components/entity/ha-state-label-badge.ts | 11 +- src/components/ha-form.js | 18 +- src/components/ha-label-badge.ts | 67 ++-- src/dialogs/ha-more-info-dialog.js | 2 +- src/panels/config/cloud/cloud-alexa-pref.ts | 22 +- .../config/cloud/cloud-exposed-entities.ts | 28 +- src/panels/config/cloud/cloud-google-pref.ts | 38 +- src/panels/config/cloud/cloud-webhooks.ts | 44 +-- src/panels/config/cloud/ha-config-cloud.js | 8 +- src/panels/config/ha-panel-config.js | 47 +-- src/panels/config/users/ha-config-users.js | 7 +- src/panels/config/zha/ha-config-zha.ts | 38 +- .../config/zha/zha-cluster-attributes.ts | 60 ++- src/panels/config/zha/zha-cluster-commands.ts | 96 +++-- src/panels/config/zha/zha-clusters.ts | 28 +- src/panels/config/zha/zha-entities.ts | 48 ++- src/panels/config/zha/zha-node.ts | 72 ++-- src/panels/config/zwave/zwave-usercodes.js | 4 +- .../lovelace/cards/hui-alarm-panel-card.ts | 102 +++-- .../lovelace/cards/hui-entities-card.ts | 46 +-- .../lovelace/cards/hui-entity-button-card.ts | 50 ++- src/panels/lovelace/cards/hui-gauge-card.ts | 58 ++- src/panels/lovelace/cards/hui-glance-card.ts | 56 ++- src/panels/lovelace/cards/hui-iframe-card.ts | 8 +- src/panels/lovelace/cards/hui-light-card.ts | 66 ++-- .../lovelace/cards/hui-markdown-card.ts | 8 +- src/panels/lovelace/cards/hui-picture-card.ts | 12 +- .../cards/hui-picture-elements-card.ts | 8 +- .../lovelace/cards/hui-picture-entity-card.ts | 28 +- .../lovelace/cards/hui-picture-glance-card.ts | 66 ++-- src/panels/lovelace/cards/hui-sensor-card.ts | 54 ++- .../lovelace/cards/hui-shopping-list-card.ts | 162 ++++---- .../lovelace/components/hui-action-editor.ts | 58 ++- .../lovelace/components/hui-card-options.ts | 19 +- .../components/hui-entities-toggle.ts | 10 +- .../lovelace/components/hui-entity-editor.ts | 24 +- .../components/hui-theme-select-editor.ts | 12 +- .../editor/card-editor/hui-card-picker.ts | 22 +- .../card-editor/hui-dialog-move-card-view.ts | 22 +- .../editor/card-editor/hui-edit-card.ts | 97 +++-- .../hui-alarm-panel-card-editor.ts | 40 +- .../config-elements/hui-sensor-card-editor.ts | 12 +- .../lovelace/editor/hui-dialog-save-config.ts | 12 +- .../editor/view-editor/hui-edit-view.ts | 22 +- .../elements/hui-state-label-element.ts | 8 +- .../entity-rows/hui-cover-entity-row.ts | 28 +- .../entity-rows/hui-group-entity-row.ts | 36 +- .../hui-input-select-entity-row.ts | 16 +- .../entity-rows/hui-lock-entity-row.ts | 8 +- .../hui-media-player-entity-row.ts | 68 ++-- .../entity-rows/hui-scene-entity-row.ts | 26 +- .../entity-rows/hui-script-entity-row.ts | 26 +- .../entity-rows/hui-sensor-entity-row.ts | 20 +- .../entity-rows/hui-toggle-entity-row.ts | 36 +- src/panels/lovelace/hui-editor.ts | 20 +- src/panels/lovelace/hui-root.ts | 109 +++--- src/panels/lovelace/hui-view.ts | 24 +- .../lovelace/special-rows/hui-section-row.ts | 12 +- tslint.json | 8 +- yarn.lock | 348 +++++++++--------- 68 files changed, 1174 insertions(+), 1475 deletions(-) diff --git a/.eslintrc-hound.json b/.eslintrc-hound.json index 6681780402..50b04a73e0 100644 --- a/.eslintrc-hound.json +++ b/.eslintrc-hound.json @@ -8,7 +8,8 @@ }, "settings": { "react": { - "pragma": "h" + "pragma": "h", + "version": "15.0" }, "import/resolver": { "webpack": { diff --git a/demo/src/custom-cards/ha-demo-card.ts b/demo/src/custom-cards/ha-demo-card.ts index 0555c42bcb..e997d86eae 100644 --- a/demo/src/custom-cards/ha-demo-card.ts +++ b/demo/src/custom-cards/ha-demo-card.ts @@ -54,26 +54,24 @@ export class HADemoCard extends LitElement implements LovelaceCard { .disabled=${this._switching} >
- ${ - this._switching - ? html` - - ` - : until( - selectedDemoConfig.then( - (conf) => html` - ${conf.name} - - by - - ${conf.authorName} - - - ` - ), - "" - ) - } + ${this._switching + ? html` + + ` + : until( + selectedDemoConfig.then( + (conf) => html` + ${conf.name} + + by + + ${conf.authorName} + + + ` + ), + "" + )}
html` - - - (long) press me! - + ${[1, 2, 3].map( + () => html` + + + (long) press me! + - + -
(try pressing and scrolling too!)
-
- ` - ) - } +
(try pressing and scrolling too!)
+
+ ` + )} `; } diff --git a/hassio/src/hassio-pages-with-tabs.js b/hassio/src/hassio-pages-with-tabs.js index cd85ae82b9..c817624790 100644 --- a/hassio/src/hassio-pages-with-tabs.js +++ b/hassio/src/hassio-pages-with-tabs.js @@ -62,14 +62,14 @@ class HassioPagesWithTabs extends NavigateMixin(PolymerElement) { System -