Files
Miguel Angel Simon Sierra eab389bf18 ci(studio): close the effect gate's bypasses by spelling
A ban that one import spelling walks around is not a gate. The scanner now resolves the react
namespace through `require` and dynamic `import` (awaited or not, bound or destructured), reads
computed member access, follows chains of local aliases in any declaration order, and fails a
barrel under the scanned tree that re-exports the hook, since the barrel is the file the laundering
route needs and it is in scope. `.js` and `.jsx` are scanned on the same terms as `.ts` and `.tsx`.

The script header now lists every spelling as either detected or out of scope with its reason, so
nothing is silently unhandled: cross-package barrels (no file in the repo re-exports react, and
catching one needs whole-program resolution) and runtime indirection a static pass cannot follow.

The sanctioned file stops being skipped wholesale, which had made it the one place any effect could
hide. It must hold exactly one banned-hook call and that call must pass an empty dependency array,
so useMountEffect cannot quietly grow into a general effect.

Each new detection has a test that fails when the detection is removed.
2026-09-02 20:14:27 -04:00
..