globals
Advanced tools
Comparing version 15.3.0 to 15.4.0
{ | ||
"name": "globals", | ||
"version": "15.3.0", | ||
"version": "15.4.0", | ||
"description": "Global identifiers from different JavaScript environments", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -5,8 +5,6 @@ # globals | ||
It's just a [JSON file](globals.json), so use it in any environment. | ||
It's just a [JSON file](globals.json), so you can use it in any environment. | ||
This package is used by ESLint. | ||
This package is used by ESLint 8 and earlier. For ESLint 9 and later, you should depend on this package directly in [your ESLint config](https://eslint.org/docs/latest/use/configure/language-options#predefined-global-variables). | ||
**This package [no longer accepts](https://github.com/sindresorhus/globals/issues/82) new environments. If you need it for ESLint, just [create a plugin](http://eslint.org/docs/developer-guide/working-with-plugins#environments-in-plugins).** | ||
## Install | ||
@@ -21,3 +19,3 @@ | ||
```js | ||
const globals = require('globals'); | ||
import globals from 'globals'; | ||
@@ -41,3 +39,3 @@ console.log(globals.browser); | ||
- `globals.nodeBuiltin`: Globals available to all code running in Node.js. | ||
These will usually be available as properties on the `global` object and include `process`, `Buffer`, but not CommonJS arguments like `require`. | ||
These will usually be available as properties on the `globalThis` object and include `process`, `Buffer`, but not CommonJS arguments like `require`. | ||
See: https://nodejs.org/api/globals.html | ||
@@ -44,0 +42,0 @@ - `globals.node`: A combination of the globals from `nodeBuiltin` plus all CommonJS arguments ("CommonJS module scope"). |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
169593
5757
43