diff --git a/.prettierrc b/.prettierrc
index 585b712..42f80e6 100644
--- a/.prettierrc
+++ b/.prettierrc
@@ -1,14 +1,14 @@
{
- useTabs: true,
- tabWidth: 4,
- trailingComma: "es5",
- "overrides": [
- {
- "files": "*.yml",
- "options": {
- "tabWidth": 2,
- "useTabs": false
- }
- }
- ]
+ "useTabs": true,
+ "tabWidth": 4,
+ "trailingComma": "es5",
+ "overrides": [
+ {
+ "files": "*.yml",
+ "options": {
+ "tabWidth": 2,
+ "useTabs": false
+ }
+ }
+ ]
}
diff --git a/src/back/frame.ts b/src/back/frame.ts
index 4a0ad5b..60563cf 100644
--- a/src/back/frame.ts
+++ b/src/back/frame.ts
@@ -1,3 +1,3 @@
-export default function frame(id: string, body: string) {
+export default function frame(id: string, body: string): string {
return /* HTML */ ` ${body} `;
}
diff --git a/src/back/html.ts b/src/back/html.ts
index 520ee28..7460965 100644
--- a/src/back/html.ts
+++ b/src/back/html.ts
@@ -1,7 +1,7 @@
import { Context } from "sealious";
export default async function html(
- context: Context,
+ _context: Context,
body: string
): Promise {
return /* HTML */ `
diff --git a/src/back/routes/homepage.ts b/src/back/routes/homepage.ts
index 0512990..56df810 100644
--- a/src/back/routes/homepage.ts
+++ b/src/back/routes/homepage.ts
@@ -5,7 +5,7 @@ import { NewTask, TaskList } from "../views/tasks";
const router = new Router();
-export async function MainView(context: Context) {
+export async function MainView(context: Context): Promise {
return await html(
context,
/* HTML */ `My ToDo App
diff --git a/src/back/views/tasks.ts b/src/back/views/tasks.ts
index 468c3bc..091ba1b 100644
--- a/src/back/views/tasks.ts
+++ b/src/back/views/tasks.ts
@@ -1,7 +1,8 @@
+/* eslint-disable @typescript-eslint/restrict-template-expressions */
import { CollectionItem, Context } from "sealious";
import frame from "../frame";
-export function Task(task: CollectionItem) {
+export function Task(task: CollectionItem): string {
return frame(
`task-${task.id}`,
/* HTML */ `
@@ -24,7 +25,7 @@ export function Task(task: CollectionItem) {
);
}
-export async function TaskList(context: Context) {
+export async function TaskList(context: Context): Promise {
const { items: tasks } = await context.app.collections.tasks
.list(context)
.fetch();
@@ -38,7 +39,7 @@ export async function TaskList(context: Context) {
);
}
-export function NewTask() {
+export function NewTask(): string {
return frame(
"new-task",
/* HTML */ `