Skip to content

Commit cf32f67

Browse files
committed
Migrate to eslint 9
1 parent ae152b4 commit cf32f67

26 files changed

+1570
-2898
lines changed

.eslintignore

Lines changed: 0 additions & 4 deletions
This file was deleted.

.eslintrc.cjs

Lines changed: 0 additions & 16 deletions
This file was deleted.
File renamed without changes.

components/Header.vue renamed to components/AppHeader.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<script setup lang="ts">
2-
import type {NavItem} from '@nuxt/content/dist/runtime/types'
3-
import {NuxtImg} from "#components";
2+
import type {NavItem} from '@nuxt/content'
3+
import {NuxtImg} from '#components'
44
55
const navigation = inject<Ref<NavItem[]>>('navigation', ref([]))
66

components/ContactForm.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ const submitJsonApiKey = config.public.submitJsonApiKey
2424
const sj = new SubmitJSON({ apiKey: submitJsonApiKey, endpoint: '3blcoDHQS' })
2525
const toast = useToast()
2626
async function onSubmit (event: FormSubmitEvent<Schema>) {
27-
let toastMessage = ''
2827
try {
2928
await sj.submit(event.data)
3029
toast.add({
@@ -34,7 +33,7 @@ async function onSubmit (event: FormSubmitEvent<Schema>) {
3433
})
3534
await navigateTo({ path: '/' })
3635
}
37-
catch (error) {
36+
catch {
3837
toast.add({
3938
title: 'Oops',
4039
description: 'Sorry, your message was not successfully sent, try again or contact me by message on LinkedIn/BueSky/Mastodon.',

components/Placeholder.vue renamed to components/ImagePlaceholder.vue

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
<template>
22
<div class="bg-gray-900/5 dark:bg-white/5 ring-1 ring-inset ring-gray-900/10 dark:ring-white/10 rounded-xl lg:-m-4 p-4">
33
<div class="aspect-w-16 aspect-h-9 rounded-lg relative overflow-hidden border border-dashed border-gray-900/10 dark:border-white/10">
4-
<svg class="absolute inset-0 h-full w-full stroke-gray-900/10 dark:stroke-white/10" fill="none">
4+
<svg
5+
class="absolute inset-0 h-full w-full stroke-gray-900/10 dark:stroke-white/10"
6+
fill="none"
7+
>
58
<defs>
69
<pattern
710
id="pattern-5c1e4f0e-62d5-498b-8ff0-cf77bb448c8e"
@@ -14,7 +17,12 @@
1417
<path d="M-3 13 15-5M-5 5l18-18M-1 21 17 3" />
1518
</pattern>
1619
</defs>
17-
<rect stroke="none" fill="url(#pattern-5c1e4f0e-62d5-498b-8ff0-cf77bb448c8e)" width="100%" height="100%" />
20+
<rect
21+
stroke="none"
22+
fill="url(#pattern-5c1e4f0e-62d5-498b-8ff0-cf77bb448c8e)"
23+
width="100%"
24+
height="100%"
25+
/>
1826
</svg>
1927
</div>
2028
</div>

components/Tags.vue renamed to components/PostsTags.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ defineProps<{ tags: string[] }>()
77
<template>
88
<UDivider type="dashed" label="Tags"/>
99
<div class="flex flex-wrap w-full items-center gap-3 mt-5">
10-
<UBadge v-for="(tag, index) in tags"
10+
<UBadge
11+
v-for="(tag, index) in tags"
1112
:key="index"
1213
:ui="{base: 'text-center justify-center'}">
1314
<NuxtLink :to="`/tags/${getTagSlug(tag)}`">{{tag}}</NuxtLink>

components/content/Tweet.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@ const loaded = ref(false)
2828
const tweetNotFound = ref(false)
2929
3030
async function create(retries = 10) {
31-
// @ts-expect-error global
31+
// @ts-expect-error global external script injected
3232
if (!window.twttr?.widgets?.createTweet) {
3333
if (retries <= 0)
3434
return console.error('Failed to load Twitter widget after 10 retries.')
3535
setTimeout(() => create(retries - 1), 1000)
3636
return
3737
}
38-
// @ts-expect-error global
38+
// @ts-expect-error global external script injected
3939
const element = await window.twttr.widgets.createTweet(
4040
props.id.toString(),
4141
tweet.value,

error.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<script setup lang="ts">
22
import type { NuxtError } from '#app'
3-
import type { ParsedContent } from '@nuxt/content/dist/runtime/types'
3+
import type { ParsedContent } from '@nuxt/content/'
44
55
useSeoMeta({
66
title: 'Page not found',

eslint.config.mjs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// @ts-check
2+
import withNuxt from './.nuxt/eslint.config.mjs'
3+
export default withNuxt({
4+
rules: {
5+
'@typescript-eslint/no-explicit-any': 'off'
6+
}
7+
})

0 commit comments

Comments
 (0)