Skip to content

Commit 34e9077

Browse files
committed
chore: suppress dev-time console.log lint warnings
1 parent a8eff2c commit 34e9077

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

server/api/registry/docs/[...pkg].get.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ export default defineCachedEventHandler(
2929
try {
3030
generated = await generateDocsWithDeno(packageName, version)
3131
} catch (error) {
32+
// eslint-disable-next-line no-console
3233
console.error(`Doc generation failed for ${packageName}@${version}:`, error)
3334
return {
3435
package: packageName,

server/plugins/fetch-cache.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ export default defineNitroPlugin(nitroApp => {
8585
// Storage read failed (e.g., ENOENT on misconfigured storage)
8686
// Log and continue without cache
8787
if (import.meta.dev) {
88+
// eslint-disable-next-line no-console
8889
console.warn(`[fetch-cache] Storage read failed for ${url}:`, error)
8990
}
9091
}
@@ -93,13 +94,15 @@ export default defineNitroPlugin(nitroApp => {
9394
if (!isCacheEntryStale(cached)) {
9495
// Cache hit, data is fresh
9596
if (import.meta.dev) {
97+
// eslint-disable-next-line no-console
9698
console.log(`[fetch-cache] HIT (fresh): ${url}`)
9799
}
98100
return cached.data
99101
}
100102

101103
// Cache hit but stale - return stale data and revalidate in background
102104
if (import.meta.dev) {
105+
// eslint-disable-next-line no-console
103106
console.log(`[fetch-cache] HIT (stale, revalidating): ${url}`)
104107
}
105108

@@ -116,10 +119,12 @@ export default defineNitroPlugin(nitroApp => {
116119
}
117120
await storage.setItem(cacheKey, entry)
118121
if (import.meta.dev) {
122+
// eslint-disable-next-line no-console
119123
console.log(`[fetch-cache] Revalidated: ${url}`)
120124
}
121125
} catch (error) {
122126
if (import.meta.dev) {
127+
// eslint-disable-next-line no-console
123128
console.warn(`[fetch-cache] Revalidation failed: ${url}`, error)
124129
}
125130
}
@@ -131,6 +136,7 @@ export default defineNitroPlugin(nitroApp => {
131136

132137
// Cache miss - fetch and cache
133138
if (import.meta.dev) {
139+
// eslint-disable-next-line no-console
134140
console.log(`[fetch-cache] MISS: ${url}`)
135141
}
136142

@@ -149,6 +155,7 @@ export default defineNitroPlugin(nitroApp => {
149155
} catch (error) {
150156
// Storage write failed - log but don't fail the request
151157
if (import.meta.dev) {
158+
// eslint-disable-next-line no-console
152159
console.warn(`[fetch-cache] Storage write failed for ${url}:`, error)
153160
}
154161
}

0 commit comments

Comments
 (0)