diff options
author | Vse Mozhet Byt <vsemozhetbyt@gmail.com> | 2017-04-21 22:55:51 +0300 |
---|---|---|
committer | Vse Mozhet Byt <vsemozhetbyt@gmail.com> | 2017-04-25 00:06:17 +0300 |
commit | b4fea2a3d62da5e2e3f90d7f2109f02f927f7174 (patch) | |
tree | d04d3b624c5bc153b56d926ec2b3fd82689e33cd /doc/api/modules.md | |
parent | e2c3e4727d5899a709f5c421e128a4af2ef626f3 (diff) | |
download | android-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/modules.md')
-rw-r--r-- | doc/api/modules.md | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/doc/api/modules.md b/doc/api/modules.md index 48a4d1f3cf..5f1cf96ebb 100644 --- a/doc/api/modules.md +++ b/doc/api/modules.md @@ -67,11 +67,7 @@ The module system is implemented in the `require('module')` module. When a file is run directly from Node.js, `require.main` is set to its `module`. That means that you can determine whether a file has been run -directly by testing - -```js -require.main === module; -``` +directly by testing `require.main === module`. For a file `foo.js`, this will be `true` if run via `node foo.js`, but `false` if run by `require('./foo')`. @@ -556,6 +552,7 @@ exports = { hello: false }; // Not exported, only available in the module When the `module.exports` property is being completely replaced by a new object, it is common to also reassign `exports`, for example: +<!-- eslint-disable func-name-matching --> ```js module.exports = exports = function Constructor() { // ... etc. |