Global identifiers from different JavaScript environments
Browse cluster: Terminal & CLI Output Styling →The globals package provides a JSON-based catalog of global identifiers available across different JavaScript environments, including browser and Node.js contexts. Built as a simple JSON file that can be used in any environment, it's primarily consumed by ESLint (versions 8 and earlier) to enable static analysis tools to flag incorrect variable usage by marking each global as either writable or read-only. For Node.js specifically, the package distinguishes between built-in globals and those including CommonJS module scope, allowing developers to catch accidental CommonJS references in code meant to run outside CommonJS wrappers.