chore(deps): update lint (#2233)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Anthony Fu <anthonyfu117@hotmail.com>
This commit is contained in:
parent
603e10b6ca
commit
67d5d5c00a
@ -13,6 +13,7 @@
|
||||
"vue/no-restricted-syntax":["error", {
|
||||
"selector": "VElement[name='a']",
|
||||
"message": "Use NuxtLink instead."
|
||||
}]
|
||||
}],
|
||||
"n/prefer-global/process": "off"
|
||||
}
|
||||
}
|
||||
|
@ -39,7 +39,7 @@ defineSlots<{
|
||||
number: number
|
||||
update: () => void
|
||||
}) => void
|
||||
loading: (props: {}) => void
|
||||
loading: (props: object) => void
|
||||
done: (props: { items: U[] }) => void
|
||||
}>()
|
||||
|
||||
|
@ -10,8 +10,8 @@ const props = withDefaults(defineProps<{
|
||||
})
|
||||
|
||||
defineSlots<{
|
||||
icon: (props: {}) => void
|
||||
default: (props: {}) => void
|
||||
icon: (props: object) => void
|
||||
default: (props: object) => void
|
||||
}>()
|
||||
|
||||
const router = useRouter()
|
||||
|
@ -10,7 +10,7 @@ defineProps<{
|
||||
defineEmits(['hide', 'subscribe'])
|
||||
|
||||
defineSlots<{
|
||||
error: (props: {}) => void
|
||||
error: (props: object) => void
|
||||
}>()
|
||||
|
||||
const xl = useMediaQuery('(min-width: 1280px)')
|
||||
|
@ -4,7 +4,7 @@ import type { FontSize } from '~/composables/settings'
|
||||
|
||||
const userSettings = useUserSettings()
|
||||
|
||||
const sizes = (new Array(11)).fill(0).map((x, i) => `${10 + i}px`) as FontSize[]
|
||||
const sizes = (Array.from({ length: 11 })).fill(0).map((x, i) => `${10 + i}px`) as FontSize[]
|
||||
|
||||
function setFontSize(e: Event) {
|
||||
if (e.target && 'valueAsNumber' in e.target)
|
||||
|
@ -18,7 +18,7 @@ const { as = 'button', command, disabled, content, icon } = defineProps<{
|
||||
}>()
|
||||
|
||||
defineSlots<{
|
||||
text: (props: {}) => void
|
||||
text: (props: object) => void
|
||||
}>()
|
||||
|
||||
const el = ref<HTMLDivElement>()
|
||||
|
@ -1,13 +1,14 @@
|
||||
<script setup lang="ts">
|
||||
import { getEmojiMatchesInText } from '@iconify/utils/lib/emoji/replace/find'
|
||||
import CommonScrollIntoView from '../common/CommonScrollIntoView.vue'
|
||||
import type { CustomEmoji, Emoji } from '~~/composables/tiptap/suggestion'
|
||||
import { isCustomEmoji } from '~~/composables/tiptap/suggestion'
|
||||
import type { CustomEmoji, Emoji } from '~/composables/tiptap/suggestion'
|
||||
import { isCustomEmoji } from '~/composables/tiptap/suggestion'
|
||||
import { emojiFilename, emojiPrefix, emojiRegEx } from '~~/config/emojis'
|
||||
import type { CommandHandler } from '~/composables/command'
|
||||
|
||||
const { items, command } = defineProps<{
|
||||
items: (CustomEmoji | Emoji)[]
|
||||
command: Function
|
||||
command: CommandHandler<any>
|
||||
isPending?: boolean
|
||||
}>()
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
<script setup lang="ts">
|
||||
import type { mastodon } from 'masto'
|
||||
import CommonScrollIntoView from '../common/CommonScrollIntoView.vue'
|
||||
import type { CommandHandler } from '~/composables/command'
|
||||
|
||||
const { items, command } = defineProps<{
|
||||
items: mastodon.v1.Tag[]
|
||||
command: Function
|
||||
command: CommandHandler<{ id: string }>
|
||||
isPending?: boolean
|
||||
}>()
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
<script setup lang="ts">
|
||||
import type { mastodon } from 'masto'
|
||||
import CommonScrollIntoView from '../common/CommonScrollIntoView.vue'
|
||||
import type { CommandHandler } from '~/composables/command'
|
||||
|
||||
const { items, command } = defineProps<{
|
||||
items: mastodon.v1.Account[]
|
||||
command: Function
|
||||
command: CommandHandler<{ id: string }>
|
||||
isPending?: boolean
|
||||
}>()
|
||||
|
||||
|
@ -52,6 +52,9 @@ export type ResolvedCommand = Exclude<CommandProvider, 'icon' | 'name' | 'descri
|
||||
bindings: string[] | undefined
|
||||
}
|
||||
|
||||
// TODO: define a type for command arg
|
||||
export type CommandHandler<T = void> = (arg: T) => void
|
||||
|
||||
export interface BaseQueryResultItem {
|
||||
index: number
|
||||
type: string
|
||||
@ -78,7 +81,7 @@ export interface QueryResult {
|
||||
grouped: Map<CommandScopeNames, QueryResultItem[]>
|
||||
}
|
||||
|
||||
function r<T extends Object | undefined>(i: T | (() => T)): T {
|
||||
function resolveFunction<T>(i: T): T extends () => infer R ? R : T {
|
||||
return typeof i === 'function' ? i() : i
|
||||
}
|
||||
|
||||
@ -90,10 +93,10 @@ export const useCommandRegistry = defineStore('command', () => {
|
||||
.filter(command => command.visible ? command.visible() : true)
|
||||
.map(provider => ({
|
||||
...provider,
|
||||
icon: r(provider.icon),
|
||||
name: r(provider.name),
|
||||
description: r(provider.description),
|
||||
bindings: r(provider.bindings),
|
||||
icon: resolveFunction(provider.icon),
|
||||
name: resolveFunction(provider.name),
|
||||
description: resolveFunction(provider.description),
|
||||
bindings: resolveFunction(provider.bindings),
|
||||
})))
|
||||
|
||||
let lastScope = ''
|
||||
|
@ -33,7 +33,7 @@ export function useIsMac() {
|
||||
?? navigator?.platform?.includes('Mac') ?? false)
|
||||
}
|
||||
|
||||
export function isEmptyObject(object: Object) {
|
||||
export function isEmptyObject(object: object) {
|
||||
return Object.keys(object).length === 0
|
||||
}
|
||||
|
||||
|
@ -27,7 +27,7 @@ export function useDeactivated() {
|
||||
*
|
||||
* for handling problems caused by the keepalive function
|
||||
*/
|
||||
export function onReactivated(hook: Function, target?: ComponentInternalInstance | null): void {
|
||||
export function onReactivated(hook: () => void, target?: ComponentInternalInstance | null): void {
|
||||
const initial = ref(true)
|
||||
onActivated(() => {
|
||||
if (initial.value)
|
||||
|
@ -103,7 +103,7 @@
|
||||
"workbox-window": "^7.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@antfu/eslint-config": "^0.39.6",
|
||||
"@antfu/eslint-config": "^0.40.0",
|
||||
"@antfu/ni": "^0.21.5",
|
||||
"@types/chroma-js": "^2.4.0",
|
||||
"@types/file-saver": "^2.0.5",
|
||||
@ -116,7 +116,7 @@
|
||||
"@unlazy/nuxt": "^0.9.2",
|
||||
"bumpp": "^9.1.1",
|
||||
"consola": "^3.2.3",
|
||||
"eslint": "^8.44.0",
|
||||
"eslint": "^8.46.0",
|
||||
"flat": "^5.0.2",
|
||||
"fs-extra": "^11.1.1",
|
||||
"lint-staged": "^13.2.3",
|
||||
|
565
pnpm-lock.yaml
565
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,5 @@
|
||||
import { rm, writeFile } from 'node:fs/promises'
|
||||
import process from 'node:process'
|
||||
import { resolve } from 'pathe'
|
||||
import type { PngOptions, ResizeOptions } from 'sharp'
|
||||
import sharp from 'sharp'
|
||||
|
@ -1,3 +1,4 @@
|
||||
import process from 'node:process'
|
||||
import fs from 'fs-extra'
|
||||
import { emojiPrefix, iconifyEmojiPackage } from '../config/emojis'
|
||||
import { colorsMap } from './generate-themes'
|
||||
|
@ -1,7 +1,7 @@
|
||||
/// <reference lib="WebWorker" />
|
||||
declare const self: ServiceWorkerGlobalScope
|
||||
|
||||
const clientResolves: { [key: string]: Function } = {}
|
||||
const clientResolves: { [key: string]: () => void } = {}
|
||||
|
||||
self.addEventListener('message', (event) => {
|
||||
if (event.data.action !== 'ready-to-receive')
|
||||
|
@ -1,3 +1,4 @@
|
||||
import process from 'node:process'
|
||||
import type { Variant } from 'unocss'
|
||||
import {
|
||||
defineConfig,
|
||||
|
Loading…
Reference in New Issue
Block a user