chore(web): cut lint warnings 171 → 56#178
Open
c0dewhacker wants to merge 1 commit into
Open
Conversation
Config (defensible suppressions): - components/ui/** (vendored shadcn): disable no-forward-ref + only-export-components rather than forking 30+ primitives from upstream (−60) - react-hooks/incompatible-library: known false positive vs react-hook-form (−6) - @eslint-react/set-state-in-effect: same rule as react-hooks/set-state-in-effect, already disabled with a documented rationale — turn off the twin for consistency (−41) Real fixes (no behaviour change): - BuildingDetail: drop gratuitous (floor as any) casts; floorPlan is already typed, widen prop with _count - Floor/Reports: type building + add buildingName to UtilisationDataPoint Left as warnings (genuine signal): purity (new Date()/matchMedia in render), exhaustive-deps (possible stale closures), no-array-index-key, use-state lazy-init, and 2 no-explicit-any in UsersAdminPage that mask a real 'SUSPENDED' status bug.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reduces web lint warnings from 171 → 56 (−67%) with no behaviour change. Typecheck and lint pass (0 errors).
Config-level suppressions (defensible)
components/ui/**(vendored shadcn) — disable@eslint-react/no-forward-ref+react-refresh/only-export-components. These are generated primitives following upstream'sReact.forwardRef+ colocated-variant-const pattern; forking 30+ files away from their source is worse than the warning. −60react-hooks/incompatible-library— known false positive against react-hook-form'swatch()/controlAPI (the library is React-compatible). −6@eslint-react/set-state-in-effect— the same rule asreact-hooks/set-state-in-effect, which the config already disables with a documented rationale ("pattern is valid in controlled sync effects"). Turned off the twin for consistency. −41Real fixes (no behaviour change)
BuildingDetailAdminPage: dropped gratuitous(floor as any)casts —floorPlanis already on theFloortype; widened the prop with_count.FloorAdminPage/ReportsAdminPage: typedbuildingaccess and addedbuildingName/buildingIdtoUtilisationDataPoint.Left as warnings on purpose (genuine signal — not suppressed)
@eslint-react/puritynew Date()/matchMediacalls during render@eslint-react/exhaustive-deps@eslint-react/no-array-index-key@eslint-react/use-state@typescript-eslint/no-explicit-anyUsersAdminPage— these mask a real'SUSPENDED'vsACTIVE|BLOCKEDstatus mismatch that deserves its own fix, not a lint pave-overTest plan
tsc --noEmit(web) — cleaneslint src— 0 errors, 56 warnings (was 171)