Skip to content

Commit 222fcb1

Browse files
Trottaddaleax
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 76d991c commit 222fcb1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

doc/api/esm.md

Lines changed: 4 additions & 4 deletions
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

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

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

532532
```js
533533
// ./another-module.mjs
@@ -637,7 +637,7 @@ CommonJS entry point for `require`.
637637
}
638638
```
639639

640-
The above example uses explicit extensions `.mjs` and `.cjs`.
640+
The preceding example uses explicit extensions `.mjs` and `.cjs`.
641641
If your files use the `.js` extension, `"type": "module"` will cause such files
642642
to be treated as ES modules, just as `"type": "commonjs"` would cause them
643643
to be treated as CommonJS.
@@ -1221,7 +1221,7 @@ export async function getFormat(url, context, defaultGetFormat) {
12211221
if (Math.random() > 0.5) { // Some condition.
12221222
// For some or all URLs, do some custom logic for determining format.
12231223
// Always return an object of the form {format: <string>}, where the
1224-
// format is one of the strings in the table above.
1224+
// format is one of the strings in the preceding table.
12251225
return {
12261226
format: 'module',
12271227
};

0 commit comments

Comments
 (0)