summaryrefslogtreecommitdiff
path: root/doc/api/console.md
diff options
context:
space:
mode:
authorVse Mozhet Byt <vsemozhetbyt@gmail.com>2017-04-21 22:55:51 +0300
committerVse Mozhet Byt <vsemozhetbyt@gmail.com>2017-04-25 00:06:17 +0300
commitb4fea2a3d62da5e2e3f90d7f2109f02f927f7174 (patch)
treed04d3b624c5bc153b56d926ec2b3fd82689e33cd /doc/api/console.md
parente2c3e4727d5899a709f5c421e128a4af2ef626f3 (diff)
downloadandroid-node-v8-b4fea2a3d62da5e2e3f90d7f2109f02f927f7174.tar.gz
android-node-v8-b4fea2a3d62da5e2e3f90d7f2109f02f927f7174.tar.bz2
android-node-v8-b4fea2a3d62da5e2e3f90d7f2109f02f927f7174.zip
doc: add eslint-plugin-markdown
* install eslint-plugin-markdown * add doc/.eslintrc.yaml * add `<!-- eslint-disable rule -->` or `<!-- eslint-disable -->` for the rest of problematic code * .js files in doc folder added to .eslintignore * update Makefile and vcbuild.bat 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/api/console.md')
-rw-r--r--doc/api/console.md5
1 files changed, 3 insertions, 2 deletions
diff --git a/doc/api/console.md b/doc/api/console.md
index 900a7aa9c1..1fc034e4f8 100644
--- a/doc/api/console.md
+++ b/doc/api/console.md
@@ -135,6 +135,7 @@ by extending Node.js' `console` and overriding the `console.assert()` method.
In the following example, a simple module is created that extends and overrides
the default behavior of `console` in Node.js.
+<!-- eslint-disable func-name-matching -->
```js
'use strict';
@@ -142,7 +143,7 @@ the default behavior of `console` in Node.js.
// new impl for assert without monkey-patching.
const myConsole = Object.create(console, {
assert: {
- value(assertion, message, ...args) {
+ value: function assert(assertion, message, ...args) {
try {
console.assert(assertion, message, ...args);
} catch (err) {
@@ -276,7 +277,7 @@ prints the result to `stdout`:
```js
console.time('100-elements');
-for (let i = 0; i < 100; i++) ;
+for (let i = 0; i < 100; i++) {}
console.timeEnd('100-elements');
// prints 100-elements: 225.438ms
```