Lint: fix all ESLint errors (391 -> 0), lint and typecheck tests
Mostly perfectionist import/key sorting and curly braces from --fix, plus: - spread instead of .apply() in the Meta Pixel stub - non-capturing group in the locale-code pattern - React 19 use(Context) / <Context value> in TurnstileProvider - email regex rewritten without super-linear backtracking (covered by a test) - console.warn/error allowed (deliberate server diagnostics) - test/tsconfig.json so the project service and tsc see test files Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
@@ -22,7 +22,7 @@ export function loadMetaPixel(id: string): void {
|
||||
if (w.fbq) {return}
|
||||
const n: any = (w.fbq = function (...args: unknown[]) {
|
||||
if (n.callMethod) {
|
||||
n.callMethod.apply(n, args)
|
||||
n.callMethod(...args)
|
||||
} else {
|
||||
n.queue.push(args)
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
* gates the tag in GTM (ad_storage) — this only emits the event.
|
||||
*/
|
||||
export function pushDataLayer(event: string, params: Record<string, unknown> = {}): void {
|
||||
if (typeof window === 'undefined') return
|
||||
if (typeof window === 'undefined') {return}
|
||||
const w = window as unknown as { dataLayer?: unknown[] }
|
||||
w.dataLayer = w.dataLayer || []
|
||||
w.dataLayer.push({ event, ...params })
|
||||
|
||||
Reference in New Issue
Block a user