chore: formatting and housekeeping

This commit is contained in:
taskylizard 2024-08-28 11:37:06 +00:00
parent 9d6f121ba9
commit 934ebcf65a
No known key found for this signature in database
GPG key ID: 1820131ED1A24120
36 changed files with 272 additions and 499 deletions

View file

@ -1,73 +0,0 @@
{
"javascript": {
"globals": [
"Component",
"ComponentPublicInstance",
"ComputedRef",
"EffectScope",
"ExtractDefaultPropTypes",
"ExtractPropTypes",
"ExtractPublicPropTypes",
"InjectionKey",
"PropType",
"Ref",
"VNode",
"WritableComputedRef",
"computed",
"createApp",
"customRef",
"defineAsyncComponent",
"defineComponent",
"effectScope",
"getCurrentInstance",
"getCurrentScope",
"h",
"inject",
"isProxy",
"isReactive",
"isReadonly",
"isRef",
"markRaw",
"nextTick",
"onActivated",
"onBeforeMount",
"onBeforeUnmount",
"onBeforeUpdate",
"onDeactivated",
"onErrorCaptured",
"onMounted",
"onRenderTracked",
"onRenderTriggered",
"onScopeDispose",
"onServerPrefetch",
"onUnmounted",
"onUpdated",
"provide",
"reactive",
"readonly",
"ref",
"resolveComponent",
"shallowReactive",
"shallowReadonly",
"shallowRef",
"toRaw",
"toRef",
"toRefs",
"toValue",
"triggerRef",
"unref",
"useAttrs",
"useCssModule",
"useCssVars",
"useData",
"useRoute",
"useRouter",
"useSlots",
"watch",
"watchEffect",
"watchPostEffect",
"watchSyncEffect",
"withBase"
]
}
}

View file

@ -1,5 +1,6 @@
import consola from 'consola'
import UnoCSS from 'unocss/vite'
import AutoImport from 'unplugin-auto-import/vite'
import { defineConfig } from 'vitepress'
import {
commitRef,
@ -11,10 +12,9 @@ import {
} from './constants'
import { generateFeed, generateImages, generateMeta } from './hooks'
import { defs, emojiRender, movePlugin } from './markdown/emoji'
import { toggleStarredPlugin } from './markdown/toggleStarred'
import { headersPlugin } from './markdown/headers'
import { toggleStarredPlugin } from './markdown/toggleStarred'
import { transforms } from './transformer'
import AutoImport from 'unplugin-auto-import/vite'
// @unocss-include
@ -59,12 +59,12 @@ export default defineConfig({
configFile: '../unocss.config.ts'
}),
AutoImport({
dts: './.vitepress/imports.d.ts',
dts: '../.cache/imports.d.ts',
imports: ['vue', 'vitepress'],
vueTemplate: true,
biomelintrc: {
enabled: true,
filepath: './docs/.vitepress/.imports.json'
filepath: './.cache/imports.json'
}
}),
transforms(),

View file

@ -1,20 +1,22 @@
/**
* Copyright (c) taskylizard. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
* Copyright (c) taskylizard. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import type { DefaultTheme } from 'vitepress'
import { transform, transformGuide } from './transformer'
// @unocss-include
export const meta = {
@ -26,8 +28,9 @@ export const meta = {
export const commitRef =
process.env.CF_PAGES && process.env.CF_PAGES_COMMIT_SHA
? `<a href="https://github.com/fmhy/FMHYEdit/commit/${process.env.CF_PAGES_COMMIT_SHA
}">${process.env.CF_PAGES_COMMIT_SHA.slice(0, 8)}</a>`
? `<a href="https://github.com/fmhy/FMHYEdit/commit/${
process.env.CF_PAGES_COMMIT_SHA
}">${process.env.CF_PAGES_COMMIT_SHA.slice(0, 8)}</a>`
: 'dev'
export const feedback = `<a href="/feedback" class="feedback-footer">Made with ❤</a>`
@ -82,11 +85,7 @@ export const search: DefaultTheme.Config['search'] = {
combineWith: 'AND',
fuzzy: true,
// @ts-ignore
boostDocument: (
documentId,
term,
storedFields: Record<string, string | string[]>
) => {
boostDocument: (documentId, term, storedFields: Record) => {
const titles = (storedFields?.titles as string[])
.filter((t) => Boolean(t))
.map((t) => t.toLowerCase())

View file

@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import type { HeadConfig, TransformContext } from 'vitepress'
export function generateMeta(context: TransformContext, hostname: string) {

View file

@ -13,14 +13,16 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import type { ContentData, SiteConfig } from 'vitepress'
import type { SatoriOptions } from 'x-satori/vue'
import { mkdir, readFile, writeFile } from 'node:fs/promises'
import { dirname, resolve } from 'node:path'
import { fileURLToPath } from 'node:url'
import { createContentLoader } from 'vitepress'
import type { ContentData, SiteConfig } from 'vitepress'
import { type SatoriOptions, satoriVue } from 'x-satori/vue'
import { renderAsync } from '@resvg/resvg-js'
import consola from 'consola'
import { createContentLoader } from 'vitepress'
import { satoriVue } from 'x-satori/vue'
import { headers } from '../transformer/constants'
const __dirname = dirname(fileURLToPath(import.meta.url))
@ -86,14 +88,14 @@ async function generateImage({
const _page = getPage(url)
const title =
frontmatter.layout === 'home'
? frontmatter.hero.name ?? frontmatter.title
? (frontmatter.hero.name ?? frontmatter.title)
: frontmatter.title
? frontmatter.title
: _page?.title
const description =
frontmatter.layout === 'home'
? frontmatter.hero.tagline ?? frontmatter.description
? (frontmatter.hero.tagline ?? frontmatter.description)
: frontmatter.description
? frontmatter.description
: _page?.description

View file

@ -13,15 +13,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import path from 'node:path'
import type { ContentData, SiteConfig } from 'vitepress'
import { writeFileSync } from 'node:fs'
import { Feed } from 'feed'
import {
createContentLoader,
type ContentData,
type SiteConfig
} from 'vitepress'
import path from 'node:path'
import consola from 'consola'
import { Feed } from 'feed'
import { createContentLoader } from 'vitepress'
import { meta } from '../constants'
export async function generateFeed(config: SiteConfig): Promise {

View file

@ -13,10 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import type { SatoriOptions } from 'x-satori/vue'
import { readFile } from 'node:fs/promises'
import { dirname, resolve } from 'node:path'
import { fileURLToPath } from 'node:url'
import type { SatoriOptions } from 'x-satori/vue'
import { defineSatoriConfig } from 'x-satori/vue'
const __dirname = dirname(fileURLToPath(import.meta.url))

View file

@ -1,188 +0,0 @@
/**
* Copyright (c) taskylizard. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* eslint-disable */
/* prettier-ignore */
// @ts-nocheck
// noinspection JSUnusedGlobalSymbols
// Generated by unplugin-auto-import
export {}
declare global {
const EffectScope: (typeof import('vue'))['EffectScope']
const computed: (typeof import('vue'))['computed']
const createApp: (typeof import('vue'))['createApp']
const customRef: (typeof import('vue'))['customRef']
const defineAsyncComponent: (typeof import('vue'))['defineAsyncComponent']
const defineComponent: (typeof import('vue'))['defineComponent']
const effectScope: (typeof import('vue'))['effectScope']
const getCurrentInstance: (typeof import('vue'))['getCurrentInstance']
const getCurrentScope: (typeof import('vue'))['getCurrentScope']
const h: (typeof import('vue'))['h']
const inject: (typeof import('vue'))['inject']
const isProxy: (typeof import('vue'))['isProxy']
const isReactive: (typeof import('vue'))['isReactive']
const isReadonly: (typeof import('vue'))['isReadonly']
const isRef: (typeof import('vue'))['isRef']
const markRaw: (typeof import('vue'))['markRaw']
const nextTick: (typeof import('vue'))['nextTick']
const onActivated: (typeof import('vue'))['onActivated']
const onBeforeMount: (typeof import('vue'))['onBeforeMount']
const onBeforeUnmount: (typeof import('vue'))['onBeforeUnmount']
const onBeforeUpdate: (typeof import('vue'))['onBeforeUpdate']
const onDeactivated: (typeof import('vue'))['onDeactivated']
const onErrorCaptured: (typeof import('vue'))['onErrorCaptured']
const onMounted: (typeof import('vue'))['onMounted']
const onRenderTracked: (typeof import('vue'))['onRenderTracked']
const onRenderTriggered: (typeof import('vue'))['onRenderTriggered']
const onScopeDispose: (typeof import('vue'))['onScopeDispose']
const onServerPrefetch: (typeof import('vue'))['onServerPrefetch']
const onUnmounted: (typeof import('vue'))['onUnmounted']
const onUpdated: (typeof import('vue'))['onUpdated']
const provide: (typeof import('vue'))['provide']
const reactive: (typeof import('vue'))['reactive']
const readonly: (typeof import('vue'))['readonly']
const ref: (typeof import('vue'))['ref']
const resolveComponent: (typeof import('vue'))['resolveComponent']
const shallowReactive: (typeof import('vue'))['shallowReactive']
const shallowReadonly: (typeof import('vue'))['shallowReadonly']
const shallowRef: (typeof import('vue'))['shallowRef']
const toRaw: (typeof import('vue'))['toRaw']
const toRef: (typeof import('vue'))['toRef']
const toRefs: (typeof import('vue'))['toRefs']
const toValue: (typeof import('vue'))['toValue']
const triggerRef: (typeof import('vue'))['triggerRef']
const unref: (typeof import('vue'))['unref']
const useAttrs: (typeof import('vue'))['useAttrs']
const useCssModule: (typeof import('vue'))['useCssModule']
const useCssVars: (typeof import('vue'))['useCssVars']
const useData: (typeof import('vitepress'))['useData']
const useRoute: (typeof import('vitepress'))['useRoute']
const useRouter: (typeof import('vitepress'))['useRouter']
const useSlots: (typeof import('vue'))['useSlots']
const watch: (typeof import('vue'))['watch']
const watchEffect: (typeof import('vue'))['watchEffect']
const watchPostEffect: (typeof import('vue'))['watchPostEffect']
const watchSyncEffect: (typeof import('vue'))['watchSyncEffect']
const withBase: (typeof import('vitepress'))['withBase']
}
// for type re-export
declare global {
// @ts-ignore
export type {
Component,
ComponentPublicInstance,
ComputedRef,
ExtractDefaultPropTypes,
ExtractPropTypes,
ExtractPublicPropTypes,
InjectionKey,
PropType,
Ref,
VNode,
WritableComputedRef
} from 'vue'
import('vue')
}
// for vue template auto import
import { UnwrapRef } from 'vue'
declare module 'vue' {
interface GlobalComponents {}
interface ComponentCustomProperties {
readonly EffectScope: UnwrapRef<(typeof import('vue'))['EffectScope']>
readonly computed: UnwrapRef<(typeof import('vue'))['computed']>
readonly createApp: UnwrapRef<(typeof import('vue'))['createApp']>
readonly customRef: UnwrapRef<(typeof import('vue'))['customRef']>
readonly defineAsyncComponent: UnwrapRef<
(typeof import('vue'))['defineAsyncComponent']
>
readonly defineComponent: UnwrapRef<
(typeof import('vue'))['defineComponent']
>
readonly effectScope: UnwrapRef<(typeof import('vue'))['effectScope']>
readonly getCurrentInstance: UnwrapRef<
(typeof import('vue'))['getCurrentInstance']
>
readonly getCurrentScope: UnwrapRef<
(typeof import('vue'))['getCurrentScope']
>
readonly h: UnwrapRef<(typeof import('vue'))['h']>
readonly inject: UnwrapRef<(typeof import('vue'))['inject']>
readonly isProxy: UnwrapRef<(typeof import('vue'))['isProxy']>
readonly isReactive: UnwrapRef<(typeof import('vue'))['isReactive']>
readonly isReadonly: UnwrapRef<(typeof import('vue'))['isReadonly']>
readonly isRef: UnwrapRef<(typeof import('vue'))['isRef']>
readonly markRaw: UnwrapRef<(typeof import('vue'))['markRaw']>
readonly nextTick: UnwrapRef<(typeof import('vue'))['nextTick']>
readonly onActivated: UnwrapRef<(typeof import('vue'))['onActivated']>
readonly onBeforeMount: UnwrapRef<(typeof import('vue'))['onBeforeMount']>
readonly onBeforeUnmount: UnwrapRef<
(typeof import('vue'))['onBeforeUnmount']
>
readonly onBeforeUpdate: UnwrapRef<(typeof import('vue'))['onBeforeUpdate']>
readonly onDeactivated: UnwrapRef<(typeof import('vue'))['onDeactivated']>
readonly onErrorCaptured: UnwrapRef<
(typeof import('vue'))['onErrorCaptured']
>
readonly onMounted: UnwrapRef<(typeof import('vue'))['onMounted']>
readonly onRenderTracked: UnwrapRef<
(typeof import('vue'))['onRenderTracked']
>
readonly onRenderTriggered: UnwrapRef<
(typeof import('vue'))['onRenderTriggered']
>
readonly onScopeDispose: UnwrapRef<(typeof import('vue'))['onScopeDispose']>
readonly onServerPrefetch: UnwrapRef<
(typeof import('vue'))['onServerPrefetch']
>
readonly onUnmounted: UnwrapRef<(typeof import('vue'))['onUnmounted']>
readonly onUpdated: UnwrapRef<(typeof import('vue'))['onUpdated']>
readonly provide: UnwrapRef<(typeof import('vue'))['provide']>
readonly reactive: UnwrapRef<(typeof import('vue'))['reactive']>
readonly readonly: UnwrapRef<(typeof import('vue'))['readonly']>
readonly ref: UnwrapRef<(typeof import('vue'))['ref']>
readonly resolveComponent: UnwrapRef<
(typeof import('vue'))['resolveComponent']
>
readonly shallowReactive: UnwrapRef<
(typeof import('vue'))['shallowReactive']
>
readonly shallowReadonly: UnwrapRef<
(typeof import('vue'))['shallowReadonly']
>
readonly shallowRef: UnwrapRef<(typeof import('vue'))['shallowRef']>
readonly toRaw: UnwrapRef<(typeof import('vue'))['toRaw']>
readonly toRef: UnwrapRef<(typeof import('vue'))['toRef']>
readonly toRefs: UnwrapRef<(typeof import('vue'))['toRefs']>
readonly toValue: UnwrapRef<(typeof import('vue'))['toValue']>
readonly triggerRef: UnwrapRef<(typeof import('vue'))['triggerRef']>
readonly unref: UnwrapRef<(typeof import('vue'))['unref']>
readonly useAttrs: UnwrapRef<(typeof import('vue'))['useAttrs']>
readonly useCssModule: UnwrapRef<(typeof import('vue'))['useCssModule']>
readonly useCssVars: UnwrapRef<(typeof import('vue'))['useCssVars']>
readonly useData: UnwrapRef<(typeof import('vitepress'))['useData']>
readonly useRoute: UnwrapRef<(typeof import('vitepress'))['useRoute']>
readonly useRouter: UnwrapRef<(typeof import('vitepress'))['useRouter']>
readonly useSlots: UnwrapRef<(typeof import('vue'))['useSlots']>
readonly watch: UnwrapRef<(typeof import('vue'))['watch']>
readonly watchEffect: UnwrapRef<(typeof import('vue'))['watchEffect']>
readonly watchPostEffect: UnwrapRef<
(typeof import('vue'))['watchPostEffect']
>
readonly watchSyncEffect: UnwrapRef<
(typeof import('vue'))['watchSyncEffect']
>
readonly withBase: UnwrapRef<(typeof import('vitepress'))['withBase']>
}
}

View file

@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import type { MarkdownRenderer } from 'vitepress'
// FIXME: tasky: possibly write less horror jank?

View file

@ -13,8 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { icons as twemoji } from '@iconify-json/twemoji'
import type { MarkdownRenderer } from 'vitepress'
import { icons as twemoji } from '@iconify-json/twemoji'
export const defs = {
...Object.fromEntries(

View file

@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import type { MarkdownRenderer } from 'vitepress'
import { headers } from '../transformer/constants'

View file

@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import type { MarkdownRenderer } from 'vitepress'
const excluded = ['Beginners Guide']

View file

@ -1,7 +1,7 @@
<script setup lang="ts">
import DefaultTheme from 'vitepress/theme'
import Sidebar from './components/SidebarCard.vue'
import Announcement from './components/Announcement.vue'
import Sidebar from './components/SidebarCard.vue'
const { isDark } = useData()

View file

@ -1,11 +1,8 @@
<script setup lang="ts">
import { computed, ref, reactive } from 'vue'
import {
feedbackOptions,
type FeedbackType,
getFeedbackOption
} from '../../types/Feedback'
import type { FeedbackType } from '../../types/Feedback'
import { useRouter } from 'vitepress'
import { computed, reactive, ref } from 'vue'
import { feedbackOptions, getFeedbackOption } from '../../types/Feedback'
const props = defineProps<{
heading?: string

View file

@ -1,6 +1,6 @@
<script setup>
import { ref } from 'vue'
import { Switch } from '@headlessui/vue'
import { ref } from 'vue'
const enabled = ref(false)
</script>

View file

@ -1,3 +1,7 @@
import type { NProgress } from 'nprogress'
import type { EnhanceAppContext } from 'vitepress'
import nprogress from 'nprogress'
/**
* Copyright (c) taskylizard. All rights reserved.
*
@ -13,8 +17,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import nprogress, { type NProgress } from 'nprogress'
import type { EnhanceAppContext } from 'vitepress'
export function loadProgress(
router: EnhanceAppContext['router']

View file

@ -13,13 +13,16 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import type { Theme } from 'vitepress'
import DefaultTheme from 'vitepress/theme'
import { loadProgress } from './composables/nprogress'
import Layout from './Layout.vue'
import Post from './PostLayout.vue'
import { loadProgress } from './composables/nprogress'
import './style.css'
import 'uno.css'
import Feedback from './components/Feedback.vue'
export default {

View file

@ -1,3 +1,7 @@
import type { ContentData } from 'vitepress'
import { createContentLoader } from 'vitepress'
import { groupBy } from '../utils'
/**
* Copyright (c) taskylizard. All rights reserved.
*
@ -13,8 +17,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { createContentLoader, type ContentData } from 'vitepress'
import { groupBy } from '../utils'
interface Post {
title: string

View file

@ -1,22 +1,23 @@
/**
* Copyright (c) taskylizard. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { basename } from 'pathe'
* Copyright (c) taskylizard. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import type { Plugin } from 'vitepress'
import { replaceUnderscore, transformer } from './transformer/core'
import { basename } from 'pathe'
import { excluded, getHeader } from './transformer/constants'
import { replaceUnderscore, transformer } from './transformer/core'
export function transforms(): Plugin {
return {

View file

@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import consola from 'consola'
type Transform = {

View file

@ -1,18 +1,19 @@
/**
* Copyright (c) taskylizard. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
* Copyright (c) taskylizard. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import z from 'zod'
export const FeedbackSchema = z.object({

View file

@ -1,18 +1,18 @@
/**
* Copyright (c) taskylizard. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
* Copyright (c) taskylizard. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export function groupBy<T, K extends keyof any>(
arr: T[],
key: (i: T) => K
@ -20,7 +20,7 @@ export function groupBy<T, K extends keyof any>(
return arr.reduce(
(groups, item) => {
// biome-ignore lint/suspicious/noAssignInExpressions: <explanation>
; (groups[key(item)] ||= []).push(item)
;(groups[key(item)] ||= []).push(item)
return groups
},
{} as Record<K, T[]>

View file

@ -1,18 +1,18 @@
/**
* Copyright (c) taskylizard. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
* Copyright (c) taskylizard. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* eslint-disable ts/consistent-type-imports */
declare module '*.vue' {
const component: import('vue').Component