summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/.eslintrc.yaml1
-rw-r--r--doc/api/esm.md4
-rw-r--r--doc/api/http.md2
-rw-r--r--doc/api/stream.md2
4 files changed, 5 insertions, 4 deletions
diff --git a/doc/.eslintrc.yaml b/doc/.eslintrc.yaml
index c8c1612e3a..7b38afec10 100644
--- a/doc/.eslintrc.yaml
+++ b/doc/.eslintrc.yaml
@@ -12,6 +12,7 @@ rules:
no-var: error
prefer-const: error
prefer-rest-params: error
+ prefer-template: error
# Stylistic Issues
no-multiple-empty-lines: [error, {max: 1, maxEOF: 0, maxBOF: 0}]
diff --git a/doc/api/esm.md b/doc/api/esm.md
index 3ff2904488..2a56433295 100644
--- a/doc/api/esm.md
+++ b/doc/api/esm.md
@@ -118,7 +118,7 @@ given module specifier and parent file URL:
```js
const baseURL = new URL('file://');
-baseURL.pathname = process.cwd() + '/';
+baseURL.pathname = `${process.cwd()}/`;
export async function resolve(specifier,
parentModuleURL = baseURL,
@@ -161,7 +161,7 @@ const builtins = Module.builtinModules;
const JS_EXTENSIONS = new Set(['.js', '.mjs']);
const baseURL = new URL('file://');
-baseURL.pathname = process.cwd() + '/';
+baseURL.pathname = `${process.cwd()}/`;
export function resolve(specifier, parentModuleURL = baseURL, defaultResolve) {
if (builtins.includes(specifier)) {
diff --git a/doc/api/http.md b/doc/api/http.md
index daa058a8b0..e396471b3e 100644
--- a/doc/api/http.md
+++ b/doc/api/http.md
@@ -422,7 +422,7 @@ const req = http.request(options);
req.end();
req.on('information', (res) => {
- console.log('got information prior to main response: ' + res.statusCode);
+ console.log(`Got information prior to main response: ${res.statusCode}`);
});
```
diff --git a/doc/api/stream.md b/doc/api/stream.md
index c72873c466..20eaa95bc1 100644
--- a/doc/api/stream.md
+++ b/doc/api/stream.md
@@ -1852,7 +1852,7 @@ class Counter extends Readable {
if (i > this._max)
this.push(null);
else {
- const str = '' + i;
+ const str = String(i);
const buf = Buffer.from(str, 'ascii');
this.push(buf);
}