Skip to content

Commit 9d82866

Browse files
committed
chore: remove unused navigation routes, reorder imports, and add an ESLint fix progress report.
1 parent 48fda9d commit 9d82866

File tree

3 files changed

+75
-9
lines changed

3 files changed

+75
-9
lines changed

.agent/eslint-fix-progress.md

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# ESLint Fix Progress Summary
2+
3+
## Completed Fixes (7 individual commits)
4+
5+
### ✅ Fixed Issues
6+
7+
1. **Duplicate super() calls** in `Speakers.test.tsx` - Fixed Date mock constructor
8+
2. **Loose equality operators** in `QrCode.tsx` - Replaced `==` with `===`
9+
3. **Unused imports** in `year-data-verification.test.tsx` - Removed render, React, BrowserRouter
10+
4. **Unused variable** in `year-path-isolation.test.ts` - Prefixed with underscore
11+
5. **Unused data import** in `ActionButtons.tsx`
12+
6. **Unused RouteProps** in `SuspenseRoute.tsx`
13+
7. **Unused route constants** - Removed ROUTE_ACCOMMODATION and ROUTE_2026_DIVERSITY
14+
15+
## Current Status
16+
17+
**Total: 74-75 problems (66-67 errors, 8 warnings)**
18+
19+
## Remaining Issues Breakdown
20+
21+
### Import Order Issues (~30 errors)
22+
23+
Files needing import order fixes:
24+
25+
- `SessionFeedback.tsx` (6 errors) - Complex primereact imports
26+
- `Talks.tsx` (3 errors)
27+
- `Sponsorship.tsx` (3 errors)
28+
- `SpeakerSwiper.tsx` (2 errors)
29+
- `Venue.tsx`, `VenueWTC.tsx` (1 error each)
30+
- Various files with empty line issues (Faqs, HomeWTC, LiveView, etc.)
31+
32+
**Note**: Import order rules are complex and may require manual fixing based on the ESLint config groups.
33+
34+
### TypeScript `any` Types (~30 errors)
35+
36+
**Acceptable `any` types** (route configurations):
37+
38+
- `src/config/routeConfig.ts` (2) - React component types
39+
- `src/config/yearRoutes.ts` (16) - React component types
40+
41+
**Should be fixed**:
42+
43+
- `SessionFeedback.tsx` (1) - Event handler type
44+
- `reportWebVitals.ts` (1) - Callback type
45+
- `urlBuilder.test.ts` (1) - Test mock type
46+
- `types/types.ts` (1) - Generic type definition
47+
- `SpeakersWrapper2025.test.tsx` (3) - Test mock types
48+
49+
### Warnings (8 total)
50+
51+
- **react-refresh/only-export-components** (6) - Components exporting non-component values
52+
- **jsx-a11y/alt-text** (1) - Missing alt text on img
53+
- **@typescript-eslint/no-non-null-assertion** (2) - Non-null assertions
54+
55+
## Recommendations
56+
57+
1. **Import Order**: These are cosmetic but enforce consistency. Can be tackled file-by-file or use `--fix` where possible.
58+
59+
2. **Route Config `any` types**: These are acceptable - React components have varying prop types. Consider adding eslint-disable comments if needed.
60+
61+
3. **Other `any` types**: Should be replaced with proper types for better type safety.
62+
63+
4. **Warnings**: Lower priority but should be addressed for production code quality.
64+
65+
## Next Steps
66+
67+
- Continue with import order fixes (manual or semi-automated)
68+
- Fix non-route `any` types
69+
- Address accessibility and code quality warnings

src/components/Navigation/NavigationData.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import {
22
ROUTE_2026_CODE_OF_CONDUCT,
3-
ROUTE_2026_DIVERSITY,
43
ROUTE_2026_HOME,
5-
ROUTE_ACCOMMODATION,
64
ROUTE_2026_SPONSORSHIP,
75
ROUTE_2026_TRAVEL,
86
ROUTE_ABOUT_US,

src/views/SessionFeedback/SessionFeedback.tsx

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,21 @@
1-
import type { MeasurableSessionRating, SessionRating } from "./sessionData";
2-
3-
import { sessionData } from "./sessionData";
4-
5-
import React from "react";
6-
import { DataTable } from "primereact/datatable";
71
import { Column } from "primereact/column";
2+
import { DataTable } from "primereact/datatable";
83
import { Rating } from "primereact/rating";
4+
import React from "react";
5+
import { Link } from "react-router";
96
import "primereact/resources/primereact.min.css";
107
import "primereact/resources/themes/lara-light-blue/theme.css";
118
import { FilterMatchMode } from "primereact/api";
129
import { InputText } from "primereact/inputtext";
13-
import { Link } from "react-router";
1410

1511
import { ROUTE_TALK_DETAIL } from "@constants/routes";
1612
import data from "@data/2024.json";
1713
import { useDocumentTitleUpdater } from "@hooks/useDocumentTitleUpdate";
1814
import { Color } from "@styles/colors";
1915

16+
import { sessionData } from "./sessionData";
17+
18+
import type { MeasurableSessionRating, SessionRating } from "./sessionData";
2019
import type { FC } from "react";
2120

2221
const SessionFeedback: FC<React.PropsWithChildren<unknown>> = () => {

0 commit comments

Comments
 (0)