summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorWeijia Wang <381152119@qq.com>2018-03-25 22:27:38 +0800
committerWeijia Wang <381152119@qq.com>2018-04-01 22:33:13 +0800
commit254058109f469f64b8ca23bb65a206abab380604 (patch)
tree4069f77207f62816c248ed1ac9910467ff1b15d6 /doc
parentf89f79893d6e15938f9237efe4d2473ab4a65e9f (diff)
downloadandroid-node-v8-254058109f469f64b8ca23bb65a206abab380604.tar.gz
android-node-v8-254058109f469f64b8ca23bb65a206abab380604.tar.bz2
android-node-v8-254058109f469f64b8ca23bb65a206abab380604.zip
tools: add 'spaced-comment' into eslint rules
PR-URL: https://github.com/nodejs/node/pull/19596 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Diffstat (limited to 'doc')
-rw-r--r--doc/api/assert.md2
-rw-r--r--doc/api/child_process.md6
-rw-r--r--doc/api/http2.md12
-rw-r--r--doc/api/net.md2
4 files changed, 11 insertions, 11 deletions
diff --git a/doc/api/assert.md b/doc/api/assert.md
index c26628bd84..d470cc8090 100644
--- a/doc/api/assert.md
+++ b/doc/api/assert.md
@@ -456,7 +456,7 @@ assert.equal(1, '1');
assert.equal(1, 2);
// AssertionError: 1 == 2
assert.equal({ a: { b: 1 } }, { a: { b: 1 } });
-//AssertionError: { a: { b: 1 } } == { a: { b: 1 } }
+// AssertionError: { a: { b: 1 } } == { a: { b: 1 } }
```
If the values are not equal, an `AssertionError` is thrown with a `message`
diff --git a/doc/api/child_process.md b/doc/api/child_process.md
index 6def24c8a5..7a01038d58 100644
--- a/doc/api/child_process.md
+++ b/doc/api/child_process.md
@@ -166,11 +166,11 @@ directly by the shell and special characters (vary based on
need to be dealt with accordingly:
```js
exec('"/path/to/test file/test.sh" arg1 arg2');
-//Double quotes are used so that the space in the path is not interpreted as
-//multiple arguments
+// Double quotes are used so that the space in the path is not interpreted as
+// multiple arguments
exec('echo "The \\$HOME variable is $HOME"');
-//The $HOME variable is escaped in the first instance, but not in the second
+// The $HOME variable is escaped in the first instance, but not in the second
```
**Never pass unsanitized user input to this function. Any input containing shell
diff --git a/doc/api/http2.md b/doc/api/http2.md
index 3279fa6cf0..193dd147d5 100644
--- a/doc/api/http2.md
+++ b/doc/api/http2.md
@@ -203,7 +203,7 @@ settings do not take effect until the `'localSettings'` event is emitted.
session.settings({ enablePush: false });
session.on('localSettings', (settings) => {
- /** use the new settings **/
+ /* Use the new settings */
});
```
@@ -218,7 +218,7 @@ of the remote settings.
```js
session.on('remoteSettings', (settings) => {
- /** use the new settings **/
+ /* Use the new settings */
});
```
@@ -280,7 +280,7 @@ activity on the `Http2Session` after the configured number of milliseconds.
```js
session.setTimeout(2000);
-session.on('timeout', () => { /** .. **/ });
+session.on('timeout', () => { /* .. */ });
```
#### http2session.alpnProtocol
@@ -706,8 +706,8 @@ const {
const req = clientSession.request({ [HTTP2_HEADER_PATH]: '/' });
req.on('response', (headers) => {
console.log(headers[HTTP2_HEADER_STATUS]);
- req.on('data', (chunk) => { /** .. **/ });
- req.on('end', () => { /** .. **/ });
+ req.on('data', (chunk) => { /* .. */ });
+ req.on('end', () => { /* .. */ });
});
```
@@ -1928,7 +1928,7 @@ Returns a `ClientHttp2Session` instance.
const http2 = require('http2');
const client = http2.connect('https://localhost:1234');
-/** use the client **/
+/* Use the client */
client.close();
```
diff --git a/doc/api/net.md b/doc/api/net.md
index 4b3897f61c..121dc552e8 100644
--- a/doc/api/net.md
+++ b/doc/api/net.md
@@ -914,7 +914,7 @@ in the [`net.createServer()`][] section:
```js
const net = require('net');
const client = net.createConnection({ port: 8124 }, () => {
- //'connect' listener
+ // 'connect' listener
console.log('connected to server!');
client.write('world!\r\n');
});