// Rôle : vérifie que les contrôles React critiques restent actifs dans la configuration ESLint effective. import { test } from "node:test"; import assert from "node:assert/strict"; import { ESLint } from "eslint"; test("React effect and purity checks are enabled for application sources", async () => { const eslint = new ESLint(); const config = await eslint.calculateConfigForFile("website/src/main.jsx"); for (const rule of ["react-hooks/set-state-in-effect", "react-hooks/purity", "react-hooks/rules-of-hooks", "react-hooks/exhaustive-deps"]) { assert.ok(config.rules[rule][0] > 0, `${rule} must remain enabled`); } });