chore: update lint

This commit is contained in:
Anthony Fu 2023-03-19 13:12:20 +01:00
parent c7558ee7c5
commit 9465c2fe89
20 changed files with 164 additions and 124 deletions

View file

@ -187,7 +187,6 @@ onDeactivated(cancelEdit)
</CommonTooltip>
<CommonTooltip :content="$t('list.delete')" no-auto-focus>
<button
ref="delete"
type="button"
text-sm p2 border-1 transition-colors
border-dark hover:text-primary

View file

@ -63,7 +63,7 @@ const { isSwiping, lengthX, lengthY, direction } = useSwipe(target, {
})
useGesture({
onPinch({ offset: [distance, angle] }) {
onPinch({ offset: [distance, _angle] }) {
set({ scale: Math.max(0.5, 1 + distance / 200) })
},
onMove({ movement: [x, y], dragging, pinching }) {

View file

@ -6,7 +6,6 @@ const { busy, oauth, singleInstanceServer } = useSignIn()
<VDropdown v-if="isHydrated && currentUser" sm:hidden>
<div style="-webkit-touch-callout: none;">
<AccountAvatar
ref="avatar"
:account="currentUser.account"
h-8
w-8
@ -16,7 +15,7 @@ const { busy, oauth, singleInstanceServer } = useSignIn()
</div>
<template #popper="{ hide }">
<UserSwitcher ref="switcher" @click="hide()" />
<UserSwitcher @click="hide()" />
</template>
</VDropdown>
<template v-else>

View file

@ -8,7 +8,7 @@ const { items } = defineProps<{
const count = $computed(() => items.items.length)
const isExpanded = ref(false)
const lang = $computed(() => {
return count > 1 || count === 0 ? undefined : items.items[0].status?.language
return (count > 1 || count === 0) ? undefined : items.items[0].status?.language
})
</script>

View file

@ -88,7 +88,11 @@ function groupItems(items: mastodon.v1.Notification[]): NotificationSlot[] {
}
like[notification.type === 'reblog' ? 'reblog' : 'favourite'] = notification
}
likes.sort((a, b) => a.reblog ? !b.reblog || (a.favourite && !b.favourite) ? -1 : 0 : 0)
likes.sort((a, b) => a.reblog
? (!b.reblog || (a.favourite && !b.favourite))
? -1
: 0
: 0)
results.push({
id: `grouped-${id++}`,
type: 'grouped-reblogs-and-favourites',

View file

@ -48,7 +48,7 @@ const saveSettings = async () => {
animateSave = true
try {
const subscription = await updateSubscription()
await updateSubscription()
}
catch (err) {
// todo: handle error

View file

@ -1,5 +1,5 @@
<script setup lang="ts">
const props = defineProps<{
defineProps<{
max: number
length: number
}>()

View file

@ -81,7 +81,7 @@ const characterCount = $computed(() => {
for (const [fullMatch] of text.matchAll(linkRegex))
length -= fullMatch.length - Math.min(maxLength, fullMatch.length)
for (const [fullMatch, before, handle, username] of text.matchAll(countableMentionRegex))
for (const [fullMatch, before, _handle, username] of text.matchAll(countableMentionRegex))
length -= fullMatch.length - (before + username).length - 1 // - 1 for the @
if (draft.mentions) {

View file

@ -10,8 +10,6 @@ const props = withDefaults(defineProps<{
actions: true,
})
const userSettings = useUserSettings()
const status = $computed(() => {
if (props.status.reblog && props.status.reblog)
return props.status.reblog
@ -25,8 +23,6 @@ const { t } = useI18n()
useHeadFixed({
title: () => `${getDisplayName(status.account)} ${t('common.in')} ${t('app_name')}: "${removeHTMLTags(status.content) || ''}"`,
})
const isDM = $computed(() => status.visibility === 'direct')
</script>
<template>

View file

@ -6,7 +6,7 @@ const emit = defineEmits<{
}>()
const all = useUsers()
const { busy, singleInstanceServer, oauth } = useSignIn()
const { singleInstanceServer, oauth } = useSignIn()
const sorted = computed(() => {
return [