Skip to content

Commit 4cf93bb

Browse files
Trottrichardlau
authored andcommitted
doc: use "previous"/"preceding" instead of "above" as modifier
Refs: https://docs.microsoft.com/en-us/style-guide/a-z-word-list-term-collections/a/above PR-URL: #34877 Reviewed-By: Jan Krems <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Anto Aravinth <[email protected]> Reviewed-By: Franziska Hinkelmann <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
1 parent 971b7ac commit 4cf93bb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

doc/api/esm.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ until the root of the volume is reached.
9595
```
9696

9797
```bash
98-
# In same folder as above package.json
98+
# In same folder as preceding package.json
9999
node my-app.js # Runs as ES module
100100
```
101101

@@ -542,7 +542,7 @@ import { something } from 'a-package'; // Imports "something" from ./main.mjs.
542542

543543
Self-referencing is available only if `package.json` has `exports`, and will
544544
allow importing only what that `exports` (in the `package.json`) allows.
545-
So the code below, given the package above, will generate a runtime error:
545+
So the code below, given the previous package, will generate a runtime error:
546546

547547
```js
548548
// ./another-module.mjs
@@ -689,7 +689,7 @@ CommonJS entry point for `require`.
689689
}
690690
```
691691

692-
The above example uses explicit extensions `.mjs` and `.cjs`.
692+
The preceding example uses explicit extensions `.mjs` and `.cjs`.
693693
If your files use the `.js` extension, `"type": "module"` will cause such files
694694
to be treated as ES modules, just as `"type": "commonjs"` would cause them
695695
to be treated as CommonJS.
@@ -1309,7 +1309,7 @@ export async function getFormat(url, context, defaultGetFormat) {
13091309
if (Math.random() > 0.5) { // Some condition.
13101310
// For some or all URLs, do some custom logic for determining format.
13111311
// Always return an object of the form {format: <string>}, where the
1312-
// format is one of the strings in the table above.
1312+
// format is one of the strings in the preceding table.
13131313
return {
13141314
format: 'module',
13151315
};

0 commit comments

Comments
 (0)