Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"plugins": ["prettier", "unused-imports"],
"reportUnusedDisableDirectives": false,
"rules": {
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/no-unused-vars": "error",
"unused-imports/no-unused-imports": "error",
"unused-imports/no-unused-vars": "off",
"react/no-unescaped-entities": "warn",
Expand Down
2 changes: 1 addition & 1 deletion pages/api/notifications/subscribe.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export default function handler(req, res) {
subscriptions.delete(userId);
console.log('[Push] Unsubscribed user:', userId);
res.status(200).json({ success: true });
} catch (error) {
} catch (_error) {
res.status(500).json({ error: 'Failed to unsubscribe' });
}
} else if (req.method === 'GET') {
Expand Down
18 changes: 8 additions & 10 deletions src/app/onboarding/page.tsx
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
'use client';

import React, { useCallback, useEffect, useRef, useState } from 'react';
import React, { useCallback, useEffect, useState } from 'react';
import { useRouter } from 'next/navigation';
import { motion, AnimatePresence } from 'framer-motion';
import {
User,
GraduationCap,
Calendar,
Check,
Wallet,
LogOut,
Globe,
Bell,
FileText,
Loader2,
BookOpen,
Mail,
} from 'lucide-react';

import { FormWizardController } from '@/form-management/components';
Expand Down Expand Up @@ -154,9 +152,9 @@ export default function OnboardingPage() {
const safeTrack = useCallback(
(name: string, properties: EventProperties = {}) => {
try {
track(name as any, properties);
} catch (err) {
logger.warn('[Onboarding Analytics] Failed to track event', { error: err });
track(name as string, properties);
} catch (_err) {
logger.warn('[Onboarding Analytics] Failed to track event', { error: _err });
}
},
[track],
Expand Down Expand Up @@ -225,7 +223,7 @@ export default function OnboardingPage() {
};
}, [hasFinishedOnboarding, safeTrack]);

const handleFieldChange = async (fieldId: string, value: any) => {
const handleFieldChange = async (fieldId: string, value: unknown) => {
stateManager.updateField(fieldId, value);

// Perform real-time validation
Expand Down Expand Up @@ -268,7 +266,7 @@ export default function OnboardingPage() {
};

// Final onboarding submission
const handleComplete = async (values: Record<string, any>) => {
const handleComplete = async (values: Record<string, unknown>) => {
const loadingToastId = loading('Finalizing your registration profile...');

try {
Expand All @@ -282,14 +280,14 @@ export default function OnboardingPage() {
stepId: currentStep.id,
stepIndex: currentStep.index,
stepTitle: currentStep.title,
role: values.role,
role: values.role as string,
walletConnected: !!values.walletAddress,
});

// Save onboarding preference state locally so other pages know user is onboarded
if (typeof window !== 'undefined') {
localStorage.setItem('teachlink_onboarded', 'true');
localStorage.setItem('teachlink_user_role', values.role);
localStorage.setItem('teachlink_user_role', values.role as string);
}

// Redirect to main dashboard
Expand Down
2 changes: 1 addition & 1 deletion src/features/collaboration/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export type CollaborationMessage =
| {
type: 'poll:created';
roomId: string;
poll: any;
poll: unknown;
}
| {
type: 'poll:vote';
Expand Down
1 change: 0 additions & 1 deletion src/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { checkRoutePermission } from './middleware/rbac';
import { applySecurityHeaders } from './middleware/security';
import { applyCspHeaders } from './middleware/csp';
import { handleRedirects } from './middleware/redirectManagement';
import { UserRole } from './types/api';
import {
API_DEPRECATION_HEADER,
API_DEPRECATION_INFO_HEADER,
Expand Down
4 changes: 2 additions & 2 deletions src/utils/structuredDataUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export interface StructuredDataFilterGroup {
* Uses schema.org ItemList to represent filterable options
*/
export function generateFilterStructuredData(filterGroups: StructuredDataFilterGroup[]): string {
const itemListElement = filterGroups.map((group, groupIndex) => ({
const itemListElement = filterGroups.map((group, _groupIndex) => ({
'@type': 'ItemList',
name: group.name,
description: group.description,
Expand Down Expand Up @@ -115,7 +115,7 @@ export function validateStructuredData(jsonLd: string): { valid: boolean; errors
}

return { valid: errors.length === 0, errors };
} catch (error) {
} catch (_error) {
return { valid: false, errors: ['Invalid JSON format'] };
}
}
Loading