Skip to content

Commit c8e1240

Browse files
committed
Fix code lint errors
1 parent e2ff791 commit c8e1240

12 files changed

Lines changed: 32 additions & 34 deletions

File tree

‎@types/astro-vtbot.d.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ declare module 'astro-vtbot' {
55
[key: string]: unknown
66
}
77

8-
const vtbot: (options?: VtbotOptions) => AstroIntegration
8+
const vtbot: (_options?: VtbotOptions) => AstroIntegration
99
export default vtbot
1010
}

‎@types/jsx.d.ts‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/// <reference types="react" />
2-
3-
// Make JSX namespace available globally for MDX compatibility
4-
// This fixes the "Cannot find namespace 'JSX'" error from @types/mdx
5-
/* eslint-disable-next-line no-restricted-imports */
2+
/**
3+
* Make JSX namespace available globally for MDX compatibility
4+
* This fixes the "Cannot find namespace 'JSX'" error from `@types/mdx`
5+
*/
66
import * as React from 'react'
77

88
declare global {

‎@types/unstorage/index.d.ts‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,34 @@
11
declare module 'unstorage' {
2-
const createStorage: any
2+
const createStorage: unknown
33
export default createStorage
44
}
55

66
declare module 'unstorage/*' {
7-
const driver: any
7+
const driver: unknown
88
export default driver
99
}
1010

1111
declare module 'unstorage/*.mjs' {
12-
const driver: any
12+
const driver: unknown
1313
export default driver
1414
}
1515

1616
declare module 'unstorage/drivers' {
17-
const driver: any
17+
const driver: unknown
1818
export default driver
1919
}
2020

2121
declare module 'unstorage/drivers/*' {
22-
const driver: any
22+
const driver: unknown
2323
export default driver
2424
}
2525

2626
declare module 'unstorage/drivers/*.mjs' {
27-
const driver: any
27+
const driver: unknown
2828
export default driver
2929
}
3030

3131
declare module 'unstorage/drivers/utils/*' {
32-
const driver: any
32+
const driver: unknown
3333
export default driver
3434
}

‎src/components/Avatar/server/avatarImports.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import type { ImageMetadata } from 'astro'
33
export type AvatarModuleMap = Record<string, ImageMetadata>
44

55
export const loadAvatarModules = (): AvatarModuleMap =>
6-
/* eslint-disable-next-line no-restricted-syntax -- rule to forbid import.meta.env is not granular enough to allow .glob */
76
import.meta.glob('../../assets/images/avatars/*.{webp,jpg,png}', {
87
eager: true,
98
import: 'default',

‎src/components/Consent/Checkbox/client/index.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export class ConsentCheckboxElement extends HTMLElement {
2020
private form: HTMLFormElement | null = null
2121
private consentUnsubscribe: (() => void) | null = null
2222
private changeHandler: (() => void) | null = null
23-
private submitHandler: ((event: SubmitEvent) => void) | null = null
23+
private submitHandler: ((_event: SubmitEvent) => void) | null = null
2424
private componentPurpose = ''
2525
private componentFormId: string | undefined
2626

‎src/components/Forms/Download/client/__tests__/selectors.spec.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const removeElementById = (root: Document | Element, id: string) => {
4141
const replaceElementWith = (
4242
root: Document | Element,
4343
id: string,
44-
createNode: (doc: Document) => HTMLElement,
44+
createNode: (_doc: Document) => HTMLElement,
4545
) => {
4646
const doc = resolveDocument(root)
4747
const original = doc.querySelector<HTMLElement>(`#${id}`)

‎src/components/Test/index.astro‎

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const { content } = Astro.props
1414
1515
// Parse and render the markdown using Astro's built-in capabilities
1616
// This ensures we're testing the actual markdown pipeline as configured
17-
const { Content } = await (async () => {
17+
const processMarkdown = async () => {
1818
// For testing, we'll use Astro's markdown rendering directly
1919
const { remark } = await import('remark')
2020
const { default: remarkGfm } = await import('remark-gfm')
@@ -47,10 +47,7 @@ const { Content } = await (async () => {
4747
4848
// Import configs
4949
const configModule = await import('../../lib/config/markdown')
50-
const { remarkAttributesConfig, remarkTocConfig, rehypeAutolinkHeadingsConfig, remarkRehypeConfig } =
51-
configModule
52-
53-
/* eslint-enable import/no-restricted-paths */
50+
const { remarkAttributesConfig, remarkTocConfig, rehypeAutolinkHeadingsConfig, remarkRehypeConfig } = configModule
5451
5552
// Process markdown through the full pipeline
5653
const processor = remark()
@@ -70,12 +67,10 @@ const { Content } = await (async () => {
7067
.use(rehypeStringify)
7168
7269
const result = await processor.process(content)
73-
const html = String(result)
74-
75-
return { Content: () => html }
76-
})()
70+
return String(result)
71+
}
7772
78-
const html = Content()
73+
const html = await processMarkdown()
7974
---
8075

8176
<article class="markdown-content" data-testid="markdown-output">

‎src/components/scripts/store/__tests__/consent.spec.ts‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ describe('Consent side effects', () => {
293293
modal.id = 'consent-modal-id'
294294
document.body.appendChild(modal)
295295

296-
let visibilityListener: ((visible: boolean) => void) | undefined
296+
let visibilityListener: ((_visible: boolean) => void) | undefined
297297
vi.spyOn($isConsentBannerVisible, 'subscribe').mockImplementation((listener) => {
298298
visibilityListener = listener
299299
return () => {}
@@ -318,7 +318,7 @@ describe('Consent side effects', () => {
318318
vi.stubGlobal('fetch', fetchSpy)
319319

320320
let consentListener:
321-
| ((state: ConsentState, oldState?: ConsentState) => Promise<void> | void)
321+
| ((_state: ConsentState, _oldState?: ConsentState) => Promise<void> | void)
322322
| undefined
323323
vi.spyOn($consent, 'subscribe').mockImplementation((listener) => {
324324
consentListener = listener
@@ -362,7 +362,7 @@ describe('Consent side effects', () => {
362362
})
363363

364364
it('deletes the data subject id when functional consent is revoked', () => {
365-
let functionalListener: ((hasConsent: boolean) => void) | undefined
365+
let functionalListener: ((_hasConsent: boolean) => void) | undefined
366366
vi.spyOn($hasFunctionalConsent, 'subscribe').mockImplementation((listener) => {
367367
functionalListener = listener
368368
return () => {}
@@ -383,7 +383,7 @@ describe('Consent side effects', () => {
383383
})
384384

385385
it('updates the Sentry consent context when analytics consent changes', async () => {
386-
let analyticsListener: ((hasConsent: boolean) => void) | undefined
386+
let analyticsListener: ((_hasConsent: boolean) => void) | undefined
387387
vi.spyOn($hasAnalyticsConsent, 'subscribe').mockImplementation((listener) => {
388388
analyticsListener = listener
389389
return () => {}

‎src/components/scripts/store/__tests__/socialEmbeds.spec.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,10 @@ describe('Embed Cache Management', () => {
107107

108108
it('should expose cache state getters and setters', () => {
109109
const state = {
110+
/* eslint-disable camelcase */
110111
entry_a: { data: { html: 'A' }, timestamp: 0, ttl: 1000 },
111112
entry_b: { data: { html: 'B' }, timestamp: 0, ttl: 1000 },
113+
/* eslint-enable camelcase */
112114
}
113115

114116
setEmbedCacheState(state)

‎src/components/scripts/store/__tests__/themes.spec.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ describe('themeKeyChangeSideEffectsListener', () => {
194194
document.head.appendChild(meta)
195195
;(window as ThemeTestWindow).metaColors = { dark: '#000000' }
196196

197-
let listener: ((themeId: ThemeId) => void) | undefined
197+
let listener: ((_themeId: ThemeId) => void) | undefined
198198
const listenSpy = vi
199199
.spyOn($theme, 'listen')
200200
.mockImplementation((callback: (themeId: ThemeId) => void) => {

0 commit comments

Comments
 (0)