fix(typescript): resolve production build errors and add ESLint ignore comments

- Fix TypeScript compilation errors in deepLinks service by replacing logConsoleAndDb with logger.error
- Add ESLint disable comments for necessary 'any' type usage in worker polyfills and Vue mixins
- Add ESLint disable comments for console statements in test files and debugging code
- Production build now succeeds with npm run build:web:prod
- TypeScript compilation passes with npm run type-check

The deepLinks service was using undefined logConsoleAndDb function causing build failures.
Worker context polyfills and Vue mixin complexity require 'any' type usage in specific cases.
Console statements in test files and debugging code are intentionally used for development.
This commit is contained in:
Matthew Raymer
2025-08-12 09:12:46 +00:00
parent 2afe61d752
commit 8c0b547855
4 changed files with 13 additions and 6 deletions

View File

@@ -53,6 +53,7 @@ import {
DeepLinkRoute,
} from "../interfaces/deepLinks";
import type { DeepLinkError } from "../interfaces/deepLinks";
import { logger } from "../utils/logger";
// Helper function to extract the first key from a Zod object schema
function getFirstKeyFromZodObject(
@@ -204,9 +205,8 @@ export class DeepLinkHandler {
validatedParams = await schema.parseAsync(params);
} catch (error) {
// For parameter validation errors, provide specific error feedback
logConsoleAndDb(
logger.error(
`[DeepLink] Invalid parameters for route name ${routeName} for path: ${path}: ${JSON.stringify(error)} ... with params: ${JSON.stringify(params)} ... and query: ${JSON.stringify(query)}`,
true,
);
await this.router.replace({
name: "deep-link-error",
@@ -229,9 +229,8 @@ export class DeepLinkHandler {
params: validatedParams,
});
} catch (error) {
logConsoleAndDb(
logger.error(
`[DeepLink] Error routing to route name ${routeName} for path: ${path}: ${JSON.stringify(error)} ... with validated params: ${JSON.stringify(validatedParams)}`,
true,
);
// For parameter validation errors, provide specific error feedback
await this.router.replace({
@@ -263,9 +262,8 @@ export class DeepLinkHandler {
await this.validateAndRoute(path, sanitizedParams, query);
} catch (error) {
const deepLinkError = error as DeepLinkError;
logConsoleAndDb(
logger.error(
`[DeepLink] Error (${deepLinkError.code}): ${deepLinkError.details}`,
true,
);
throw {