From 4aeb9eb8bdfdc7af24e4e938c2e6ec6b8883bbce Mon Sep 17 00:00:00 2001 From: Joscha Date: Mon, 10 Feb 2025 15:28:30 +0100 Subject: [PATCH] Fix eslint warnings --- gdn-app/src/App.vue | 2 +- gdn-app/src/components/CNavbarDropdown.vue | 1 + gdn-app/src/components/CNote.vue | 6 +++--- gdn-app/src/lib/path.ts | 2 +- gdn-app/src/stores/notes.ts | 4 ++-- gdn-app/src/stores/repos.ts | 4 ++-- 6 files changed, 10 insertions(+), 9 deletions(-) diff --git a/gdn-app/src/App.vue b/gdn-app/src/App.vue index 47ebf07..8d6c0ca 100644 --- a/gdn-app/src/App.vue +++ b/gdn-app/src/App.vue @@ -25,7 +25,7 @@ window.addEventListener("keypress", (ev) => { v-if="ui.anchorId" :path="new Path()" :segment="new Segment(ui.anchorId, 0)" - :forceOpen="true" + :force-open="true" /> diff --git a/gdn-app/src/components/CNavbarDropdown.vue b/gdn-app/src/components/CNavbarDropdown.vue index d14fd72..e3fd28c 100644 --- a/gdn-app/src/components/CNavbarDropdown.vue +++ b/gdn-app/src/components/CNavbarDropdown.vue @@ -69,6 +69,7 @@ function onSelectRepo(id: string) { > diff --git a/gdn-app/src/components/CNote.vue b/gdn-app/src/components/CNote.vue index 12fdce7..b85cf8b 100644 --- a/gdn-app/src/components/CNote.vue +++ b/gdn-app/src/components/CNote.vue @@ -135,7 +135,7 @@ function onCreateEditorFinish(text: string) {
-
+
{{ parent.text }}
@@ -165,7 +165,7 @@ function onCreateEditorFinish(text: string) { @@ -197,7 +197,7 @@ function onCreateEditorFinish(text: string) { :key="child.fmt()" :path="path.concat(child)" :segment="child" - :parentId="id" + :parent-id="id" />
diff --git a/gdn-app/src/lib/path.ts b/gdn-app/src/lib/path.ts index 97b903c..5033695 100644 --- a/gdn-app/src/lib/path.ts +++ b/gdn-app/src/lib/path.ts @@ -6,7 +6,7 @@ export class Segment { readonly iteration: number, ) { assert(Number.isInteger(iteration), "n must be an integer"); - assert(iteration >= 0), "n must not be negative"; + assert(iteration >= 0, "n must not be negative"); } static parse(text: string): Segment { diff --git a/gdn-app/src/stores/notes.ts b/gdn-app/src/stores/notes.ts index a9f1be2..7a9fc69 100644 --- a/gdn-app/src/stores/notes.ts +++ b/gdn-app/src/stores/notes.ts @@ -1,11 +1,11 @@ import { defineStore } from "pinia"; import { computed, ref } from "vue"; -export type Note = { +export interface Note { readonly id: string; text: string; children: string[]; -}; +} export const useNotesStore = defineStore("notes", () => { const notes = ref>(new Map()); diff --git a/gdn-app/src/stores/repos.ts b/gdn-app/src/stores/repos.ts index d59aa33..60786b1 100644 --- a/gdn-app/src/stores/repos.ts +++ b/gdn-app/src/stores/repos.ts @@ -1,10 +1,10 @@ import { defineStore } from "pinia"; import { computed, ref } from "vue"; -type Repo = { +interface Repo { id: string; name: string; -}; +} export const useReposStore = defineStore("repos", () => { const repos = ref>(new Map());