[Bug] Strict TypeScript checks (noUnusedLocals) break production build #3

Open
opened 2026-10-14 09:44:00 +00:00 by indrajeet · 0 comments

Summary

frontend/tsconfig.json enables "strict": true and "noUnusedLocals": true. Several files declare variables or imports that are never read:

  1. frontend/src/features/auth/LoginView.tsx: const res = await fetch(...) (res is never used).
  2. frontend/src/App.tsx: import { AccessDeniedView } from './features/auth/AccessDeniedView' (imported but unused in JSX).
  3. Files using import React from 'react' with "jsx": "react-jsx" where React is only referenced as a type (React.FC).

Impact

tsc fails with TS6133: '...' is declared but its value is never read, blocking npm run build.

Expected Behavior

Clean up unused imports/variables and import types using import { type FC } from 'react'.

### Summary `frontend/tsconfig.json` enables `"strict": true` and `"noUnusedLocals": true`. Several files declare variables or imports that are never read: 1. `frontend/src/features/auth/LoginView.tsx`: `const res = await fetch(...)` (`res` is never used). 2. `frontend/src/App.tsx`: `import { AccessDeniedView } from './features/auth/AccessDeniedView'` (imported but unused in JSX). 3. Files using `import React from 'react'` with `"jsx": "react-jsx"` where `React` is only referenced as a type (`React.FC`). ### Impact `tsc` fails with `TS6133: '...' is declared but its value is never read`, blocking `npm run build`. ### Expected Behavior Clean up unused imports/variables and import types using `import { type FC } from 'react'`.
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: prashant/c_agri_trade_code#3
No description provided.