Skip to content

Commit 9863dba

Browse files
committed
Add dedicated ts linting command
1 parent 920bf21 commit 9863dba

File tree

3 files changed

+13
-10
lines changed

3 files changed

+13
-10
lines changed

.github/workflows/validate.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ jobs:
7070
cache-dependency-path: frontend/package-lock.json
7171

7272
- name: Run lint
73-
run: make lint-frontend
73+
run: make lint-frontend-ts
7474

7575
lint-less:
7676
name: Lint - LeSS

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ lint-backend: deps-backend
4646
lint-frontend: deps-frontend
4747
cd $(FRONTEND_DIR) && npm run lint
4848

49+
# Lint frontend TypeScript.
50+
lint-frontend-ts: deps-frontend
51+
cd $(FRONTEND_DIR) && npm run lint:ts
52+
4953
# Lint frontend LeSS with Stylelint.
5054
lint-frontend-less: deps-frontend
5155
cd $(FRONTEND_DIR) && npm run lint:less

frontend/src/main.ts

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ const loadPanelStyles = async (): Promise<void> => {
5151
try {
5252
await panelStylesPromise;
5353
} catch (error) {
54-
// eslint-disable-next-line no-console
5554
console.error("Unable to load Maint panel styles", error);
5655
panelStylesPromise = null;
5756
}
@@ -309,14 +308,14 @@ export class MaintPanel extends LitElement {
309308
${header}
310309
<div class="tasks-section-content">
311310
${this.taskListFeature.render({
312-
tasks: this.dataState.tasks,
313-
hass: this.hass,
314-
entryId: this.dataState.selectedEntryId ?? null,
315-
busy: this.busy,
316-
editing: Boolean(this.editState.taskId),
317-
panelText: this.panelText.bind(this),
318-
localizeText: this.localizeText.bind(this)
319-
})}
311+
tasks: this.dataState.tasks,
312+
hass: this.hass,
313+
entryId: this.dataState.selectedEntryId ?? null,
314+
busy: this.busy,
315+
editing: Boolean(this.editState.taskId),
316+
panelText: this.panelText.bind(this),
317+
localizeText: this.localizeText.bind(this)
318+
})}
320319
</div>
321320
</section>`;
322321
}

0 commit comments

Comments
 (0)