From fb9bd0eb7ddcaa03ef3b26cfd3b29aa3eddc5e15 Mon Sep 17 00:00:00 2001
From: Zack Barett
Date: Wed, 21 Oct 2020 06:14:10 -0500
Subject: [PATCH] Fix prettier that keeps messing with merging dev (#7412)
---
hassio/src/system/hassio-system-metrics.ts | 6 +--
src/components/entity/ha-chart-base.js | 2 +-
src/components/ha-menu-button.ts | 5 +--
src/panels/config/person/ha-config-person.ts | 16 +++-----
src/panels/config/tags/ha-config-tags.ts | 39 ++++++++++++--------
src/panels/profile/ha-refresh-tokens-card.ts | 8 ++--
6 files changed, 39 insertions(+), 37 deletions(-)
diff --git a/hassio/src/system/hassio-system-metrics.ts b/hassio/src/system/hassio-system-metrics.ts
index b3cafdbd27..90a996874a 100644
--- a/hassio/src/system/hassio-system-metrics.ts
+++ b/hassio/src/system/hassio-system-metrics.ts
@@ -21,11 +21,11 @@ import { fetchHassioStats, HassioStats } from "../../../src/data/hassio/common";
import { HassioHostInfo } from "../../../src/data/hassio/host";
import { haStyle } from "../../../src/resources/styles";
import { HomeAssistant } from "../../../src/types";
+import { bytesToString } from "../../../src/util/bytes-to-string";
import {
getValueInPercentage,
roundWithOneDecimal,
} from "../../../src/util/calculate";
-import { bytesToString } from "../../../src/util/bytes-to-string";
import { hassioStyle } from "../resources/hassio-style";
@customElement("hassio-system-metrics")
@@ -65,9 +65,7 @@ class HassioSystemMetrics extends LitElement {
{
description: "Used Space",
value: this._getUsedSpace(this.hostInfo),
- tooltip: `${
- this.hostInfo.disk_used
- } GB/${this.hostInfo.disk_total} GB`,
+ tooltip: `${this.hostInfo.disk_used} GB/${this.hostInfo.disk_total} GB`,
},
];
diff --git a/src/components/entity/ha-chart-base.js b/src/components/entity/ha-chart-base.js
index 8ddcd75f13..e02470bd08 100644
--- a/src/components/entity/ha-chart-base.js
+++ b/src/components/entity/ha-chart-base.js
@@ -278,7 +278,7 @@ class HaChartBase extends mixinBehaviors(
this.set(["tooltip", "title"], title);
if (tooltip.beforeBody) {
- this.set(["tooltip", "beforeBody"], tooltip.beforeBody.join("\n"));
+ this.set(["tooltip", "beforeBody"], tooltip.beforeBody.join("\n"));
}
const bodyLines = tooltip.body.map((n) => n.lines);
diff --git a/src/components/ha-menu-button.ts b/src/components/ha-menu-button.ts
index baac1dc297..b95d012938 100644
--- a/src/components/ha-menu-button.ts
+++ b/src/components/ha-menu-button.ts
@@ -6,9 +6,9 @@ import {
CSSResult,
customElement,
html,
+ internalProperty,
LitElement,
property,
- internalProperty,
TemplateResult,
} from "lit-element";
import { fireEvent } from "../common/dom/fire_event";
@@ -98,8 +98,7 @@ class HaMenuButton extends LitElement {
return;
}
- this.style.display =
- newNarrow || this._alwaysVisible ? "initial" : "none";
+ this.style.display = newNarrow || this._alwaysVisible ? "initial" : "none";
if (!newNarrow) {
this._hasNotifications = false;
diff --git a/src/panels/config/person/ha-config-person.ts b/src/panels/config/person/ha-config-person.ts
index 467b04673a..d7403b341a 100644
--- a/src/panels/config/person/ha-config-person.ts
+++ b/src/panels/config/person/ha-config-person.ts
@@ -1,7 +1,7 @@
+import "@material/mwc-fab";
import { mdiPlus } from "@mdi/js";
import "@polymer/paper-item/paper-icon-item";
import "@polymer/paper-item/paper-item-body";
-import "@material/mwc-fab";
import {
css,
CSSResult,
@@ -24,8 +24,8 @@ import {
} from "../../../data/person";
import { fetchUsers, User } from "../../../data/user";
import {
- showConfirmationDialog,
showAlertDialog,
+ showConfirmationDialog,
} from "../../../dialogs/generic/show-dialog-box";
import "../../../layouts/hass-loading-screen";
import "../../../layouts/hass-tabs-subpage";
@@ -87,22 +87,16 @@ class HaConfigPerson extends LitElement {
`
: ""}
-
+
- ${this.hass.localize(
- "ui.panel.config.person.learn_more"
- )}
+ ${this.hass.localize("ui.panel.config.person.learn_more")}
-
${this._storageItems.map((entry) => {
return html`
diff --git a/src/panels/config/tags/ha-config-tags.ts b/src/panels/config/tags/ha-config-tags.ts
index a2b2d52d07..2fbe093f43 100644
--- a/src/panels/config/tags/ha-config-tags.ts
+++ b/src/panels/config/tags/ha-config-tags.ts
@@ -1,6 +1,12 @@
import "@material/mwc-fab";
import "@material/mwc-icon-button";
-import { mdiCog, mdiContentDuplicate, mdiPlus, mdiRobot, mdiHelpCircle } from "@mdi/js";
+import {
+ mdiCog,
+ mdiContentDuplicate,
+ mdiHelpCircle,
+ mdiPlus,
+ mdiRobot,
+} from "@mdi/js";
import {
customElement,
html,
@@ -24,15 +30,18 @@ import {
updateTag,
UpdateTagParams,
} from "../../../data/tag";
-import { showConfirmationDialog, showAlertDialog } from "../../../dialogs/generic/show-dialog-box";
+import {
+ showAlertDialog,
+ showConfirmationDialog,
+} from "../../../dialogs/generic/show-dialog-box";
import { getExternalConfig } from "../../../external_app/external_config";
import "../../../layouts/hass-tabs-subpage-data-table";
import { SubscribeMixin } from "../../../mixins/subscribe-mixin";
import { HomeAssistant, Route } from "../../../types";
+import { documentationUrl } from "../../../util/documentation-url";
import { configSections } from "../ha-panel-config";
import { showTagDetailDialog } from "./show-dialog-tag-detail";
import "./tag-image";
-import { documentationUrl } from "../../../util/documentation-url";
export interface TagRowData extends Tag {
last_scanned_datetime: Date | null;
@@ -214,18 +223,18 @@ export class HaConfigTags extends SubscribeMixin(LitElement) {
title: this.hass.localize("ui.panel.config.tags.caption"),
text: html`
- ${this.hass.localize(
- "ui.panel.config.tags.detail.usage",
- "companion_link",
- html`${this.hass!.localize(
- "ui.panel.config.tags.detail.companion_apps"
- )}`
- )}
+ ${this.hass.localize(
+ "ui.panel.config.tags.detail.usage",
+ "companion_link",
+ html`${this.hass!.localize(
+ "ui.panel.config.tags.detail.companion_apps"
+ )}`
+ )}
{
const timeB = tokenB.last_used_at ? new Date(tokenB.last_used_at) : 0;
if (timeA < timeB) {
return 1;
- }
+ }
if (timeA > timeB) {
return -1;
}
return 0;
-}
+};
@customElement("ha-refresh-tokens-card")
class HaRefreshTokens extends LitElement {
@@ -44,7 +44,9 @@ class HaRefreshTokens extends LitElement {
private _refreshTokens = memoizeOne(
(refreshTokens: RefreshToken[]): RefreshToken[] =>
- refreshTokens?.filter((token) => token.type === "normal").sort(compareTokenLastUsedAt)
+ refreshTokens
+ ?.filter((token) => token.type === "normal")
+ .sort(compareTokenLastUsedAt)
);
protected render(): TemplateResult {