Skip to content

Commit 50be885

Browse files
committed
tools: enable more remark-lint rules
New rules: 1. rule-style 2. strong-marker 3. no-shell-dollars 4. no-inline-padding 5. code-block-style 6. no-multiple-toplevel-headings Fixes to the existing files applied. PR-URL: nodejs#8708 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Ilkka Myller <[email protected]> Reviewed-By: Johan Bergström <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent d196c5d commit 50be885

18 files changed

+154
-144
lines changed

.remarkrc

+6-6
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"blockquote-indentation": 2,
55
"checkbox-character-style": { "checked": "x", "unchecked": " " },
66
"checkbox-content-indent": true,
7-
"code-block-style": false,
7+
"code-block-style": "fenced",
88
"definition-case": false,
99
"definition-spacing": true,
1010
"emphasis-marker": false,
@@ -39,11 +39,11 @@
3939
"no-heading-indent": true,
4040
"no-heading-punctuation": false,
4141
"no-html": false,
42-
"no-inline-padding": false,
42+
"no-inline-padding": true,
4343
"no-literal-urls": false,
4444
"no-missing-blank-lines": false,
45-
"no-multiple-toplevel-headings": false,
46-
"no-shell-dollars": false,
45+
"no-multiple-toplevel-headings": true,
46+
"no-shell-dollars": true,
4747
"no-shortcut-reference-image": true,
4848
"no-shortcut-reference-link": false,
4949
"no-table-indentation": true,
@@ -52,8 +52,8 @@
5252
"no-unused-definitions": true,
5353
"ordered-list-marker-style": false,
5454
"ordered-list-marker-value": false,
55-
"rule-style": false,
56-
"strong-marker": false,
55+
"rule-style": true,
56+
"strong-marker": "*",
5757
"table-cell-padding": "padded",
5858
"table-pipe-alignment": false,
5959
"table-pipes": true,

ROADMAP.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ In order for Node.js to stay competitive we need to work on the next generation
3838

3939
While this constitutes a great leap forward for the platform we will be making this leap without breaking backwards compatibility with the existing ecosystem of modules.
4040

41-
# Immediate Priorities
41+
## Immediate Priorities
4242

43-
## Debugging and Tracing
43+
### Debugging and Tracing
4444

4545
Debugging is one of the first things from everyone's mouth, both developer and enterprise, when describing trouble they've had with Node.js.
4646

@@ -55,7 +55,7 @@ The [Tracing WG](https://github.com/nodejs/tracing-wg) is driving this effort:
5555
* [Unify the Tracing endpoint](https://github.com/nodejs/node/issues/729).
5656
* New Chrome Debugger - Google is working on a version of Chrome's debugger that is without Chrome and can be used with Node.js.
5757

58-
## Ecosystem Automation
58+
### Ecosystem Automation
5959

6060
In order to maintain a good release cadence without harming compatibility we must do a better job of understanding exactly what impact a particular change or release will have on the ecosystem. This requires new automation.
6161

@@ -65,19 +65,19 @@ The initial goals for this automation are relatively simple but will create a ba
6565
* Produce a list of modules that use a particular core API.
6666
* Produce detailed code coverage data for the tests in core.
6767

68-
## Improve Installation and Upgrades
68+
### Improve Installation and Upgrades
6969

7070
* Host and maintain registry endpoints (Homebrew, apt, etc).
7171
* Document installation and upgrade procedures with an emphasis on using nvm or nave for development and our registry endpoints for traditional package managers and production.
7272

73-
## Streams
73+
### Streams
7474

7575
* Fix all existing compatibility issues.
7676
* Simplify stream creation to avoid user error.
7777
* Explore and identify compatibility issues with [WHATWG Streams](https://github.com/whatwg/streams).
7878
* Improve stream performance.
7979

80-
## Internationalization / Localization
80+
### Internationalization / Localization
8181

8282
* Build documentation tooling with localization support built in.
8383
* Reduce size of ICU and ship with it by default.

doc/api/addons.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ filename to the `sources` array. For example:
243243
Once the `binding.gyp` file is ready, the example Addons can be configured and
244244
built using `node-gyp`:
245245

246-
```sh
246+
```console
247247
$ node-gyp configure build
248248
```
249249

doc/api/debugger.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ localhost:5858
181181

182182
## V8 Inspector Integration for Node.js
183183

184-
__NOTE: This is an experimental feature.__
184+
**NOTE: This is an experimental feature.**
185185

186186
V8 Inspector integration allows attaching Chrome DevTools to Node.js
187187
instances for debugging and profiling.

doc/api/dns.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ The `dns` module contains functions belonging to two different categories:
66

77
1) Functions that use the underlying operating system facilities to perform
88
name resolution, and that do not necessarily perform any network communication.
9-
This category contains only one function: [`dns.lookup()`][]. __Developers
9+
This category contains only one function: [`dns.lookup()`][]. **Developers
1010
looking to perform name resolution in the same way that other applications on
11-
the same operating system behave should use [`dns.lookup()`][].__
11+
the same operating system behave should use [`dns.lookup()`][].**
1212

1313
For example, looking up `nodejs.org`.
1414

doc/api/net.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -207,8 +207,10 @@ persist*, they are removed when the last reference to them is closed. Do not
207207
forget JavaScript string escaping requires paths to be specified with
208208
double-backslashes, such as:
209209

210-
net.createServer().listen(
211-
path.join('\\\\?\\pipe', process.cwd(), 'myctl'))
210+
```js
211+
net.createServer().listen(
212+
path.join('\\\\?\\pipe', process.cwd(), 'myctl'))
213+
```
212214

213215
The parameter `backlog` behaves the same as in
214216
[`server.listen([port][, hostname][, backlog][, callback])`][`server.listen(port, host, backlog, callback)`].
@@ -363,7 +365,7 @@ Emitted when data is received. The argument `data` will be a `Buffer` or
363365
`String`. Encoding of data is set by `socket.setEncoding()`.
364366
(See the [Readable Stream][] section for more information.)
365367

366-
Note that the __data will be lost__ if there is no listener when a `Socket`
368+
Note that the **data will be lost** if there is no listener when a `Socket`
367369
emits a `'data'` event.
368370

369371
### Event: 'drain'

doc/api/process.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ process.argv.forEach((val, index) => {
478478

479479
Launching the Node.js process as:
480480

481-
```sh
481+
```console
482482
$ node process-2.js one two=three four
483483
```
484484

@@ -500,7 +500,7 @@ added: 6.4.0
500500
The `process.argv0` property stores a read-only copy of the original value of
501501
`argv[0]` passed when Node.js starts.
502502

503-
```js
503+
```console
504504
$ bash -c 'exec -a customArgv0 ./node'
505505
> process.argv[0]
506506
'/Volumes/code/external/node/out/Release/node'
@@ -672,7 +672,7 @@ It is possible to modify this object, but such modifications will not be
672672
reflected outside the Node.js process. In other words, the following example
673673
would not work:
674674

675-
```sh
675+
```console
676676
$ node -e 'process.env.foo = "bar"' && echo $foo
677677
```
678678

@@ -811,7 +811,7 @@ the same execution environment as the parent.
811811

812812
For example:
813813

814-
```sh
814+
```console
815815
$ node --harmony script.js --version
816816
```
817817

@@ -1461,7 +1461,7 @@ in several ways:
14611461
3. Writes _can_ block when output is redirected to a file.
14621462
- Note that disks are fast and operating systems normally employ write-back
14631463
caching so this is very uncommon.
1464-
4. Writes on UNIX __will__ block by default if output is going to a TTY
1464+
4. Writes on UNIX **will** block by default if output is going to a TTY
14651465
(a terminal).
14661466
5. Windows functionality differs. Writes block except when output is going to a
14671467
TTY.
@@ -1519,7 +1519,7 @@ in several ways:
15191519
3. Writes _can_ block when output is redirected to a file.
15201520
- Note that disks are fast and operating systems normally employ write-back
15211521
caching so this is very uncommon.
1522-
4. Writes on UNIX __will__ block by default if output is going to a TTY
1522+
4. Writes on UNIX **will** block by default if output is going to a TTY
15231523
(a terminal).
15241524
5. Windows functionality differs. Writes block except when output is going to a
15251525
TTY.
@@ -1537,7 +1537,7 @@ To check if Node.js is being run in a [TTY][] context, check the `isTTY`
15371537
property on `process.stderr`, `process.stdout`, or `process.stdin`.
15381538

15391539
For instance:
1540-
```sh
1540+
```console
15411541
$ node -p "Boolean(process.stdin.isTTY)"
15421542
true
15431543
$ echo "foo" | node -p "Boolean(process.stdin.isTTY)"

doc/api/util.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -626,7 +626,7 @@ deprecated: v4.0.0
626626
627627
* `object` {any}
628628

629-
Returns `true` if the given `object` is strictly an `Object` __and__ not a
629+
Returns `true` if the given `object` is strictly an `Object` **and** not a
630630
`Function`. Otherwise, returns `false`.
631631

632632
```js

doc/changelogs/CHANGELOG_ARCHIVE.md

+5-4
Original file line numberDiff line numberDiff line change
@@ -2175,7 +2175,7 @@ https://github.com/nodejs/node/commit/cfba1f59224ff8602c3fe9145181cad4c6df89a9
21752175
--use-http1
21762176

21772177
* Fixes https host header default port handling. (Mikeal Rogers)
2178-
* [#1440](https://github.com/joyent/node/issues/1440) strip byte order marker when loading *.js and *.json files
2178+
* [#1440](https://github.com/joyent/node/issues/1440) strip byte order marker when loading `*.js` and `*.json` files
21792179
(Ben Noordhuis)
21802180

21812181
* [#1434](https://github.com/joyent/node/issues/1434) Improve util.format() compatibility with browser. (Koichi Kobayashi)
@@ -3089,8 +3089,9 @@ https://github.com/nodejs/node/commit/61c801413544a50000faa7f58376e9b33ba6254f
30893089

30903090
https://github.com/nodejs/node/commit/39b63dfe1737d46a8c8818c92773ef181fd174b3
30913091

3092-
* API: - Move process.watchFile into fs module
3093-
- Move process.inherits to sys
3092+
* API:
3093+
- Move process.watchFile into fs module
3094+
- Move process.inherits to sys
30943095

30953096
* Improve Solaris port
30963097
* tcp.Connection.prototype.write now returns boolean to indicate if
@@ -3424,7 +3425,7 @@ https://github.com/nodejs/node/commit/726865af7bbafe58435986f4a193ff11c84e4bfe
34243425
- __module becomes module
34253426

34263427
* API: Many namespacing changes
3427-
- Move node.* into process.*
3428+
- Move node.\* into process.\*
34283429
- Move node.dns into module "dns"
34293430
- Move node.fs into module "posix"
34303431
- process is no longer the global object. GLOBAL is.

doc/changelogs/CHANGELOG_V4.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -1486,11 +1486,11 @@ Maintenance update.
14861486

14871487
* Roughly 78% of the commits are documentation and test improvements
14881488
* **domains**:
1489-
** Fix handling of uncaught exceptions (Julien Gilli) [#3884](https://github.com/nodejs/node/pull/3884)
1489+
* Fix handling of uncaught exceptions (Julien Gilli) [#3884](https://github.com/nodejs/node/pull/3884)
14901490
* **deps**:
1491-
** Upgrade to npm 2.14.12 (Kat Marchán) [#4110](https://github.com/nodejs/node/pull/4110)
1492-
** Backport 819b40a from V8 upstream (Michaël Zasso) [#3938](https://github.com/nodejs/node/pull/3938)
1493-
** Updated node LICENSE file with new npm license (Kat Marchán) [#4110](https://github.com/nodejs/node/pull/4110)
1491+
* Upgrade to npm 2.14.12 (Kat Marchán) [#4110](https://github.com/nodejs/node/pull/4110)
1492+
* Backport 819b40a from V8 upstream (Michaël Zasso) [#3938](https://github.com/nodejs/node/pull/3938)
1493+
* Updated node LICENSE file with new npm license (Kat Marchán) [#4110](https://github.com/nodejs/node/pull/4110)
14941494

14951495
### Known issues
14961496

@@ -1590,7 +1590,7 @@ Maintenance update.
15901590
* [[`fe3ae3cea4`](https://github.com/nodejs/node/commit/fe3ae3cea4)] - **doc**: add LTS info to COLLABORATOR_GUIDE.md (Myles Borins) [#3442](https://github.com/nodejs/node/pull/3442)
15911591
* [[`daa10a345e`](https://github.com/nodejs/node/commit/daa10a345e)] - **doc**: typo fix in readme.md (Sam P Gallagher-Bishop) [#3649](https://github.com/nodejs/node/pull/3649)
15921592
* [[`eca5720761`](https://github.com/nodejs/node/commit/eca5720761)] - **doc**: fix wrong date and known issue in changelog.md (James M Snell) [#3650](https://github.com/nodejs/node/pull/3650)
1593-
* [[`83494f8f3e`](https://github.com/nodejs/node/commit/83494f8f3e)] - **doc**: rename iojs-* groups to nodejs-* (Steven R. Loomis) [#3634](https://github.com/nodejs/node/pull/3634)
1593+
* [[`83494f8f3e`](https://github.com/nodejs/node/commit/83494f8f3e)] - **doc**: rename iojs-\* groups to nodejs-\* (Steven R. Loomis) [#3634](https://github.com/nodejs/node/pull/3634)
15941594
* [[`347fb65aee`](https://github.com/nodejs/node/commit/347fb65aee)] - **doc**: fix crypto spkac function descriptions (Jason Gerfen) [#3614](https://github.com/nodejs/node/pull/3614)
15951595
* [[`11d2050d63`](https://github.com/nodejs/node/commit/11d2050d63)] - **doc**: Updated streams simplified constructor API (Tom Gallacher) [#3602](https://github.com/nodejs/node/pull/3602)
15961596
* [[`6db4392bfb`](https://github.com/nodejs/node/commit/6db4392bfb)] - **doc**: made code spans more visible in the API docs (phijohns) [#3573](https://github.com/nodejs/node/pull/3573)

doc/changelogs/CHANGELOG_V5.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1499,7 +1499,7 @@ This is an important security release. All Node.js users should consult the secu
14991499
* [[`b14d9c5f16`](https://github.com/nodejs/node/commit/b14d9c5f16)] - **doc**: add method links in events.markdown (Alejandro Oviedo) [#3187](https://github.com/nodejs/node/pull/3187)
15001500
* [[`44f779b112`](https://github.com/nodejs/node/commit/44f779b112)] - **doc**: add caveats of algs and key size in crypto (Shigeki Ohtsu) [#3479](https://github.com/nodejs/node/pull/3479)
15011501
* [[`a0db5fb355`](https://github.com/nodejs/node/commit/a0db5fb355)] - **doc**: stdout/stderr can block when directed to file (Ben Noordhuis) [#3170](https://github.com/nodejs/node/pull/3170)
1502-
* [[`409f29972e`](https://github.com/nodejs/node/commit/409f29972e)] - **doc**: rename iojs-* groups to nodejs-* (Steven R. Loomis) [#3634](https://github.com/nodejs/node/pull/3634)
1502+
* [[`409f29972e`](https://github.com/nodejs/node/commit/409f29972e)] - **doc**: rename iojs-\* groups to nodejs-\* (Steven R. Loomis) [#3634](https://github.com/nodejs/node/pull/3634)
15031503
* [[`801866280e`](https://github.com/nodejs/node/commit/801866280e)] - **doc**: fix wrong date and known issue in changelog.md (James M Snell) [#3650](https://github.com/nodejs/node/pull/3650)
15041504
* [[`325c4c7af5`](https://github.com/nodejs/node/commit/325c4c7af5)] - **doc**: fix function param order in assert doc (David Woods) [#3533](https://github.com/nodejs/node/pull/3533)
15051505
* [[`045e04e531`](https://github.com/nodejs/node/commit/045e04e531)] - **doc**: typo fix in readme.md (Sam P Gallagher-Bishop) [#3649](https://github.com/nodejs/node/pull/3649)

doc/ctc-meetings/2016-06-15.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ Extracted from **ctc-agenda** labelled issues and pull requests from the **nodej
4242
* some issue/PRs reviews
4343

4444
* Chris Dickinson @chrisdickinson (CTC)
45-
* NodeConf
46-
* modules.guide
45+
* NodeConf
46+
* modules.guide
4747

4848
* Evan Lucas @evanlucas (CTC)
4949
* Preparing for security release

doc/guides/timers-in-node.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ console.log('after immediate');
8282
The above function passed to `setImmediate()` will execute after all runnable
8383
code has executed, and the console output will be:
8484

85-
```shell
85+
```console
8686
before immediate
8787
after immediate
8888
executing immediate: so immediate

doc/releases.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ A SHASUMS256.txt file is produced for every promoted build, nightly, and release
3434

3535
The GPG keys should be fetchable from a known third-party keyserver. The SKS Keyservers at <https://sks-keyservers.net> are recommended. Use the [submission](https://sks-keyservers.net/i/#submit) form to submit a new GPG key. Keys should be fetchable via:
3636

37-
```sh
37+
```console
3838
$ gpg --keyserver pool.sks-keyservers.net --recv-keys <FINGERPRINT>
3939
```
4040

@@ -55,7 +55,7 @@ Create a new branch named _"vx.y.z-proposal"_, or something similar. Using `git
5555

5656
For a list of commits that could be landed in a patch release on v5.x
5757

58-
```sh
58+
```console
5959
$ branch-diff v5.x master --exclude-label=semver-major,semver-minor,dont-land-on-v5.x --filter-release --format=simple
6060
```
6161

@@ -94,13 +94,13 @@ The general rule is to bump this version when there are _breaking ABI_ changes a
9494

9595
Collect a formatted list of commits since the last release. Use [`changelog-maker`](https://github.com/rvagg/changelog-maker) to do this.
9696

97-
```sh
97+
```console
9898
$ changelog-maker --group
9999
```
100100

101101
Note that changelog-maker counts commits since the last tag and if the last tag in the repository was not on the current branch you may have to supply a `--start-ref` argument:
102102

103-
```sh
103+
```console
104104
$ changelog-maker --group --start-ref v2.3.1
105105
```
106106

@@ -224,15 +224,15 @@ $ npm install -g git-secure-tag
224224

225225
Create a tag using the following command:
226226

227-
```sh
227+
```console
228228
$ git secure-tag <vx.y.z> <commit-sha> -sm 'YYYY-MM-DD Node.js vx.y.z (Release Type) Release'
229229
```
230230

231231
The tag **must** be signed using the GPG key that's listed for you on the project README.
232232

233233
Push the tag to the repo before you promote the builds. If you haven't pushed your tag first, then build promotion won't work properly. Push the tag using the following command:
234234

235-
```sh
235+
```console
236236
$ git push <remote> <vx.y.z>
237237
```
238238

0 commit comments

Comments
 (0)