Proposal: enable no-node-globals and no-process-global lint rules
- Dominant language
- TypeScript
- Stars
- 3.6k
- Forks
- 681
- PR merge metrics
- No merged PRs in 30d
Description
I propose adding no-node-globals and no-process-global to the lint config. Both rules pass on the current codebase with zero violations, so enabling them is a one-line config change. This issue is the ask for a green light before I open that PR.
### Why lint for something type checking should catch
A bare process or Buffer reference breaks browsers and non-Node runtimes, and today nothing reliably stops one from landing:
- The repo depends on npm packages (fast-check, node-graphviz, typescript). Any of them can pull @types/node into the type graph, and from that point a bare process type-checks silently, everywhere.
- _tools/check_browser_compat.ts type-checks against a browser tsconfig, but it skips tests and _-prefixed internal files by design.
So the gap is real even though the codebase is clean right now. A lint rule closes it for every file, every PR, with no reliance on what happens to be in the type graph that day.
### Cost
None today. Zero violations, no ignores needed, no code churn. Contributors touching Node-specific code keep doing what the codebase already does: import from node:process and friends explicitly.
### Possibly in the same PR: ban-untagged-todo
The style guide already requires TODOs to carry a username or issue link. The rule enforcing that is off, and 5 untagged TODOs have accumulated (csv/parse.ts, csv/parse_stream.ts, dotenv/mod_test.ts, testing/_snapshot_utils.ts, toml/_test_utils.ts). Happy to fix those and enable the rule in the same PR, or drop this part if you'd rather keep the PR single-purpose.
Contributor guide
Research direction
Locate the repository's lint configuration and verify that no-node-globals and no-process-global pass with zero violations on the current codebase. Enable both rules and rerun the lint checks; done means the configuration change introduces no violations. The optional ban-untagged-todo work affects csv/parse.ts, csv/parse_stream.ts, dotenv/mod_test.ts, testing/_snapshot_utils.ts, and toml/_test_utils.ts.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 76/100