diff options
author | Vse Mozhet Byt <vsemozhetbyt@gmail.com> | 2017-04-21 07:53:00 +0300 |
---|---|---|
committer | Vse Mozhet Byt <vsemozhetbyt@gmail.com> | 2017-04-25 00:05:33 +0300 |
commit | b6d293d2158c66a3edbb86c0c43b4c51af3484f7 (patch) | |
tree | 9f924abbe8a8efe10a34ab7448d22a4e1c632746 /doc/guides | |
parent | 26047c39c89ff40bfbab5e02e8186dab2d2832af (diff) | |
download | android-node-v8-b6d293d2158c66a3edbb86c0c43b4c51af3484f7.tar.gz android-node-v8-b6d293d2158c66a3edbb86c0c43b4c51af3484f7.tar.bz2 android-node-v8-b6d293d2158c66a3edbb86c0c43b4c51af3484f7.zip |
doc: prepare js code for eslint-plugin-markdown
This is an initial step to eliminate most of parsing errors.
PR-URL: https://github.com/nodejs/node/pull/12563
Refs: https://github.com/nodejs/node/pull/12557#issuecomment-296015032
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Diffstat (limited to 'doc/guides')
-rw-r--r-- | doc/guides/using-internal-errors.md | 2 | ||||
-rw-r--r-- | doc/guides/writing-tests.md | 42 |
2 files changed, 22 insertions, 22 deletions
diff --git a/doc/guides/using-internal-errors.md b/doc/guides/using-internal-errors.md index 9f8634dc23..948a87612e 100644 --- a/doc/guides/using-internal-errors.md +++ b/doc/guides/using-internal-errors.md @@ -52,7 +52,7 @@ and appending the new error codes to the end using the utility `E()` method. ```js E('EXAMPLE_KEY1', 'This is the error value'); -E('EXAMPLE_KEY2', (a, b) => return `${a} ${b}`); +E('EXAMPLE_KEY2', (a, b) => `${a} ${b}`); ``` The first argument passed to `E()` is the static identifier. The second diff --git a/doc/guides/writing-tests.md b/doc/guides/writing-tests.md index d0a6e1a199..70690e2fda 100644 --- a/doc/guides/writing-tests.md +++ b/doc/guides/writing-tests.md @@ -23,27 +23,27 @@ Add tests when: Let's analyze this basic test from the Node.js test suite: ```javascript -1 'use strict'; -2 const common = require('../common'); -3 -4 // This test ensures that the http-parser can handle UTF-8 characters -5 // in the http header. -6 -7 const assert = require('assert'); -8 const http = require('http'); -9 -10 const server = http.createServer(common.mustCall((req, res) => { -11 res.end('ok'); -12 })); -13 server.listen(0, () => { -14 http.get({ -15 port: server.address().port, -16 headers: {'Test': 'Düsseldorf'} -17 }, common.mustCall((res) => { -18 assert.strictEqual(res.statusCode, 200); -19 server.close(); -20 })); -21 }); +'use strict'; // 1 +const common = require('../common'); // 2 + // 3 +// This test ensures that the http-parser can handle UTF-8 characters // 4 +// in the http header. // 5 + // 6 +const assert = require('assert'); // 7 +const http = require('http'); // 8 + // 9 +const server = http.createServer(common.mustCall((req, res) => { // 10 + res.end('ok'); // 11 +})); // 12 +server.listen(0, () => { // 13 + http.get({ // 14 + port: server.address().port, // 15 + headers: {'Test': 'Düsseldorf'} // 16 + }, common.mustCall((res) => { // 17 + assert.strictEqual(res.statusCode, 200); // 18 + server.close(); // 19 + })); // 20 +}); // 21 ``` ### **Lines 1-2** |