Files
agentic-dev/docs/library-decisions/2026-05-14-globals.md
Danijel Martinek f77e6ea881 chore(template): clean-slate template snapshot from bb4a0c7
Curated, product-agnostic snapshot of the post-story-04 tree: demo
content deleted, auth-only reference feature, web-next shell, all gates
green. Product-specific docs, ADRs 027-029, PRDs/epics/archive, editor
library traces, and product naming are curated out; generic template
repairs (coverage provider devDeps, root test:coverage script, live
lint fixes, root-only release-please) are kept. See TEMPLATE.md for
provenance, curation list, and usage.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016j8z4VHjedXDTjEDNg7qHK
2026-07-12 20:40:54 +02:00

89 lines
2.7 KiB
Markdown

---
package: globals
version: "^17.6.0"
tier: core
decision: approved
date: 2026-05-14
deciders: [Danijel Martinek]
adr: null
lastRevalidated: null
is-sub-processor: false
processes-pii: false
filter-results:
license: MIT
types: native
maintenance: active
boundary-fit: pass
shadow-check: pass
eu-residency: n/a
cve-scan: clean
named-consumer: pass
socketRisk: clean
verification-commands:
- npm view globals license
- npm view globals version
- pnpm audit --audit-level=moderate
accepted-cves: []
---
## Filter: license
<!-- Result: MIT -->
`npm view globals license` returns `MIT`. MIT is on the allowlist.
## Filter: types
<!-- Result: native -->
`globals` ships its own TypeScript declaration files. No separate `@types/globals` package is needed.
## Filter: maintenance
<!-- Result: active -->
Maintained by the Sindre Sorhus ecosystem. Regularly updated to track ECMAScript specification changes and new browser/Node.js globals. Last release < 18 months.
## Filter: boundary-fit
<!-- Result: pass -->
`globals` is a dependency of `@repo/core-eslint`, the shared ESLint configuration package. It provides the global variable definitions consumed by ESLint's `languageOptions.globals` configuration. This is the correct placement for a configuration-layer utility.
## Filter: shadow-check
<!-- Result: pass -->
`globals` is the de-facto standard globals catalog for ESLint configurations. No competing globals package is present in the workspace.
## Filter: eu-residency
<!-- Result: n/a -->
`globals` is a static data package (JSON + TypeScript types) with no network communication. EU residency does not apply.
## Filter: cve-scan
<!-- Result: clean -->
`pnpm audit --audit-level=moderate` reports no advisories against `globals` at the time of this trace.
## Filter: named-consumer
<!-- Result: pass -->
`@repo/core-eslint` uses `globals` in its ESLint flat-config exports to declare browser and Node.js global environments. Named, non-hypothetical consumer exists today.
## Prompt: replaces
`globals` replaces the deprecated `env` configuration approach in ESLint's legacy config format. In the flat config system, `languageOptions.globals` with the `globals` package is the recommended approach.
## Prompt: migration-cost-out
Mechanical. `globals` is used in one configuration file (`@repo/core-eslint`). Migrating to a different globals source requires updating that file only.
## Prompt: alternatives-considered
1. **Inline global declarations** — Verbose and maintenance-heavy; the `globals` package is the ESLint ecosystem standard for this purpose.
2. **`@types/node` globals only** — Insufficient for browser environments; `globals` covers both environments cleanly.