Files
sigma/web
Tosone 3b99c1d305 chore(web): enable react/perf lint rules and resolve every finding
Turn on the react, react-hooks, suspicious and perf rule sets in oxlint and
fix the 2665 diagnostics they report instead of muting the rules:

- validation/limit state is derived during render instead of being synced
  in an effect (namespace/repository/tag limits, size limit + unit,
  username/email/password checks in Menu, Users, Webhook and Member)
- refetch triggers are gone: mutation handlers now call the memoized fetcher
  directly (Namespace list and members, Menu token timer) instead of bumping
  a `refresh` state that only existed to re-run an effect
- data fetchers (fetchNamespace/fetchTags/fetchRepository/fetchWebhook/
  fetchMembers/logout) are memoized with useCallback and their effects use
  correct dependency arrays; the async profile seeding uses an override state
  instead of an effect
- fix 39 shadowed variables (resp/err/*ListData/configData/requestUrl/...),
  use stable list keys instead of array indexes, hoist `cutDigest` to module
  scope and memoize the ToggleGroup context value
- replace the ported HTML5 email pattern with a zod based `isEmail` helper
  (zod 4, `z.email()`), dropping the control-character regex
- use-mobile seeds its state lazily and Shiki derives the highlighted html
  with useMemo

.oxlintrc.json pins the setup: plugins react/typescript/unicorn/oxc,
correctness as error, suspicious/perf as warn, `_`-prefixed names ignored by
no-unused-vars, and react-in-jsx-scope off because the app uses the React 19
automatic JSX runtime (that rule only applies to React < 17).

Verification: web: `bun run lint` (0 warnings, 0 errors, no
oxlint-disable directives left in src); `tsc --noEmit`; `vite build`;
unused-import scan reports 0.
2026-09-17 16:13:02 +08:00
..
2026-08-01 20:32:49 +08:00
2026-08-01 20:32:49 +08:00
2026-08-01 20:32:49 +08:00