chore: lint and fmt

This commit is contained in:
Julien Calixte
2026-03-28 09:38:55 +01:00
parent 8e8706e258
commit 5f48aa5690
108 changed files with 726 additions and 680 deletions

View File

@@ -1,14 +1,14 @@
import { data } from '@/data/data'
import { DataType } from '@/data/DataType.enum'
import { Note } from '@/modules/note/models/Note'
import { useUserRepoStore } from '@/modules/repo/store/userRepo.store'
import { data } from "@/data/data"
import { DataType } from "@/data/DataType.enum"
import { Note } from "@/modules/note/models/Note"
import { useUserRepoStore } from "@/modules/repo/store/userRepo.store"
type NoteCacheResult =
| {
note: Note
from: 'sha'
from: "sha"
}
| { note: Note; from: 'path' }
| { note: Note; from: "path" }
| { note: null; from: null }
export const prepareNoteCache = (sha: string, path?: string) => {
@@ -20,7 +20,7 @@ export const prepareNoteCache = (sha: string, path?: string) => {
const note = await data.get<DataType.Note, Note>(noteId)
if (note) {
return { note, from: 'sha' }
return { note, from: "sha" }
}
if (notePath) {
@@ -33,7 +33,7 @@ export const prepareNoteCache = (sha: string, path?: string) => {
}
return {
note,
from: 'path'
from: "path"
}
}

View File

@@ -1,4 +1,5 @@
import { computed } from "vue"
import { useUserRepoStore } from "@/modules/repo/store/userRepo.store"
export const useFolderNotes = (folders: string[]) => {
@@ -8,8 +9,8 @@ export const useFolderNotes = (folders: string[]) => {
store.files.filter(
(file) =>
folders.some((folder) => file.path?.startsWith(folder)) &&
file.path?.endsWith(".md"),
),
file.path?.endsWith(".md")
)
)
const content = computed(() =>
@@ -23,10 +24,10 @@ export const useFolderNotes = (folders: string[]) => {
})`
})
.join("\n")
: "",
: ""
)
return {
content,
content
}
}

View File

@@ -6,10 +6,10 @@ export const useNotes = () => {
const store = useUserRepoStore()
const notes = computed(() =>
store.files.filter((file) => file.path?.endsWith(".md")),
store.files.filter((file) => file.path?.endsWith(".md"))
)
return {
notes,
notes
}
}

View File

@@ -1,6 +1,6 @@
import { DataType } from '@/data/DataType.enum'
import { Model } from '@/data/models/Model'
import { Backlink } from '@/modules/note/models/Backlink'
import { DataType } from "@/data/DataType.enum"
import { Model } from "@/data/models/Model"
import { Backlink } from "@/modules/note/models/Backlink"
export interface BacklinkNote extends Model<DataType.BacklinkNote> {
sha: string