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:
Bram Kragten
2020-04-14 18:05:45 +02:00
committed by GitHub
parent b17490f0de
commit 82f80db558
737 changed files with 9408 additions and 7414 deletions

View File

@@ -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() {