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>
)
+1 -1
View File
@@ -31,7 +31,7 @@ export default function DetailModal({
/>
</div>
<p className="mt-4 text-sm text-[var(--color-ink-muted)]">
Cliquez sur les zones pour les ajouter à l'observation en cours.
Cliquez sur les zones pour les ajouter à l&apos;observation en cours.
</p>
</Dialog>
)
@@ -29,7 +29,7 @@ export default function ObservationList({
</div>
{observations.length === 0 ? (
<p className="text-sm text-[var(--color-ink-muted)]">
Aucune observation. Cliquez sur "+ Nouvelle observation" puis sur les zones du schéma.
Aucune observation. Cliquez sur &quot;+ Nouvelle observation&quot; puis sur les zones du schéma.
</p>
) : (
<ul className="space-y-2">
+1 -1
View File
@@ -30,7 +30,7 @@ export default function AnimalForm({ animal, owner, onChangeAnimal, onChangeOwne
</Select>
</div>
<div>
<Label htmlFor="an-name">Nom de l'animal *</Label>
<Label htmlFor="an-name">Nom de l&apos;animal *</Label>
<Input id="an-name" required value={animal.name} onChange={(e) => setA({ name: e.target.value })} />
</div>
<div>