fix(lint): escape JSX entities and narrow useEffect dep

Escape French apostrophes/quotes in JSX text per react/no-unescaped-entities
and replace the report?.observations.length dependency with a derived
observationsCount value so react-hooks/exhaustive-deps is satisfied without
re-firing on every report change.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Bastien ChanotandClaude Opus 4.7 committed 2026-05-18 22:00:15 +02:00
1 parent 3c32f66eb6
commit a33693580f
6 files changed
+9 -8

No files matched your search

+3 -2
View File
@@ -52,9 +52,10 @@ export default function EditorRoute() {
species.pathologies().then((m) => setPathologies(m.default))
}, [species])
const observationsCount = report?.observations.length ?? -1
useEffect(() => {
if (report && report.observations.length === 0) addObservation()
}, [report?.observations.length, addObservation])
if (observationsCount === 0) addObservation()
}, [observationsCount, addObservation])
const activeObs = report?.observations[activeIndex]
+1 -1
View File
@@ -44,7 +44,7 @@ export default function HomeRoute() {
<Card className="p-6 space-y-4">
<h2 className="font-serif text-2xl">Nouveau bilan</h2>
<p className="text-sm text-[var(--color-ink-muted)]">
Démarrer un nouveau bilan d'ostéopathie sur un animal.
Démarrer un nouveau bilan d&apos;ostéopathie sur un animal.
</p>
<Button onClick={() => navigate('/new')} size="lg">Commencer</Button>
</Card>
+2 -2
View File
@@ -7,8 +7,8 @@ export default function NotFoundRoute() {
<main className="min-h-screen grid place-items-center">
<div className="text-center space-y-4">
<h1 className="font-serif text-4xl">Page introuvable</h1>
<p className="text-[var(--color-ink-muted)]">Le chemin demandé n'existe pas.</p>
<Button onClick={() => navigate('/')}>Retour à l'accueil</Button>
<p className="text-[var(--color-ink-muted)]">Le chemin demandé n&apos;existe pas.</p>
<Button onClick={() => navigate('/')}>Retour à l&apos;accueil</Button>
</div>
</main>
)