You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
npx eslint reports errors on master in three files nobody is currently working on. One of them breaks an absolute rule of the project (rule 5, zero any). The others are a dead import and two setState calls made synchronously inside a useEffect, which cost an extra render.
Found during #755 by linting the master versions of the files (git show master:<file> | npx eslint --stdin).
Acceptance criteria
frontend/src/features/risks/components/EditRiskModal.tsx has no any: the risk prop, the asset map callback and the submit handler are typed.
frontend/src/features/risks/RiskWeightsSettings.tsx no longer copies server data into state with setState inside an effect (react-hooks/set-state-in-effect).
npx eslint reports zero errors on these three files; tsc -b and the full vitest run stay green.
Behaviour is unchanged and verified live: editing a risk saves, the weights page loads and saves the server's weights, and /risks?guided=1 opens the create-risk dialog once and strips the parameter.
Problem
npx eslintreports errors on master in three files nobody is currently working on. One of them breaks an absolute rule of the project (rule 5, zeroany). The others are a dead import and twosetStatecalls made synchronously inside auseEffect, which cost an extra render.Found during #755 by linting the master versions of the files (
git show master:<file> | npx eslint --stdin).Acceptance criteria
frontend/src/features/risks/components/EditRiskModal.tsxhas noany: theriskprop, the asset map callback and the submit handler are typed.frontend/src/features/risks/RiskWeightsSettings.tsxno longer copies server data into state withsetStateinside an effect (react-hooks/set-state-in-effect).frontend/src/App.tsx: the?guided=1deep link no longer callssetNewRiskOpensynchronously in an effect, and the unusedGlobalShortcutsimport is removed. The component it imported was replaced byShortcutsOverlay+useHotkeysin Implement UX primitives: undoableDelete, ImpactDialog, Hint, ProgressState, PremiumPeek #165, so it is deleted rather than left orphaned.npx eslintreports zero errors on these three files;tsc -band the fullvitest runstay green./risks?guided=1opens the create-risk dialog once and strips the parameter.Definition of Done
Criteria 1–5 verified. PR open with
Closes #<n>.