autoimport with eslint now
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
import { useAsyncState } from '@vueuse/core'
|
||||
import { ComputedRef, onUnmounted, toValue } from 'vue'
|
||||
|
||||
import { backlinkEventBus } from '@/bus/backlinkEventBus'
|
||||
import { data } from '@/data/data'
|
||||
import { DataType } from '@/data/DataType.enum'
|
||||
import { BacklinkNote } from '@/modules/note/models/BacklinkNote'
|
||||
import { useAsyncState } from '@vueuse/core'
|
||||
import { ComputedRef, onUnmounted, toValue } from 'vue'
|
||||
|
||||
export const useBacklinks = (sha: string | ComputedRef<string>) => {
|
||||
sha = toValue(sha)
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import { watch } from 'vue'
|
||||
|
||||
import { backlinkEventBus } from '@/bus/backlinkEventBus'
|
||||
import { data } from '@/data/data'
|
||||
import { DataType } from '@/data/DataType.enum'
|
||||
@@ -9,7 +11,6 @@ import { useUserRepoStore } from '@/modules/repo/store/userRepo.store'
|
||||
import { isExternalLink } from '@/utils/link'
|
||||
import { filenameToNoteTitle } from '@/utils/noteTitle'
|
||||
import { confirmMessage } from '@/utils/notif'
|
||||
import { watch } from 'vue'
|
||||
|
||||
const isMarkdown = (filename?: string) => filename?.endsWith('.md') ?? false
|
||||
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import { Ref, ref, toValue } from 'vue'
|
||||
|
||||
import { useMarkdown } from '@/hooks/useMarkdown.hook'
|
||||
import { prepareNoteCache } from '@/modules/note/cache/prepareNoteCache'
|
||||
import { getFileContent } from '@/modules/repo/services/repo'
|
||||
import { useUserRepoStore } from '@/modules/repo/store/userRepo.store'
|
||||
import { Ref, ref, toValue } from 'vue'
|
||||
|
||||
export const useFile = (sha: Ref<string> | string, retrieveContent = true) => {
|
||||
const { render } = useMarkdown(toValue(sha))
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { computed, ref } from 'vue'
|
||||
|
||||
import { confirmMessage } from '@/utils/notif'
|
||||
import { getAccessToken, saveAccessToken } from '@/modules/user/service/signIn'
|
||||
import { GithubToken } from '@/modules/user/interfaces/GithubToken'
|
||||
import { getAccessToken, saveAccessToken } from '@/modules/user/service/signIn'
|
||||
import { confirmMessage } from '@/utils/notif'
|
||||
|
||||
const username = ref<string | null>(null)
|
||||
const accessToken = ref<string | null>(null)
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import { computed, watch } from 'vue'
|
||||
|
||||
import { useFile } from '@/hooks/useFile.hook'
|
||||
import { resolvePath } from '@/modules/repo/services/resolvePath'
|
||||
import { useUserRepoStore } from '@/modules/repo/store/userRepo.store'
|
||||
import { computed, watch } from 'vue'
|
||||
|
||||
const SRC_PREFIX = 'data:image/jpeg;charset=utf-8;base64,'
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import { ComputedRef, onUnmounted, Ref, toValue } from 'vue'
|
||||
|
||||
import { noteEventBus } from '@/bus/noteEventBus'
|
||||
import { useUserRepoStore } from '@/modules/repo/store/userRepo.store'
|
||||
import { isExternalLink } from '@/utils/link'
|
||||
import { ComputedRef, onUnmounted, Ref, toValue } from 'vue'
|
||||
|
||||
export const useLinks = (
|
||||
className: ComputedRef<string> | string,
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
import { decodeBase64ToUTF8 } from '@/utils/decodeBase64ToUTF8'
|
||||
import { html5Media } from '@/utils/markdown/markdown-html5-media'
|
||||
import { twitterPlugin } from '@/utils/markdown/markdown-it-twitter'
|
||||
import markdownItClass from '@toycode/markdown-it-class'
|
||||
import MarkdownIt from 'markdown-it'
|
||||
import blockEmbedPlugin from 'markdown-it-block-embed'
|
||||
@@ -10,6 +7,10 @@ import markdownItIframe from 'markdown-it-iframe'
|
||||
import markdownItLatex from 'markdown-it-latex'
|
||||
import { Ref, toValue } from 'vue'
|
||||
|
||||
import { decodeBase64ToUTF8 } from '@/utils/decodeBase64ToUTF8'
|
||||
import { html5Media } from '@/utils/markdown/markdown-html5-media'
|
||||
import { twitterPlugin } from '@/utils/markdown/markdown-it-twitter'
|
||||
|
||||
const md = new MarkdownIt({
|
||||
typographer: true,
|
||||
quotes: ['«\xA0', '\xA0»', '‹\xA0', '\xA0›']
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import { computed, onMounted, onUnmounted, watch } from 'vue'
|
||||
|
||||
import { noteEventBus } from '@/bus/noteEventBus'
|
||||
import { NOTE_WIDTH } from '@/constants/note-width'
|
||||
import { useOverlay } from '@/hooks/useOverlay.hook'
|
||||
@@ -5,7 +7,6 @@ import { useQueryStackedNotes } from '@/hooks/useQueryStackedNotes.hook'
|
||||
import { resolvePath } from '@/modules/repo/services/resolvePath'
|
||||
import { useUserRepoStore } from '@/modules/repo/store/userRepo.store'
|
||||
import { pathToNotePathTitle } from '@/utils/noteTitle'
|
||||
import { computed, onMounted, onUnmounted, watch } from 'vue'
|
||||
|
||||
export const useNote = (containerClass: string) => {
|
||||
const store = useUserRepoStore()
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import { computed, onMounted, Ref, ref, toValue } from 'vue'
|
||||
|
||||
import { NOTE_WIDTH } from '@/constants/note-width'
|
||||
import { useOverlay } from '@/hooks/useOverlay.hook'
|
||||
import { useQueryStackedNotes } from '@/hooks/useQueryStackedNotes.hook'
|
||||
import { computed, onMounted, Ref, ref, toValue } from 'vue'
|
||||
|
||||
const BOOKMARK_WIDTH = 2
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { computed, ref } from 'vue'
|
||||
import { useEventListener, useWindowSize } from '@vueuse/core'
|
||||
import { computed, ref } from 'vue'
|
||||
|
||||
import { MOBILE_BREAKPOINT } from '@/constants/mobile'
|
||||
|
||||
export const useOverlay = (listen = true) => {
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { NOTE_WIDTH } from '@/constants/note-width'
|
||||
import { useOverlay } from '@/hooks/useOverlay.hook'
|
||||
import { useUserRepoStore } from '@/modules/repo/store/userRepo.store'
|
||||
import { useWindowSize } from '@vueuse/core'
|
||||
import { nextTick, readonly, ref } from 'vue'
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
|
||||
import { NOTE_WIDTH } from '@/constants/note-width'
|
||||
import { useOverlay } from '@/hooks/useOverlay.hook'
|
||||
import { useUserRepoStore } from '@/modules/repo/store/userRepo.store'
|
||||
|
||||
const stackedNotes = ref<string[]>([])
|
||||
|
||||
let initial = true
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { RepoBase } from '@/modules/repo/interfaces/RepoBase'
|
||||
import { useAsyncState } from '@vueuse/core'
|
||||
|
||||
import { useGitHubLogin } from '@/hooks/useGitHubLogin.hook'
|
||||
import { RepoBase } from '@/modules/repo/interfaces/RepoBase'
|
||||
import { getOctokit } from '@/modules/repo/services/octo'
|
||||
|
||||
export const useRepos = () => {
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import { useTitle } from '@vueuse/core'
|
||||
import { computed, Ref, toValue, watch } from 'vue'
|
||||
|
||||
import { useQueryStackedNotes } from '@/hooks/useQueryStackedNotes.hook'
|
||||
import { useNotes } from '@/modules/note/hooks/useNotes'
|
||||
import { pathToNoteTitle } from '@/utils/noteTitle'
|
||||
import { useTitle } from '@vueuse/core'
|
||||
import { computed, Ref, toValue, watch } from 'vue'
|
||||
|
||||
export const generateTitle = (titles: string[]) => titles.join(' | ')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user