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.
This commit is contained in:
Gergo Kekesi
2026-10-07 08:58:18 +01:00
committed by GitHub
parent 723a9d2710
commit cbbadaead5
+8 -1
View File
@@ -99,7 +99,14 @@
},
{
"includes": ["frontend/src/**"],
"plugins": ["./tracking-shape.grit"]
"plugins": ["./tracking-shape.grit"],
"linter": {
"rules": {
"correctness": {
"noNodejsModules": "error"
}
}
}
},
{
"includes": [