Skip to content

Commit

Permalink
refactor: use default prettier config
Browse files Browse the repository at this point in the history
  • Loading branch information
jcwillox committed Jul 28, 2024
1 parent d9a40ad commit 336fee4
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
1 change: 0 additions & 1 deletion .prettierrc.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion src/canary-card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export class CanaryCard extends LitElement implements LovelaceCard {

(async () => {
while (customElements.get("home-assistant") === undefined)
await new Promise(resolve => window.setTimeout(resolve, 100));
await new Promise((resolve) => window.setTimeout(resolve, 100));

if (!customElements.get("canary-card")) {
customElements.define("canary-card", CanaryCard);
Expand Down
4 changes: 2 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function getResources() {
const retVal: string[] = [];
for (const script of scriptElements) {
if (script?.innerText?.trim()?.startsWith("import(")) {
const imports = script.innerText.split("\n")?.map(e => e.trim());
const imports = script.innerText.split("\n")?.map((e) => e.trim());
for (const imp of imports) {
retVal.push(imp.replace(/^import\("/, "").replace(/"\);/, ""));
}
Expand All @@ -31,7 +31,7 @@ function getResources() {
}

const resources = getResources();
if (resources.some(r => r.endsWith(name + ".js"))) {
if (resources.some((r) => r.endsWith(name + ".js"))) {
console.info(`${name} is loaded as a module`);
} else {
fireEvent(window, "ll-rebuild", {});
Expand Down
4 changes: 2 additions & 2 deletions src/secondary-info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ class SecondaryInfo extends HTMLElement {
_shouldUpdate(newHass, entities) {
if (!this._hass || !entities) return true;
return entities.some(
entity => newHass.states[entity] !== this._hass?.states[entity],
(entity) => newHass.states[entity] !== this._hass?.states[entity],
);
}

Expand All @@ -147,7 +147,7 @@ class SecondaryInfo extends HTMLElement {
// show loading message if this is the first connection.
this._unsubRenderTemplate = subscribeRenderTemplate(
null,
result => {
(result) => {
this._element && (this._element.innerHTML = result);
},
this._data,
Expand Down

0 comments on commit 336fee4

Please sign in to comment.