JavaScript Standards — globalThis
RULES.md
When writing global scope referenced JavaScript, use `globalThis` instead of `window` for consistency. In PRAW RULES.md (scope: webcomponents). Also in webcomponents AGENTS.md, create AGENTS.md. Enforced by ESLint. ESLint no-restricted-globals (window) in webcomponents: an error in CI (the ESLint step of the build workflow) and in yarn precheck.
Connects to
- Web Component Development includes this
- ESLint enforces this
- Applies to Web components
- Is written in HAX CLI