Skip to content

Commit 15980fd

Browse files
committed
Readme tweaks
1 parent 1e9a85c commit 15980fd

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

readme.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,9 @@
22

33
> Global identifiers from different JavaScript environments
44
5-
It's just a [JSON file](globals.json), so use it in any environment.
5+
It's just a [JSON file](globals.json), so you can use it in any environment.
66

7-
This package is used by ESLint.
8-
9-
**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).**
7+
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).
108

119
## Install
1210

@@ -17,7 +15,7 @@ npm install globals
1715
## Usage
1816

1917
```js
20-
const globals = require('globals');
18+
import globals from 'globals';
2119

2220
console.log(globals.browser);
2321
/*
@@ -36,7 +34,7 @@ Each global is given a value of `true` or `false`. A value of `true` indicates t
3634
For Node.js this package provides two sets of globals:
3735

3836
- `globals.nodeBuiltin`: Globals available to all code running in Node.js.
39-
These will usually be available as properties on the `global` object and include `process`, `Buffer`, but not CommonJS arguments like `require`.
37+
These will usually be available as properties on the `globalThis` object and include `process`, `Buffer`, but not CommonJS arguments like `require`.
4038
See: https://nodejs.org/api/globals.html
4139
- `globals.node`: A combination of the globals from `nodeBuiltin` plus all CommonJS arguments ("CommonJS module scope").
4240
See: https://nodejs.org/api/modules.html#modules_the_module_scope

0 commit comments

Comments
 (0)