chore: add prettier linter

This commit is contained in:
AnotiaWang
2025-02-28 16:20:15 +08:00
parent c45d75fad2
commit 3eb93e034a
5 changed files with 23 additions and 6 deletions
+3 -1
View File
@@ -44,7 +44,9 @@ until modelValue's length > 0 -->
</div>
</template>
<template #content="{ item }">
<p class="text-sm text-gray-500 dark:text-gray-400 whitespace-pre-wrap mb-4">
<p
class="text-sm text-gray-500 dark:text-gray-400 whitespace-pre-wrap mb-4"
>
{{ item.content }}
</p>
</template>
+2 -2
View File
@@ -31,8 +31,8 @@ export const useWebSearch = (): WebSearchFunction => {
const results = await fc.search(q, {
...o,
scrapeOptions: {
formats: ['markdown']
}
formats: ['markdown'], // TODO: verify if this actually works
},
})
if (results.error) {
throw new Error(results.error)
+5 -2
View File
@@ -9,7 +9,9 @@
"generate": "nuxt generate",
"generate:optimize": "node scripts/build.js --generate",
"preview": "nuxt preview",
"postinstall": "nuxt prepare"
"postinstall": "nuxt prepare",
"format": "prettier --write app server utils lib",
"lint": "prettier --check app server utils lib"
},
"dependencies": {
"@ai-sdk/deepseek": "^0.1.10",
@@ -45,6 +47,7 @@
},
"devDependencies": {
"@vueuse/core": "^12.7.0",
"@vueuse/nuxt": "^12.7.0"
"@vueuse/nuxt": "^12.7.0",
"prettier": "^3.5.2"
}
}
+10
View File
@@ -105,6 +105,9 @@ importers:
'@vueuse/nuxt':
specifier: ^12.7.0
version: 12.7.0([email protected])([email protected](@parcel/[email protected])(@types/[email protected])([email protected])([email protected]([email protected]))([email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected]))([email protected]))([email protected])
prettier:
specifier: ^3.5.2
version: 3.5.2
packages:
@@ -3388,6 +3391,11 @@ packages:
resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==}
engines: {node: '>= 0.8.0'}
[email protected]:
resolution: {integrity: sha512-lc6npv5PH7hVqozBR7lkBNOGXV9vMwROAPlumdBkX0wTbbzPu/U1hk5yL8p2pt4Xoc+2mkT8t/sow2YrV/M5qg==}
engines: {node: '>=14'}
hasBin: true
[email protected]:
resolution: {integrity: sha512-mQUvGU6aUFQ+rNvTIAcZuWGRT9a6f6Yrg9bHs4ImKF+HZCEK+plBvnAZYSIQztknZF2qnzNtr6F8s0+IuptdlQ==}
engines: {node: ^14.13.1 || >=16.0.0}
@@ -8145,6 +8153,8 @@ snapshots:
[email protected]: {}
[email protected]: {}
[email protected]: {}
[email protected]: {}
+3 -1
View File
@@ -76,7 +76,9 @@ export async function* parseStreamingJson<T extends z.ZodType>(
// If the last chunk parses failed, return an error
if (!isParseSuccessful) {
console.warn(`[parseStreamingJson] Failed to parse JSON: ${removeJsonMarkdown(rawText)}`)
console.warn(
`[parseStreamingJson] Failed to parse JSON: ${removeJsonMarkdown(rawText)}`,
)
yield {
type: 'bad-end',
rawText,