Fix ALL the eslint warnings (#23165)

* Fix many lint warnings

* Fix ALL lint warnings

* small fix

* type fixes
This commit is contained in:
Petar Petrov
2024-12-06 10:55:07 +02:00
committed by GitHub
parent f724d8e7a9
commit 7a12fd2853
308 changed files with 918 additions and 823 deletions

View File

@@ -61,13 +61,13 @@ import { substituteBlueprint } from "../../../data/blueprint";
export class HaScriptEditor extends KeyboardShortcutMixin(LitElement) {
@property({ attribute: false }) public hass!: HomeAssistant;
@property() public scriptId: string | null = null;
@property({ attribute: false }) public scriptId: string | null = null;
@property() public entityId: string | null = null;
@property({ attribute: false }) public entityId: string | null = null;
@property({ attribute: false }) public entityRegistry!: EntityRegistryEntry[];
@property({ type: Boolean }) public isWide = false;
@property({ attribute: false, type: Boolean }) public isWide = false;
@property({ type: Boolean }) public narrow = false;
@@ -583,7 +583,7 @@ export class HaScriptEditor extends KeyboardShortcutMixin(LitElement) {
private async _showTrace() {
if (this.scriptId) {
const result = await this.confirmUnsavedChanged();
const result = await this._confirmUnsavedChanged();
if (result) {
navigate(`/config/script/trace/${this.scriptId}`);
}
@@ -614,7 +614,7 @@ export class HaScriptEditor extends KeyboardShortcutMixin(LitElement) {
this._errors = undefined;
}
private async confirmUnsavedChanged(): Promise<boolean> {
private async _confirmUnsavedChanged(): Promise<boolean> {
if (this._dirty) {
return showConfirmationDialog(this, {
title: this.hass!.localize(
@@ -632,7 +632,7 @@ export class HaScriptEditor extends KeyboardShortcutMixin(LitElement) {
}
private _backTapped = async () => {
const result = await this.confirmUnsavedChanged();
const result = await this._confirmUnsavedChanged();
if (result) {
afterNextRender(() => history.back());
}
@@ -692,7 +692,7 @@ export class HaScriptEditor extends KeyboardShortcutMixin(LitElement) {
"ui.panel.config.script.picker.migrate_script_description"
),
})
: await this.confirmUnsavedChanged();
: await this._confirmUnsavedChanged();
if (result) {
this._entityId = undefined;
showScriptEditor({