mirror of
https://github.com/home-assistant/frontend.git
synced 2025-11-13 04:50:29 +00:00
Fix ALL the eslint warnings (#23165)
* Fix many lint warnings * Fix ALL lint warnings * small fix * type fixes
This commit is contained in:
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user