Skip to content

Commit cd2c762

Browse files
committed
Lint fix
1 parent 3a85ead commit cd2c762

6 files changed

Lines changed: 9 additions & 23 deletions

File tree

src/actions/newsletter/action.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,12 @@ const getEmailDomain = (email: string): string | undefined => {
4949

5050
const buildSubscribeErrorExtra = (options: {
5151
body: z.infer<typeof subscribeSchema>
52-
fingerprint?: string
52+
fingerprint: string | undefined
5353
consentFunctional: boolean
5454
stage: NewsletterSubscribeStage
5555
userAgent: string
56-
clientAddress?: string
57-
rateLimitIdentifier?: string
56+
clientAddress: string | undefined
57+
rateLimitIdentifier: string | undefined
5858
subjectIdSource: 'generated' | 'provided' | 'pending'
5959
}): Record<string, unknown> => {
6060
return {

src/components/CallToAction/Newsletter/client/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ export class NewsletterFormElement extends LitElement {
270270
consentGiven,
271271
...(DataSubjectId ? { DataSubjectId } : {}),
272272
})
273-
} catch (error) {
273+
} catch {
274274
this.showMessage('Network error. Please check your connection and try again.', 'error')
275275
return
276276
} finally {

src/components/Pages/Downloads/client/__tests__/selectors.spec.ts

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@ import { describe, expect, it } from 'vitest'
22
import { TestError } from '@test/errors'
33
import {
44
getDownloadButtonWrapper,
5-
getDownloadCompanyNameInput,
65
getDownloadFirstNameInput,
76
getDownloadFormElement,
8-
getDownloadJobTitleInput,
97
getDownloadLastNameInput,
108
getDownloadStatusDiv,
119
getDownloadSubmitButton,
@@ -177,18 +175,6 @@ const inputSelectorCases = [
177175
id: 'workEmail',
178176
errorMessage: 'Work email input not found',
179177
},
180-
{
181-
name: 'job title',
182-
selector: getDownloadJobTitleInput,
183-
id: 'jobTitle',
184-
errorMessage: 'Job title input not found',
185-
},
186-
{
187-
name: 'company name',
188-
selector: getDownloadCompanyNameInput,
189-
id: 'companyName',
190-
errorMessage: 'Company name input not found',
191-
},
192178
]
193179

194180
describe.each(inputSelectorCases)('$name selector', ({ selector, id, errorMessage }) => {

src/components/Pages/Downloads/client/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,8 @@ export class DownloadFormElement extends LitElement {
121121
firstName: String(formData.get('firstName') ?? ''),
122122
lastName: String(formData.get('lastName') ?? ''),
123123
workEmail: String(formData.get('workEmail') ?? ''),
124-
...(jobTitle && { jobTitle }),
125-
...(companyName && { companyName }),
124+
jobTitle: jobTitle || undefined,
125+
companyName: companyName || undefined,
126126
consent,
127127
DataSubjectId,
128128
} satisfies DownloadsSubmitInput

src/components/scripts/sentry/helpers.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ const isHandledConsentLogRetryError = (event: Parameters<BeforeSendHandler>[0]):
7171
const tags = event.tags ?? {}
7272

7373
return (
74-
tags.scriptName === 'cookieConsent' &&
75-
tags.operation === 'logConsentToAPI' &&
74+
tags['scriptName'] === 'cookieConsent' &&
75+
tags['operation'] === 'logConsentToAPI' &&
7676
typeof errorMessage === 'string' &&
7777
/try again in\s+\d+s/i.test(errorMessage)
7878
)

src/components/scripts/store/consent.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ export function initConsentSideEffects(): void {
387387
let hasConsentLoggingFailure = false
388388
let isConsentLogProcessing = false
389389
let onlineListener: (() => void) | null = null
390-
let consentLogTimerId: ReturnType<typeof setTimeout> | null = null
390+
let consentLogTimerId: number | null = null
391391

392392
const isNavigatorOnline = () => typeof navigator === 'undefined' || navigator.onLine !== false
393393

0 commit comments

Comments
 (0)