From cbbadaead5916713d41b910598db7d34d7b0ec56 Mon Sep 17 00:00:00 2001 From: Gergo Kekesi Date: Wed, 7 Oct 2026 08:58:18 +0100 Subject: [PATCH] chore: forbid Node.js builtin imports in frontend source - Turns on Biome's `correctness/noNodejsModules` for `oss/frontend/src/**`. - #2019 imported `node:util` in a frontend file. Type check, unit tests and the build passed, and the app broke in the browser (fixed in #2029). This makes that import a lint error. - Checked against the #2019 version of `strategy-change-diff-calculation.ts`: lint fails on the import. Current `main` passes with no hits, so no source changes are needed. - Scoped to `src` so `vite.config.mts` and the Cypress config can keep using Node builtins. - Does not cover a dependency that imports a Node builtin. That still needs a runtime check. --- biome.json | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/biome.json b/biome.json index f45b1d2d3a..fd2b29331e 100644 --- a/biome.json +++ b/biome.json @@ -99,7 +99,14 @@ }, { "includes": ["frontend/src/**"], - "plugins": ["./tracking-shape.grit"] + "plugins": ["./tracking-shape.grit"], + "linter": { + "rules": { + "correctness": { + "noNodejsModules": "error" + } + } + } }, { "includes": [