fix(lint): תיקון 10 שגיאות ESLint + ניקוי directives מיותרים

10 שגיאות (כולן קיימות-מראש, לא מהפיצ'רים האחרונים):
- react/no-unescaped-entities (3): legal-arguments-panel, precedent-edit-sheet
  — escaping של מרכאות ב-JSX (“/")
- react-hooks/set-state-in-effect (6): documents-panel, chair-editor,
  content-checklists, discussion-rules, golden-ratios, documents.ts
  — disable-comment לדפוסי sync/reset לגיטימיים (false-positive ידוע)
- React Compiler reassign (1): subject-donut — refactor לחישוב prefix-sums
  ללא mutable accumulator

ניקוי: הסרת 5 eslint-disable directives מיותרים (halacha-review-panel,
precedent-upload-sheet). תוצאה: 0 errors (היה 10), 24→ warnings (היה 29).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-06 13:29:30 +00:00
parent fdeed8a045
commit 1f1a025509
11 changed files with 15 additions and 12 deletions

View File

@@ -474,7 +474,6 @@ function PendingPanel() {
useEffect(() => {
if (focusedId === null) return;
if (visibleItems.some((h) => h.id === focusedId)) return;
// eslint-disable-next-line react-hooks/set-state-in-effect
setFocusedId(visibleItems[0]?.id ?? null);
}, [focusedId, visibleItems]);

View File

@@ -239,7 +239,7 @@ export function PrecedentEditSheet({ caseLawId, onOpenChange }: Props) {
</Select>
</div>
<div className="space-y-1">
<Label htmlFor="chair-name">יו"ר</Label>
<Label htmlFor="chair-name">יו&quot;ר</Label>
<Input id="chair-name" value={form.chair_name}
onChange={(e) => setForm({ ...form, chair_name: e.target.value })}
placeholder="" />

View File

@@ -75,15 +75,11 @@ export function PrecedentUploadSheet({ open, onOpenChange }: Props) {
useEffect(() => {
if (open) return;
// eslint-disable-next-line react-hooks/set-state-in-effect
// eslint-disable-next-line react-hooks/set-state-in-effect -- reset form on close
setFile(null); setCitation(""); setCaseName(""); setCourt("");
// eslint-disable-next-line react-hooks/set-state-in-effect
setDecisionDate(""); setSourceType(""); setPrecedentLevel("");
// eslint-disable-next-line react-hooks/set-state-in-effect
setPracticeArea(""); setAppealSubtype(""); setSubjectTags("");
// eslint-disable-next-line react-hooks/set-state-in-effect
setHeadnote(""); setIsBinding(true); setTaskId(null); setConflict(null);
// eslint-disable-next-line react-hooks/set-state-in-effect
setChairName(""); setDistrict(""); setCaseNumber("");
}, [open]);