mirror of
https://github.com/home-assistant/frontend.git
synced 2025-10-13 13:49:42 +00:00
Update typescript, prettier, tslint -> eslint (#5536)
* Update typescript, prettier, tslint -> eslint * Organize imports * Use glob for eslint fix react import
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
import { loadCodeMirror } from "../resources/codemirror.ondemand";
|
||||
import { fireEvent } from "../common/dom/fire_event";
|
||||
import {
|
||||
UpdatingElement,
|
||||
property,
|
||||
customElement,
|
||||
PropertyValues,
|
||||
} from "lit-element";
|
||||
import { Editor } from "codemirror";
|
||||
import {
|
||||
customElement,
|
||||
property,
|
||||
PropertyValues,
|
||||
UpdatingElement,
|
||||
} from "lit-element";
|
||||
import { fireEvent } from "../common/dom/fire_event";
|
||||
import { loadCodeMirror } from "../resources/codemirror.ondemand";
|
||||
|
||||
declare global {
|
||||
interface HASSDomEvents {
|
||||
@@ -17,10 +17,15 @@ declare global {
|
||||
@customElement("ha-code-editor")
|
||||
export class HaCodeEditor extends UpdatingElement {
|
||||
public codemirror?: Editor;
|
||||
|
||||
@property() public mode?: string;
|
||||
|
||||
@property() public autofocus = false;
|
||||
|
||||
@property() public rtl = false;
|
||||
|
||||
@property() public error = false;
|
||||
|
||||
@property() private _value = "";
|
||||
|
||||
public set value(value: string) {
|
||||
@@ -32,7 +37,7 @@ export class HaCodeEditor extends UpdatingElement {
|
||||
}
|
||||
|
||||
public get hasComments(): boolean {
|
||||
return this.shadowRoot!.querySelector("span.cm-comment") ? true : false;
|
||||
return !!this.shadowRoot!.querySelector("span.cm-comment");
|
||||
}
|
||||
|
||||
public connectedCallback() {
|
||||
|
Reference in New Issue
Block a user