Update dependency prettier to v3.2.0 (#19411)

* Update dependency prettier to v3.2.0

* Reformat

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Steve Repsher <steverep@users.noreply.github.com>
This commit is contained in:
renovate[bot] 2024-01-15 16:49:22 -05:00 committed by GitHub
parent 3842e8e3a7
commit 6f8c366bad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
23 changed files with 110 additions and 121 deletions

View File

@ -157,11 +157,10 @@ class HassioRegistriesDialog extends LitElement {
} }
public focus(): void { public focus(): void {
this.updateComplete.then( this.updateComplete.then(() =>
() => (
( this.shadowRoot?.querySelector("[dialogInitialFocus]") as HTMLElement
this.shadowRoot?.querySelector("[dialogInitialFocus]") as HTMLElement )?.focus()
)?.focus()
); );
} }

View File

@ -209,11 +209,10 @@ class HassioRepositoriesDialog extends LitElement {
} }
public focus() { public focus() {
this.updateComplete.then( this.updateComplete.then(() =>
() => (
( this.shadowRoot?.querySelector("[dialogInitialFocus]") as HTMLElement
this.shadowRoot?.querySelector("[dialogInitialFocus]") as HTMLElement )?.focus()
)?.focus()
); );
} }

View File

@ -224,7 +224,7 @@
"object-hash": "3.0.0", "object-hash": "3.0.0",
"open": "10.0.3", "open": "10.0.3",
"pinst": "3.0.0", "pinst": "3.0.0",
"prettier": "3.1.1", "prettier": "3.2.0",
"rollup": "2.79.1", "rollup": "2.79.1",
"rollup-plugin-string": "3.0.0", "rollup-plugin-string": "3.0.0",
"rollup-plugin-terser": "7.0.2", "rollup-plugin-terser": "7.0.2",

View File

@ -40,40 +40,38 @@ class HaUsersPickerLight extends LitElement {
const notSelectedUsers = this._notSelectedUsers(this.users, this.value); const notSelectedUsers = this._notSelectedUsers(this.users, this.value);
return html` return html`
${guard( ${guard([notSelectedUsers], () =>
[notSelectedUsers], this.value?.map(
() => (user_id, idx) => html`
this.value?.map( <div>
(user_id, idx) => html` <ha-user-picker
<div> .label=${this.pickedUserLabel}
<ha-user-picker .noUserLabel=${this.hass!.localize(
.label=${this.pickedUserLabel} "ui.components.user-picker.remove_user"
.noUserLabel=${this.hass!.localize( )}
"ui.components.user-picker.remove_user" .index=${idx}
)} .hass=${this.hass}
.index=${idx} .value=${user_id}
.hass=${this.hass} .users=${this._notSelectedUsersAndSelected(
.value=${user_id} user_id,
.users=${this._notSelectedUsersAndSelected( this.users,
user_id, notSelectedUsers
this.users, )}
notSelectedUsers @value-changed=${this._userChanged}
)} ></ha-user-picker>
@value-changed=${this._userChanged} <ha-icon-button
></ha-user-picker> .userId=${user_id}
<ha-icon-button .label=${this.hass!.localize(
.userId=${user_id} "ui.components.user-picker.remove_user"
.label=${this.hass!.localize( )}
"ui.components.user-picker.remove_user" .path=${mdiClose}
)} @click=${this._removeUser}
.path=${mdiClose} >
@click=${this._removeUser} ></ha-icon-button
> >
></ha-icon-button </div>
> `
</div> )
`
)
)} )}
<ha-user-picker <ha-user-picker
.label=${this.pickUserLabel || .label=${this.pickUserLabel ||

View File

@ -177,8 +177,9 @@ class HaConfigSystemNavigation extends LitElement {
const hardwareInfo: HardwareInfo = await this.hass.callWS({ const hardwareInfo: HardwareInfo = await this.hass.callWS({
type: "hardware/info", type: "hardware/info",
}); });
this._boardName = hardwareInfo?.hardware.find((hw) => hw.board !== null) this._boardName = hardwareInfo?.hardware.find(
?.name; (hw) => hw.board !== null
)?.name;
} else if (isHassioLoaded) { } else if (isHassioLoaded) {
const osData: HassioHassOSInfo = await fetchHassioHassOsInfo(this.hass); const osData: HassioHassOSInfo = await fetchHassioHassOsInfo(this.hass);
if (osData.board) { if (osData.board) {

View File

@ -917,9 +917,11 @@ export class EntityRegistrySettingsEditor extends LitElement {
"ui.dialogs.entity_registry.editor.use_device_area" "ui.dialogs.entity_registry.editor.use_device_area"
)} )}
${this.hass.devices[this.entry.device_id].area_id ${this.hass.devices[this.entry.device_id].area_id
? `(${this.hass.areas[ ? `(${
this.hass.devices[this.entry.device_id].area_id! this.hass.areas[
]?.name})` this.hass.devices[this.entry.device_id].area_id!
]?.name
})`
: ""}</span : ""}</span
> >
<span slot="description" <span slot="description"

View File

@ -53,11 +53,10 @@ class HaCounterForm extends LitElement {
} }
public focus() { public focus() {
this.updateComplete.then( this.updateComplete.then(() =>
() => (
( this.shadowRoot?.querySelector("[dialogInitialFocus]") as HTMLElement
this.shadowRoot?.querySelector("[dialogInitialFocus]") as HTMLElement )?.focus()
)?.focus()
); );
} }

View File

@ -31,11 +31,10 @@ class HaInputBooleanForm extends LitElement {
} }
public focus() { public focus() {
this.updateComplete.then( this.updateComplete.then(() =>
() => (
( this.shadowRoot?.querySelector("[dialogInitialFocus]") as HTMLElement
this.shadowRoot?.querySelector("[dialogInitialFocus]") as HTMLElement )?.focus()
)?.focus()
); );
} }

View File

@ -31,11 +31,10 @@ class HaInputButtonForm extends LitElement {
} }
public focus() { public focus() {
this.updateComplete.then( this.updateComplete.then(() =>
() => (
( this.shadowRoot?.querySelector("[dialogInitialFocus]") as HTMLElement
this.shadowRoot?.querySelector("[dialogInitialFocus]") as HTMLElement )?.focus()
)?.focus()
); );
} }

View File

@ -45,11 +45,10 @@ class HaInputDateTimeForm extends LitElement {
} }
public focus() { public focus() {
this.updateComplete.then( this.updateComplete.then(() =>
() => (
( this.shadowRoot?.querySelector("[dialogInitialFocus]") as HTMLElement
this.shadowRoot?.querySelector("[dialogInitialFocus]") as HTMLElement )?.focus()
)?.focus()
); );
} }

View File

@ -60,11 +60,10 @@ class HaInputNumberForm extends LitElement {
} }
public focus() { public focus() {
this.updateComplete.then( this.updateComplete.then(() =>
() => (
( this.shadowRoot?.querySelector("[dialogInitialFocus]") as HTMLElement
this.shadowRoot?.querySelector("[dialogInitialFocus]") as HTMLElement )?.focus()
)?.focus()
); );
} }

View File

@ -58,11 +58,10 @@ class HaInputSelectForm extends LitElement {
} }
public focus() { public focus() {
this.updateComplete.then( this.updateComplete.then(() =>
() => (
( this.shadowRoot?.querySelector("[dialogInitialFocus]") as HTMLElement
this.shadowRoot?.querySelector("[dialogInitialFocus]") as HTMLElement )?.focus()
)?.focus()
); );
} }

View File

@ -50,11 +50,10 @@ class HaInputTextForm extends LitElement {
} }
public focus() { public focus() {
this.updateComplete.then( this.updateComplete.then(() =>
() => (
( this.shadowRoot?.querySelector("[dialogInitialFocus]") as HTMLElement
this.shadowRoot?.querySelector("[dialogInitialFocus]") as HTMLElement )?.focus()
)?.focus()
); );
} }

View File

@ -108,11 +108,10 @@ class HaScheduleForm extends LitElement {
} }
public focus() { public focus() {
this.updateComplete.then( this.updateComplete.then(() =>
() => (
( this.shadowRoot?.querySelector("[dialogInitialFocus]") as HTMLElement
this.shadowRoot?.querySelector("[dialogInitialFocus]") as HTMLElement )?.focus()
)?.focus()
); );
} }

View File

@ -39,11 +39,10 @@ class HaTimerForm extends LitElement {
} }
public focus() { public focus() {
this.updateComplete.then( this.updateComplete.then(() =>
() => (
( this.shadowRoot?.querySelector("[dialogInitialFocus]") as HTMLElement
this.shadowRoot?.querySelector("[dialogInitialFocus]") as HTMLElement )?.focus()
)?.focus()
); );
} }

View File

@ -50,8 +50,8 @@ export class HaManualScriptEditor extends LitElement {
protected updated(changedProps) { protected updated(changedProps) {
if (this._openFields && changedProps.has("config")) { if (this._openFields && changedProps.has("config")) {
this._openFields = false; this._openFields = false;
this._scriptFields?.updateComplete.then( this._scriptFields?.updateComplete.then(() =>
() => this._scriptFields?.focusLastField() this._scriptFields?.focusLastField()
); );
} }
} }

View File

@ -73,8 +73,8 @@ class HaPanelDevService extends LitElement {
data: {}, data: {},
}; };
if (this._yamlMode) { if (this._yamlMode) {
this.updateComplete.then( this.updateComplete.then(() =>
() => this._yamlEditor?.setValue(this._serviceData) this._yamlEditor?.setValue(this._serviceData)
); );
} }
} else if (!this._serviceData?.service) { } else if (!this._serviceData?.service) {
@ -86,8 +86,8 @@ class HaPanelDevService extends LitElement {
data: {}, data: {},
}; };
if (this._yamlMode) { if (this._yamlMode) {
this.updateComplete.then( this.updateComplete.then(() =>
() => this._yamlEditor?.setValue(this._serviceData) this._yamlEditor?.setValue(this._serviceData)
); );
} }
} }

View File

@ -152,8 +152,9 @@ export class HuiDialogEditCard
if (this._cardConfig && this._cardConfig.type) { if (this._cardConfig && this._cardConfig.type) {
let cardName: string | undefined; let cardName: string | undefined;
if (isCustomType(this._cardConfig.type)) { if (isCustomType(this._cardConfig.type)) {
cardName = getCustomCardEntry(stripCustomPrefix(this._cardConfig.type)) cardName = getCustomCardEntry(
?.name; stripCustomPrefix(this._cardConfig.type)
)?.name;
// Trim names that end in " Card" so as not to redundantly duplicate it // Trim names that end in " Card" so as not to redundantly duplicate it
if (cardName?.toLowerCase().endsWith(" card")) { if (cardName?.toLowerCase().endsWith(" card")) {
cardName = cardName.substring(0, cardName.length - 5); cardName = cardName.substring(0, cardName.length - 5);

View File

@ -58,8 +58,8 @@ export class HuiClimateHvacModesCardFeatureEditor
select: { select: {
multiple: true, multiple: true,
mode: "list", mode: "list",
options: HVAC_MODES.filter( options: HVAC_MODES.filter((mode) =>
(mode) => stateObj?.attributes.hvac_modes?.includes(mode) stateObj?.attributes.hvac_modes?.includes(mode)
).map((mode) => ({ ).map((mode) => ({
value: mode, value: mode,
label: stateObj ? formatEntityState(stateObj, mode) : mode, label: stateObj ? formatEntityState(stateObj, mode) : mode,

View File

@ -252,11 +252,10 @@ export class HuiStatisticsGraphCardEditor
); );
const configured_stat_types = this._config!.stat_types const configured_stat_types = this._config!.stat_types
? ensureArray(this._config.stat_types) ? ensureArray(this._config.stat_types)
: stat_types.filter( : stat_types.filter((stat_type) =>
(stat_type) => this._metaDatas?.some((metaData) =>
this._metaDatas?.some((metaData) => statisticsMetaHasType(metaData, stat_type)
statisticsMetaHasType(metaData, stat_type) )
)
); );
const data = { const data = {
chart_type: "line", chart_type: "line",

View File

@ -38,8 +38,8 @@ export class HuiWaterHeaterOperationModesCardFeatureEditor
select: { select: {
multiple: true, multiple: true,
mode: "list", mode: "list",
options: OPERATION_MODES.filter( options: OPERATION_MODES.filter((mode) =>
(mode) => stateObj?.attributes.operation_list?.includes(mode) stateObj?.attributes.operation_list?.includes(mode)
).map((mode) => ({ ).map((mode) => ({
value: mode, value: mode,
label: stateObj ? formatEntityState(stateObj, mode) : mode, label: stateObj ? formatEntityState(stateObj, mode) : mode,

View File

@ -4,10 +4,9 @@ export function computeCssVariable(
if (Array.isArray(props)) { if (Array.isArray(props)) {
return props return props
.reverse() .reverse()
.reduce<string | undefined>( .reduce<
(str, variable) => `var(${variable}${str ? `, ${str}` : ""})`, string | undefined
undefined >((str, variable) => `var(${variable}${str ? `, ${str}` : ""})`, undefined);
);
} }
return `var(${props})`; return `var(${props})`;
} }

View File

@ -9644,7 +9644,7 @@ __metadata:
object-hash: "npm:3.0.0" object-hash: "npm:3.0.0"
open: "npm:10.0.3" open: "npm:10.0.3"
pinst: "npm:3.0.0" pinst: "npm:3.0.0"
prettier: "npm:3.1.1" prettier: "npm:3.2.0"
proxy-polyfill: "npm:0.3.2" proxy-polyfill: "npm:0.3.2"
punycode: "npm:2.3.1" punycode: "npm:2.3.1"
qr-scanner: "npm:1.4.2" qr-scanner: "npm:1.4.2"
@ -13100,12 +13100,12 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"prettier@npm:3.1.1": "prettier@npm:3.2.0":
version: 3.1.1 version: 3.2.0
resolution: "prettier@npm:3.1.1" resolution: "prettier@npm:3.2.0"
bin: bin:
prettier: bin/prettier.cjs prettier: bin/prettier.cjs
checksum: 26a249f321b97d26c04483f1bf2eeb22e082a76f4222a2c922bebdc60111691aad4ec3979610e83942e0b956058ec361d9e9c81c185172264eb6db9aa678082b checksum: eb2eb63038ca9aaf86bda7dc49b879a278bc8344d28236fef08a8f185e8ce721a40155acc4a494e8f91ecbcdd9a132fd326516f791c61cbfa9037c1f74d6d029
languageName: node languageName: node
linkType: hard linkType: hard