Update dependency prettier to v3.7.1 (#28239)

* Update dependency prettier to v3.7.1

* format

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Petar Petrov <MindFreeze@users.noreply.github.com>
This commit is contained in:
renovate[bot] 2025-11-30 13:33:41 +00:00 committed by GitHub
parent a8910bcbe4
commit ce86aabe32
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
59 changed files with 135 additions and 241 deletions

View File

@ -305,9 +305,8 @@ export class HcMain extends HassElement {
await llColl.refresh();
this._unsubLovelace = llColl.subscribe(async (rawConfig) => {
if (isStrategyDashboard(rawConfig)) {
const { generateLovelaceDashboardStrategy } = await import(
"../../../../src/panels/lovelace/strategies/get-strategy"
);
const { generateLovelaceDashboardStrategy } =
await import("../../../../src/panels/lovelace/strategies/get-strategy");
const config = await generateLovelaceDashboardStrategy(
rawConfig,
this.hass!
@ -347,9 +346,8 @@ export class HcMain extends HassElement {
}
private async _generateDefaultLovelaceConfig() {
const { generateLovelaceDashboardStrategy } = await import(
"../../../../src/panels/lovelace/strategies/get-strategy"
);
const { generateLovelaceDashboardStrategy } =
await import("../../../../src/panels/lovelace/strategies/get-strategy");
this._handleNewLovelaceConfig(
await generateLovelaceDashboardStrategy(DEFAULT_CONFIG, this.hass!)
);

View File

@ -88,8 +88,8 @@ class HassioRegistriesDialog extends LitElement {
<ha-button
?disabled=${Boolean(
!this._input.registry ||
!this._input.username ||
!this._input.password
!this._input.username ||
!this._input.password
)}
@click=${this._addNewRegistry}
appearance="filled"

View File

@ -209,7 +209,7 @@
"lodash.template": "4.5.0",
"map-stream": "0.0.7",
"pinst": "3.0.0",
"prettier": "3.6.2",
"prettier": "3.7.1",
"rspack-manifest-plugin": "5.2.0",
"serve": "14.2.5",
"sinon": "21.0.0",

View File

@ -45,9 +45,8 @@ export const computeFormatFunctions = async (
formatEntityAttributeName: FormatEntityAttributeNameFunc;
formatEntityName: FormatEntityNameFunc;
}> => {
const { computeStateDisplay } = await import(
"../entity/compute_state_display"
);
const { computeStateDisplay } =
await import("../entity/compute_state_display");
const { computeAttributeValueDisplay, computeAttributeNameDisplay } =
await import("../entity/compute_attribute_display");

View File

@ -450,7 +450,7 @@ export class HaServiceControl extends LitElement {
const hasOptional = Boolean(
!shouldRenderServiceDataYaml &&
serviceData?.flatFields.some((field) => showOptionalToggle(field))
serviceData?.flatFields.some((field) => showOptionalToggle(field))
);
const targetEntities = this._getTargetedEntities(

View File

@ -47,8 +47,7 @@ export interface HassioFullBackupCreateParams {
confirm_password?: string;
background?: boolean;
}
export interface HassioPartialBackupCreateParams
extends HassioFullBackupCreateParams {
export interface HassioPartialBackupCreateParams extends HassioFullBackupCreateParams {
folders?: string[];
addons?: string[];
homeassistant?: boolean;

View File

@ -18,8 +18,7 @@ export const enum LawnMowerEntityFeature {
}
interface LawnMowerEntityAttributes
extends HassEntityAttributeBase,
Record<string, any> {}
extends HassEntityAttributeBase, Record<string, any> {}
export interface LawnMowerEntity extends HassEntityBase {
attributes: LawnMowerEntityAttributes;

View File

@ -18,8 +18,7 @@ export interface LovelaceSectionConfig extends LovelaceBaseSectionConfig {
cards?: LovelaceCardConfig[];
}
export interface LovelaceStrategySectionConfig
extends LovelaceBaseSectionConfig {
export interface LovelaceStrategySectionConfig extends LovelaceBaseSectionConfig {
strategy: LovelaceStrategyConfig;
}

View File

@ -11,8 +11,7 @@ export interface LovelaceConfig extends LovelaceDashboardBaseConfig {
views: LovelaceViewRawConfig[];
}
export interface LovelaceDashboardStrategyConfig
extends LovelaceDashboardBaseConfig {
export interface LovelaceDashboardStrategyConfig extends LovelaceDashboardBaseConfig {
strategy: LovelaceStrategyConfig;
}

View File

@ -29,8 +29,7 @@ export interface LovelaceDashboardMutableParams {
title: string;
}
export interface LovelaceDashboardCreateParams
extends LovelaceDashboardMutableParams {
export interface LovelaceDashboardCreateParams extends LovelaceDashboardMutableParams {
url_path: string;
mode: "storage";
}

View File

@ -106,8 +106,7 @@ export interface AutomationTrace extends BaseTrace {
}
export interface AutomationTraceExtended
extends AutomationTrace,
BaseTraceExtended {
extends AutomationTrace, BaseTraceExtended {
config: ManualAutomationConfig;
blueprint_inputs?: BlueprintAutomationConfig;
}

View File

@ -32,8 +32,7 @@ export interface PromptDialogParams extends BaseDialogBoxParams {
}
export interface DialogBoxParams
extends ConfirmationDialogParams,
PromptDialogParams {
extends ConfirmationDialogParams, PromptDialogParams {
confirm?: (out?: string) => void;
confirmation?: boolean;
prompt?: boolean;

View File

@ -19,8 +19,9 @@ declare global {
}
}
export interface HassDialog<T = HASSDomEvents[ValidHassDomEvent]>
extends HTMLElement {
export interface HassDialog<
T = HASSDomEvents[ValidHassDomEvent],
> extends HTMLElement {
showDialog(params: T);
closeDialog?: () => boolean;
}

View File

@ -90,9 +90,7 @@ class OnboardingRestoreBackupCloudLogin extends LitElement {
this._email = this._cloudLoginElement.emailField.value;
}
await import(
"../../panels/config/cloud/forgot-password/cloud-forgot-password-card"
);
await import("../../panels/config/cloud/forgot-password/cloud-forgot-password-card");
this._view = "forgot-password";
}

View File

@ -124,9 +124,9 @@ export class HaPlatformCondition extends LitElement {
const hasOptional = Boolean(
conditionDesc?.fields &&
Object.values(conditionDesc.fields).some((field) =>
showOptionalToggle(field)
)
Object.values(conditionDesc.fields).some((field) =>
showOptionalToggle(field)
)
);
return html`

View File

@ -160,9 +160,9 @@ export class HaPlatformTrigger extends LitElement {
const hasOptional = Boolean(
triggerDesc?.fields &&
Object.values(triggerDesc.fields).some((field) =>
showOptionalToggle(field)
)
Object.values(triggerDesc.fields).some((field) =>
showOptionalToggle(field)
)
);
return html`

View File

@ -1138,23 +1138,20 @@ export class HaConfigDevicePage extends LitElement {
}
if (domains.includes("mqtt")) {
const mqtt = await import(
"./device-detail/integration-elements/mqtt/device-actions"
);
const mqtt =
await import("./device-detail/integration-elements/mqtt/device-actions");
const actions = mqtt.getMQTTDeviceActions(this, device);
deviceActions.push(...actions);
}
if (domains.includes("zha")) {
const zha = await import(
"./device-detail/integration-elements/zha/device-actions"
);
const zha =
await import("./device-detail/integration-elements/zha/device-actions");
const actions = await zha.getZHADeviceActions(this, this.hass, device);
deviceActions.push(...actions);
}
if (domains.includes("zwave_js")) {
const zwave = await import(
"./device-detail/integration-elements/zwave_js/device-actions"
);
const zwave =
await import("./device-detail/integration-elements/zwave_js/device-actions");
const actions = await zwave.getZwaveDeviceActions(
this,
this.hass,
@ -1163,9 +1160,8 @@ export class HaConfigDevicePage extends LitElement {
deviceActions.push(...actions);
}
if (domains.includes("esphome")) {
const esphome = await import(
"./device-detail/integration-elements/esphome/device-actions"
);
const esphome =
await import("./device-detail/integration-elements/esphome/device-actions");
const actions = await esphome.getESPHomeDeviceActions(
this,
this.hass,
@ -1174,9 +1170,8 @@ export class HaConfigDevicePage extends LitElement {
deviceActions.push(...actions);
}
if (domains.includes("matter")) {
const matter = await import(
"./device-detail/integration-elements/matter/device-actions"
);
const matter =
await import("./device-detail/integration-elements/matter/device-actions");
const defaultActions = matter.getMatterDeviceDefaultActions(
this,
this.hass,
@ -1220,9 +1215,8 @@ export class HaConfigDevicePage extends LitElement {
).map((int) => int.domain);
if (domains.includes("zwave_js")) {
const zwave = await import(
"./device-detail/integration-elements/zwave_js/device-alerts"
);
const zwave =
await import("./device-detail/integration-elements/zwave_js/device-alerts");
const alerts = await zwave.getZwaveDeviceAlerts(this.hass, device);
deviceAlerts.push(...alerts);
@ -1304,9 +1298,7 @@ export class HaConfigDevicePage extends LitElement {
`);
}
if (domains.includes("zwave_js")) {
import(
"./device-detail/integration-elements/zwave_js/ha-device-info-zwave_js"
);
import("./device-detail/integration-elements/zwave_js/ha-device-info-zwave_js");
deviceInfo.push(html`
<ha-device-info-zwave_js
.hass=${this.hass}
@ -1315,9 +1307,7 @@ export class HaConfigDevicePage extends LitElement {
`);
}
if (domains.includes("matter")) {
import(
"./device-detail/integration-elements/matter/ha-device-info-matter"
);
import("./device-detail/integration-elements/matter/ha-device-info-matter");
deviceInfo.push(html`
<ha-device-info-matter
.hass=${this.hass}

View File

@ -116,8 +116,10 @@ import { showAddIntegrationDialog } from "../integrations/show-add-integration-d
import { showLabelDetailDialog } from "../labels/show-dialog-label-detail";
import { slugify } from "../../../common/string/slugify";
export interface StateEntity
extends Omit<EntityRegistryEntry, "id" | "unique_id"> {
export interface StateEntity extends Omit<
EntityRegistryEntry,
"id" | "unique_id"
> {
readonly?: boolean;
selectable?: boolean;
id?: string;

View File

@ -530,9 +530,7 @@ class HaPanelConfig extends SubscribeMixin(HassRouterPage) {
zha: {
tag: "zha-config-dashboard-router",
load: () =>
import(
"./integrations/integration-panels/zha/zha-config-dashboard-router"
),
import("./integrations/integration-panels/zha/zha-config-dashboard-router"),
},
mqtt: {
tag: "mqtt-config-panel",
@ -542,30 +540,22 @@ class HaPanelConfig extends SubscribeMixin(HassRouterPage) {
zwave_js: {
tag: "zwave_js-config-router",
load: () =>
import(
"./integrations/integration-panels/zwave_js/zwave_js-config-router"
),
import("./integrations/integration-panels/zwave_js/zwave_js-config-router"),
},
matter: {
tag: "matter-config-panel",
load: () =>
import(
"./integrations/integration-panels/matter/matter-config-panel"
),
import("./integrations/integration-panels/matter/matter-config-panel"),
},
thread: {
tag: "thread-config-panel",
load: () =>
import(
"./integrations/integration-panels/thread/thread-config-panel"
),
import("./integrations/integration-panels/thread/thread-config-panel"),
},
bluetooth: {
tag: "bluetooth-config-dashboard-router",
load: () =>
import(
"./integrations/integration-panels/bluetooth/bluetooth-config-dashboard-router"
),
import("./integrations/integration-panels/bluetooth/bluetooth-config-dashboard-router"),
},
dhcp: {
tag: "dhcp-config-panel",
@ -580,9 +570,7 @@ class HaPanelConfig extends SubscribeMixin(HassRouterPage) {
zeroconf: {
tag: "zeroconf-config-panel",
load: () =>
import(
"./integrations/integration-panels/zeroconf/zeroconf-config-panel"
),
import("./integrations/integration-panels/zeroconf/zeroconf-config-panel"),
},
application_credentials: {
tag: "ha-config-application-credentials",

View File

@ -192,9 +192,9 @@ export class ZHAGroupBindingControl extends LitElement {
private get _canBind(): boolean {
return Boolean(
this._groupToBind &&
this._clustersToBind &&
this._clustersToBind?.length > 0 &&
this.device
this._clustersToBind &&
this._clustersToBind?.length > 0 &&
this.device
);
}

View File

@ -11,9 +11,9 @@ import { DEFAULT_ENERGY_COLLECTION_KEY } from "../ha-panel-energy";
const sourceHasCost = (source: Record<string, any>): boolean =>
Boolean(
source.stat_cost ||
source.stat_compensation ||
source.entity_energy_price ||
source.number_energy_price
source.stat_compensation ||
source.entity_energy_price ||
source.number_energy_price
);
@customElement("energy-overview-view-strategy")

View File

@ -62,9 +62,7 @@ class HuiAlarmModeCardFeature
}
public static async getConfigElement(): Promise<LovelaceCardFeatureEditor> {
await import(
"../editor/config-elements/hui-alarm-modes-card-feature-editor"
);
await import("../editor/config-elements/hui-alarm-modes-card-feature-editor");
return document.createElement("hui-alarm-modes-card-feature-editor");
}

View File

@ -142,9 +142,7 @@ class HuiAreaControlsCardFeature
}
public static async getConfigElement(): Promise<LovelaceCardFeatureEditor> {
await import(
"../editor/config-elements/hui-area-controls-card-feature-editor"
);
await import("../editor/config-elements/hui-area-controls-card-feature-editor");
return document.createElement("hui-area-controls-card-feature-editor");
}

View File

@ -71,9 +71,7 @@ class HuiClimateFanModesCardFeature
}
public static async getConfigElement(): Promise<LovelaceCardFeatureEditor> {
await import(
"../editor/config-elements/hui-climate-fan-modes-card-feature-editor"
);
await import("../editor/config-elements/hui-climate-fan-modes-card-feature-editor");
return document.createElement("hui-climate-fan-modes-card-feature-editor");
}

View File

@ -70,9 +70,7 @@ class HuiClimateHvacModesCardFeature
}
public static async getConfigElement(): Promise<LovelaceCardFeatureEditor> {
await import(
"../editor/config-elements/hui-climate-hvac-modes-card-feature-editor"
);
await import("../editor/config-elements/hui-climate-hvac-modes-card-feature-editor");
return document.createElement("hui-climate-hvac-modes-card-feature-editor");
}

View File

@ -71,9 +71,7 @@ class HuiClimatePresetModesCardFeature
}
public static async getConfigElement(): Promise<LovelaceCardFeatureEditor> {
await import(
"../editor/config-elements/hui-climate-preset-modes-card-feature-editor"
);
await import("../editor/config-elements/hui-climate-preset-modes-card-feature-editor");
return document.createElement(
"hui-climate-preset-modes-card-feature-editor"
);

View File

@ -71,9 +71,7 @@ class HuiClimateSwingHorizontalModesCardFeature
}
public static async getConfigElement(): Promise<LovelaceCardFeatureEditor> {
await import(
"../editor/config-elements/hui-climate-swing-horizontal-modes-card-feature-editor"
);
await import("../editor/config-elements/hui-climate-swing-horizontal-modes-card-feature-editor");
return document.createElement(
"hui-climate-swing-horizontal-modes-card-feature-editor"
);

View File

@ -71,9 +71,7 @@ class HuiClimateSwingModesCardFeature
}
public static async getConfigElement(): Promise<LovelaceCardFeatureEditor> {
await import(
"../editor/config-elements/hui-climate-swing-modes-card-feature-editor"
);
await import("../editor/config-elements/hui-climate-swing-modes-card-feature-editor");
return document.createElement(
"hui-climate-swing-modes-card-feature-editor"
);

View File

@ -79,9 +79,7 @@ class HuiCounterActionsCardFeature
}
public static async getConfigElement(): Promise<LovelaceCardFeatureEditor> {
await import(
"../editor/config-elements/hui-counter-actions-card-feature-editor"
);
await import("../editor/config-elements/hui-counter-actions-card-feature-editor");
return document.createElement("hui-counter-actions-card-feature-editor");
}

View File

@ -68,9 +68,7 @@ class HuiFanPresetModesCardFeature
}
public static async getConfigElement(): Promise<LovelaceCardFeatureEditor> {
await import(
"../editor/config-elements/hui-fan-preset-modes-card-feature-editor"
);
await import("../editor/config-elements/hui-fan-preset-modes-card-feature-editor");
return document.createElement("hui-fan-preset-modes-card-feature-editor");
}

View File

@ -71,9 +71,7 @@ class HuiHumidifierModesCardFeature
}
public static async getConfigElement(): Promise<LovelaceCardFeatureEditor> {
await import(
"../editor/config-elements/hui-humidifier-modes-card-feature-editor"
);
await import("../editor/config-elements/hui-humidifier-modes-card-feature-editor");
return document.createElement("hui-humidifier-modes-card-feature-editor");
}

View File

@ -128,9 +128,7 @@ class HuiLawnMowerCommandCardFeature
}
public static async getConfigElement(): Promise<LovelaceCardFeatureEditor> {
await import(
"../editor/config-elements/hui-lawn-mower-commands-card-feature-editor"
);
await import("../editor/config-elements/hui-lawn-mower-commands-card-feature-editor");
return document.createElement(
"hui-lawn-mower-commands-card-feature-editor"
);

View File

@ -60,9 +60,7 @@ class HuiMediaPlayerVolumeButtonsCardFeature
}
public static async getConfigElement(): Promise<LovelaceCardFeatureEditor> {
await import(
"../editor/config-elements/hui-media-player-volume-buttons-card-feature-editor"
);
await import("../editor/config-elements/hui-media-player-volume-buttons-card-feature-editor");
return document.createElement(
"hui-media-player-volume-buttons-card-feature-editor"
);

View File

@ -57,9 +57,7 @@ class HuiNumericInputCardFeature
}
public static async getConfigElement(): Promise<LovelaceCardFeatureEditor> {
await import(
"../editor/config-elements/hui-numeric-input-card-feature-editor"
);
await import("../editor/config-elements/hui-numeric-input-card-feature-editor");
return document.createElement("hui-numeric-input-card-feature-editor");
}

View File

@ -64,9 +64,7 @@ class HuiSelectOptionsCardFeature
}
public static async getConfigElement(): Promise<LovelaceCardFeatureEditor> {
await import(
"../editor/config-elements/hui-select-options-card-feature-editor"
);
await import("../editor/config-elements/hui-select-options-card-feature-editor");
return document.createElement("hui-select-options-card-feature-editor");
}

View File

@ -54,9 +54,7 @@ class HuiHistoryChartCardFeature
}
public static async getConfigElement(): Promise<LovelaceCardFeatureEditor> {
await import(
"../editor/config-elements/hui-trend-graph-card-feature-editor"
);
await import("../editor/config-elements/hui-trend-graph-card-feature-editor");
return document.createElement("hui-trend-graph-card-feature-editor");
}

View File

@ -56,9 +56,7 @@ class HuiUpdateActionsCardFeature
}
public static async getConfigElement(): Promise<LovelaceCardFeatureEditor> {
await import(
"../editor/config-elements/hui-update-actions-card-feature-editor"
);
await import("../editor/config-elements/hui-update-actions-card-feature-editor");
return document.createElement("hui-update-actions-card-feature-editor");
}

View File

@ -172,9 +172,7 @@ class HuiVacuumCommandCardFeature
}
public static async getConfigElement(): Promise<LovelaceCardFeatureEditor> {
await import(
"../editor/config-elements/hui-vacuum-commands-card-feature-editor"
);
await import("../editor/config-elements/hui-vacuum-commands-card-feature-editor");
return document.createElement("hui-vacuum-commands-card-feature-editor");
}

View File

@ -73,9 +73,7 @@ class HuiWaterHeaterOperationModeCardFeature
}
public static async getConfigElement(): Promise<LovelaceCardFeatureEditor> {
await import(
"../editor/config-elements/hui-water-heater-operation-modes-card-feature-editor"
);
await import("../editor/config-elements/hui-water-heater-operation-modes-card-feature-editor");
return document.createElement(
"hui-water-heater-operation-modes-card-feature-editor"
);

View File

@ -182,12 +182,12 @@ export class HuiPictureCard extends LitElement implements LovelaceCard {
class=${classMap({
clickable: Boolean(
(this._config.image_entity && !this._config.tap_action) ||
(this._config.tap_action &&
this._config.tap_action.action !== "none") ||
(this._config.hold_action &&
this._config.hold_action.action !== "none") ||
(this._config.double_tap_action &&
this._config.double_tap_action.action !== "none")
(this._config.tap_action &&
this._config.tap_action.action !== "none") ||
(this._config.hold_action &&
this._config.hold_action.action !== "none") ||
(this._config.double_tap_action &&
this._config.double_tap_action.action !== "none")
),
})}
>

View File

@ -207,9 +207,9 @@ class HuiPictureGlanceCard extends LitElement implements LovelaceCard {
hasAction(this._config.tap_action) ||
Boolean(
!this._config.tap_action &&
(this._config.camera_image ||
this._config.image_entity ||
this._config.entity)
(this._config.camera_image ||
this._config.image_entity ||
this._config.entity)
);
return html`

View File

@ -183,8 +183,7 @@ export interface EnergyDevicesGraphCardConfig extends EnergyCardBaseConfig {
modes?: ("bar" | "pie")[];
}
export interface EnergyDevicesDetailGraphCardConfig
extends EnergyCardBaseConfig {
export interface EnergyDevicesDetailGraphCardConfig extends EnergyCardBaseConfig {
type: "energy-devices-detail-graph";
title?: string;
max_devices?: number;
@ -202,14 +201,12 @@ export interface EnergySolarGaugeCardConfig extends EnergyCardBaseConfig {
title?: string;
}
export interface EnergySelfSufficiencyGaugeCardConfig
extends EnergyCardBaseConfig {
export interface EnergySelfSufficiencyGaugeCardConfig extends EnergyCardBaseConfig {
type: "energy-self-sufficiency-gauge";
title?: string;
}
export interface EnergyGridNeutralityGaugeCardConfig
extends EnergyCardBaseConfig {
export interface EnergyGridNeutralityGaugeCardConfig extends EnergyCardBaseConfig {
type: "energy-grid-neutrality-gauge";
title?: string;
}

View File

@ -43,8 +43,9 @@ export interface ConfigError {
message: string;
}
export interface EntitiesEditorEvent<T extends EntityConfig = EntityConfig>
extends CustomEvent {
export interface EntitiesEditorEvent<
T extends EntityConfig = EntityConfig,
> extends CustomEvent {
detail: {
entities?: T[];
item?: any;

View File

@ -13,9 +13,7 @@ import type {
class HuiConditionalElement extends HTMLElement implements LovelaceElement {
public static async getConfigElement(): Promise<LovelacePictureElementEditor> {
await import(
"../editor/config-elements/elements/hui-conditional-element-editor"
);
await import("../editor/config-elements/elements/hui-conditional-element-editor");
return document.createElement("hui-conditional-element-editor");
}

View File

@ -11,9 +11,7 @@ export class HuiServiceButtonElement
implements LovelaceElement
{
public static async getConfigElement(): Promise<LovelacePictureElementEditor> {
await import(
"../editor/config-elements/elements/hui-service-button-element-editor"
);
await import("../editor/config-elements/elements/hui-service-button-element-editor");
return document.createElement("hui-service-button-element-editor");
}

View File

@ -24,9 +24,7 @@ export class HuiStateBadgeElement
implements LovelaceElement
{
public static async getConfigElement(): Promise<LovelacePictureElementEditor> {
await import(
"../editor/config-elements/elements/hui-state-badge-element-editor"
);
await import("../editor/config-elements/elements/hui-state-badge-element-editor");
return document.createElement("hui-state-badge-element-editor");
}

View File

@ -21,9 +21,7 @@ import type { LovelaceElement, StateIconElementConfig } from "./types";
@customElement("hui-state-icon-element")
export class HuiStateIconElement extends LitElement implements LovelaceElement {
public static async getConfigElement(): Promise<LovelacePictureElementEditor> {
await import(
"../editor/config-elements/elements/hui-state-icon-element-editor"
);
await import("../editor/config-elements/elements/hui-state-icon-element-editor");
return document.createElement("hui-state-icon-element-editor");
}

View File

@ -20,9 +20,7 @@ import type { LovelaceElement, StateLabelElementConfig } from "./types";
@customElement("hui-state-label-element")
class HuiStateLabelElement extends LitElement implements LovelaceElement {
public static async getConfigElement(): Promise<LovelacePictureElementEditor> {
await import(
"../editor/config-elements/elements/hui-state-label-element-editor"
);
await import("../editor/config-elements/elements/hui-state-label-element-editor");
return document.createElement("hui-state-label-element-editor");
}

View File

@ -39,9 +39,7 @@ export class HuiEntityHeadingBadge
implements LovelaceHeadingBadge
{
public static async getConfigElement(): Promise<LovelaceHeadingBadgeEditor> {
await import(
"../editor/heading-badge-editor/hui-entity-heading-badge-editor"
);
await import("../editor/heading-badge-editor/hui-entity-heading-badge-editor");
return document.createElement("hui-heading-entity-editor");
}

View File

@ -635,10 +635,10 @@ class HUIRoot extends LitElement {
private _isVisible = (view: LovelaceViewConfig) =>
Boolean(
this._editMode ||
view.visible === undefined ||
view.visible === true ||
(Array.isArray(view.visible) &&
view.visible.some((show) => show.user === this.hass!.user?.id))
view.visible === undefined ||
view.visible === true ||
(Array.isArray(view.visible) &&
view.visible.some((show) => show.user === this.hass!.user?.id))
);
private _clearParam(param: string) {

View File

@ -21,9 +21,7 @@ export class IframeDashboardStrategy extends ReactiveElement {
}
public static async getConfigElement(): Promise<LovelaceStrategyEditor> {
await import(
"../../editor/dashboard-strategy-editor/hui-iframe-dashboard-strategy-editor"
);
await import("../../editor/dashboard-strategy-editor/hui-iframe-dashboard-strategy-editor");
return document.createElement("hui-iframe-dashboard-strategy-editor");
}

View File

@ -22,9 +22,7 @@ export class OriginalStatesDashboardStrategy extends ReactiveElement {
}
public static async getConfigElement(): Promise<LovelaceStrategyEditor> {
await import(
"../../editor/dashboard-strategy-editor/hui-original-states-dashboard-strategy-editor"
);
await import("../../editor/dashboard-strategy-editor/hui-original-states-dashboard-strategy-editor");
return document.createElement(
"hui-original-states-dashboard-strategy-editor"
);

View File

@ -12,14 +12,11 @@ export interface LovelaceStrategy<T = any> {
configRequired?: boolean;
}
export interface LovelaceDashboardStrategy
extends LovelaceStrategy<LovelaceConfig> {}
export interface LovelaceDashboardStrategy extends LovelaceStrategy<LovelaceConfig> {}
export interface LovelaceViewStrategy
extends LovelaceStrategy<LovelaceViewConfig> {}
export interface LovelaceViewStrategy extends LovelaceStrategy<LovelaceViewConfig> {}
export interface LovelaceSectionStrategy
extends LovelaceStrategy<LovelaceSectionConfig> {}
export interface LovelaceSectionStrategy extends LovelaceStrategy<LovelaceSectionConfig> {}
export interface LovelaceStrategyEditor extends LovelaceGenericElementEditor {
setConfig(config: LovelaceStrategyConfig): void;

View File

@ -112,8 +112,7 @@ export interface LovelaceBadgeConstructor extends Constructor<LovelaceBadge> {
getConfigForm?: () => LovelaceConfigForm;
}
export interface LovelaceHeaderFooterConstructor
extends Constructor<LovelaceHeaderFooter> {
export interface LovelaceHeaderFooterConstructor extends Constructor<LovelaceHeaderFooter> {
getStubConfig?: (
hass: HomeAssistant,
entities: string[],
@ -126,8 +125,7 @@ export interface LovelaceRowConstructor extends Constructor<LovelaceRow> {
getConfigElement?: () => LovelaceRowEditor;
}
export interface LovelaceElementConstructor
extends Constructor<LovelaceElement> {
export interface LovelaceElementConstructor extends Constructor<LovelaceElement> {
getConfigElement?: () => LovelacePictureElementEditor;
getStubConfig?: (
hass: HomeAssistant,
@ -151,8 +149,7 @@ export interface LovelaceBadgeEditor extends LovelaceGenericElementEditor {
setConfig(config: LovelaceBadgeConfig): void;
}
export interface LovelaceHeaderFooterEditor
extends LovelaceGenericElementEditor {
export interface LovelaceHeaderFooterEditor extends LovelaceGenericElementEditor {
setConfig(config: LovelaceHeaderFooterConfig): void;
}
@ -160,8 +157,7 @@ export interface LovelaceRowEditor extends LovelaceGenericElementEditor {
setConfig(config: LovelaceRowConfig): void;
}
export interface LovelacePictureElementEditor
extends LovelaceGenericElementEditor {
export interface LovelacePictureElementEditor extends LovelaceGenericElementEditor {
setConfig(config: LovelaceElementConfig): void;
}
@ -184,8 +180,7 @@ export interface LovelaceCardFeature extends HTMLElement {
position?: LovelaceCardFeaturePosition;
}
export interface LovelaceCardFeatureConstructor
extends Constructor<LovelaceCardFeature> {
export interface LovelaceCardFeatureConstructor extends Constructor<LovelaceCardFeature> {
getStubConfig?: (
hass: HomeAssistant,
context?: LovelaceCardFeatureContext
@ -198,8 +193,7 @@ export interface LovelaceCardFeatureConstructor
isSupported?: (stateObj?: HassEntity) => boolean;
}
export interface LovelaceCardFeatureEditor
extends LovelaceGenericElementEditor {
export interface LovelaceCardFeatureEditor extends LovelaceGenericElementEditor {
setConfig(config: LovelaceCardFeatureConfig): void;
}
@ -209,8 +203,7 @@ export interface LovelaceHeadingBadge extends HTMLElement {
setConfig(config: LovelaceHeadingBadgeConfig);
}
export interface LovelaceHeadingBadgeConstructor
extends Constructor<LovelaceHeadingBadge> {
export interface LovelaceHeadingBadgeConstructor extends Constructor<LovelaceHeadingBadge> {
getStubConfig?: (
hass: HomeAssistant,
stateObj?: HassEntity
@ -222,7 +215,6 @@ export interface LovelaceHeadingBadgeConstructor
};
}
export interface LovelaceHeadingBadgeEditor
extends LovelaceGenericElementEditor {
export interface LovelaceHeadingBadgeEditor extends LovelaceGenericElementEditor {
setConfig(config: LovelaceHeadingBadgeConfig): void;
}

View File

@ -1,8 +1,6 @@
if (typeof window.ResizeObserver !== "function") {
window.ResizeObserver = (
await import(
"@lit-labs/virtualizer/polyfills/resize-observer-polyfill/ResizeObserver"
)
await import("@lit-labs/virtualizer/polyfills/resize-observer-polyfill/ResizeObserver")
).default;
}

View File

@ -150,9 +150,8 @@ export default <T extends Constructor<HassElement>>(superClass: T) =>
let redirects: Redirects;
if (targetPath.startsWith("/hassio")) {
const myPanelSupervisor = await import(
"../../hassio/src/hassio-my-redirect"
);
const myPanelSupervisor =
await import("../../hassio/src/hassio-my-redirect");
redirects = myPanelSupervisor.REDIRECTS;
} else {
const myPanel = await import("../panels/my/ha-panel-my");

View File

@ -35,9 +35,8 @@ describe("token_storage.saveTokens", () => {
})
);
({ saveTokens } = await import(
"../../../../src/common/auth/token_storage"
));
({ saveTokens } =
await import("../../../../src/common/auth/token_storage"));
saveTokens(tokens);
expect(window.__tokenCache.tokens).toEqual(tokens);
});
@ -68,9 +67,8 @@ describe("token_storage.saveTokens", () => {
const setItemSpy = vi.fn();
window.localStorage.setItem = setItemSpy;
({ saveTokens } = await import(
"../../../../src/common/auth/token_storage"
));
({ saveTokens } =
await import("../../../../src/common/auth/token_storage"));
saveTokens(tokens);
expect(window.__tokenCache.tokens).toEqual(tokens);
expect(window.__tokenCache.writeEnabled).toBe(true);
@ -119,9 +117,8 @@ describe("token_storage.saveTokens", () => {
error: vi.fn(),
} as unknown as Console;
({ saveTokens } = await import(
"../../../../src/common/auth/token_storage"
));
({ saveTokens } =
await import("../../../../src/common/auth/token_storage"));
saveTokens(tokens);
expect(window.__tokenCache.tokens).toEqual(tokens);
expect(window.__tokenCache.writeEnabled).toBe(true);

View File

@ -49,9 +49,8 @@ describe("token_storage", () => {
const getItemSpy = vi.fn(() => JSON.stringify(tokens));
window.localStorage.getItem = getItemSpy;
const { loadTokens } = await import(
"../../../../src/common/auth/token_storage"
);
const { loadTokens } =
await import("../../../../src/common/auth/token_storage");
const loadedTokens = loadTokens();
expect(loadedTokens).toEqual(tokens);
@ -66,9 +65,8 @@ describe("token_storage", () => {
const getItemSpy = vi.fn(() => "hello");
window.localStorage.getItem = getItemSpy;
const { loadTokens } = await import(
"../../../../src/common/auth/token_storage"
);
const { loadTokens } =
await import("../../../../src/common/auth/token_storage");
const loadedTokens = loadTokens();
expect(loadedTokens).toEqual(null);
@ -80,9 +78,8 @@ describe("token_storage", () => {
});
it("should enable write", async () => {
const { enableWrite } = await import(
"../../../../src/common/auth/token_storage"
);
const { enableWrite } =
await import("../../../../src/common/auth/token_storage");
enableWrite();
expect(window.__tokenCache.writeEnabled).toBe(true);
});
@ -98,9 +95,8 @@ describe("token_storage", () => {
const setItemSpy = vi.fn();
window.localStorage.setItem = setItemSpy;
const { enableWrite } = await import(
"../../../../src/common/auth/token_storage"
);
const { enableWrite } =
await import("../../../../src/common/auth/token_storage");
enableWrite();
expect(window.__tokenCache.writeEnabled).toBe(true);

View File

@ -9350,7 +9350,7 @@ __metadata:
node-vibrant: "npm:4.0.3"
object-hash: "npm:3.0.0"
pinst: "npm:3.0.0"
prettier: "npm:3.6.2"
prettier: "npm:3.7.1"
punycode: "npm:2.3.1"
qr-scanner: "npm:1.4.2"
qrcode: "npm:1.5.4"
@ -12125,12 +12125,12 @@ __metadata:
languageName: node
linkType: hard
"prettier@npm:3.6.2":
version: 3.6.2
resolution: "prettier@npm:3.6.2"
"prettier@npm:3.7.1":
version: 3.7.1
resolution: "prettier@npm:3.7.1"
bin:
prettier: bin/prettier.cjs
checksum: 10/1213691706bcef1371d16ef72773c8111106c3533b660b1cc8ec158bd109cdf1462804125f87f981f23c4a3dba053b6efafda30ab0114cc5b4a725606bb9ff26
checksum: 10/59fa89769246d395de30dec976e0ad31c8d2fe3889733765d89398c95c2b9d6cd341553a850fe14fe187407c9bfb2262a2ab1823c6de1f0205a968e2012f0f11
languageName: node
linkType: hard