Skip to content

Commit 26e97a1

Browse files
estrada9166targos
authored andcommitted
doc: add new documentation rule
Add 80 characters limit to docs. Change docs to fit 80 characters per row. Backport-PR-URL: #19189 PR-URL: #18726 Fixes: #18703 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Anatoli Papirovski <[email protected]>
1 parent ed55386 commit 26e97a1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+326
-243
lines changed

BUILDING.md

+8-6
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ Support is divided into three tiers:
3434
### Supported platforms
3535

3636
The community does not build or test against end-of-life distributions (EoL).
37-
Thus we do not recommend that you use Node on end-of-life or unsupported platforms
38-
in production.
37+
Thus we do not recommend that you use Node on end-of-life or unsupported
38+
platforms in production.
3939

4040
| System | Support type | Version | Architectures | Notes |
4141
|--------------|--------------|----------------------------------|----------------------|------------------|
@@ -108,9 +108,11 @@ installed, you can find them under the menu `Xcode -> Open Developer Tool ->
108108
More Developer Tools...`. This step will install `clang`, `clang++`, and
109109
`make`.
110110
* After building, you may want to setup [firewall rules](tools/macosx-firewall.sh)
111-
to avoid popups asking to accept incoming network connections when running tests:
111+
to avoid popups asking to accept incoming network connections when running
112+
tests:
112113

113-
If the path to your build directory contains a space, the build will likely fail.
114+
If the path to your build directory contains a space, the build will likely
115+
fail.
114116

115117
```console
116118
$ sudo ./tools/macosx-firewall.sh
@@ -233,8 +235,8 @@ Prerequisites:
233235
* **Optional** (to build the MSI): the [WiX Toolset v3.11](http://wixtoolset.org/releases/)
234236
and the [Wix Toolset Visual Studio 2017 Extension](https://marketplace.visualstudio.com/items?itemName=RobMensching.WixToolsetVisualStudio2017Extension).
235237

236-
If the path to your build directory contains a space or a non-ASCII character, the
237-
build will likely fail.
238+
If the path to your build directory contains a space or a non-ASCII character,
239+
the build will likely fail.
238240

239241
```console
240242
> .\vcbuild

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Node.js Changelog
22

3+
<!--lint disable maximum-line-length-->
4+
35
To make the changelog easier to both use and manage, it has been split into
46
multiple files organized according to significant major and minor Node.js
57
release lines.

COLLABORATOR_GUIDE.md

+16-14
Original file line numberDiff line numberDiff line change
@@ -199,22 +199,23 @@ status indicator if possible.
199199
#### Useful CI Jobs
200200

201201
* [`node-test-pull-request`](https://ci.nodejs.org/job/node-test-pull-request/)
202-
is the standard CI run we do to check Pull Requests. It triggers `node-test-commit`,
203-
which runs the `build-ci` and `test-ci` targets on all supported platforms.
202+
is the standard CI run we do to check Pull Requests. It triggers
203+
`node-test-commit`, which runs the `build-ci` and `test-ci` targets on all
204+
supported platforms.
204205

205206
* [`node-test-linter`](https://ci.nodejs.org/job/node-test-linter/)
206-
only runs the linter targets, which is useful for changes that only affect comments
207-
or documentation.
207+
only runs the linter targets, which is useful for changes that only affect
208+
comments or documentation.
208209

209210
* [`node-test-pull-request-lite`](https://ci.nodejs.org/job/node-test-pull-request-lite/)
210-
only runs the linter job, as well as the tests on LinuxONE. Should only be used for
211-
trivial changes that do not require being tested on all platforms.
211+
only runs the linter job, as well as the tests on LinuxONE. Should only be used
212+
for trivial changes that do not require being tested on all platforms.
212213

213214
* [`citgm-smoker`](https://ci.nodejs.org/job/citgm-smoker/)
214-
uses [`CitGM`](https://github.com/nodejs/citgm) to allow you to run `npm install && npm test`
215-
on a large selection of common modules. This is useful to check whether a
216-
change will cause breakage in the ecosystem. To test Node.js ABI changes
217-
you can run [`citgm-abi-smoker`](https://ci.nodejs.org/job/citgm-abi-smoker/).
215+
uses [`CitGM`](https://github.com/nodejs/citgm) to allow you to run `npm
216+
install && npm test` on a large selection of common modules. This is useful to
217+
check whether a change will cause breakage in the ecosystem. To test Node.js
218+
ABI changes you can run [`citgm-abi-smoker`](https://ci.nodejs.org/job/citgm-abi-smoker/).
218219

219220
* [`node-stress-single-test`](https://ci.nodejs.org/job/node-stress-single-test/)
220221
is designed to allow one to run a group of tests over and over on a specific
@@ -554,17 +555,18 @@ Apply external patches:
554555
$ curl -L https://github.com/nodejs/node/pull/xxx.patch | git am --whitespace=fix
555556
```
556557

557-
If the merge fails even though recent CI runs were successful, then a 3-way merge may
558-
be required. In this case try:
558+
If the merge fails even though recent CI runs were successful, then a 3-way
559+
merge may be required. In this case try:
559560

560561
```text
561562
$ git am --abort
562563
$ curl -L https://github.com/nodejs/node/pull/xxx.patch | git am -3 --whitespace=fix
563564
```
564565
If the 3-way merge succeeds you can proceed, but make sure to check the changes
565566
against the original PR carefully and build/test on at least one platform
566-
before landing. If the 3-way merge fails, then it is most likely that a conflicting
567-
PR has landed since the CI run and you will have to ask the author to rebase.
567+
before landing. If the 3-way merge fails, then it is most likely that a
568+
conflicting PR has landed since the CI run and you will have to ask the author
569+
to rebase.
568570

569571
Check and re-review the changes:
570572

GOVERNANCE.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -159,9 +159,9 @@ repository, with a summary of the nominee's contributions, for example:
159159
* Participation in other projects, teams, and working groups of the
160160
Node.js organization
161161
* Can be shown using the links
162-
`https://github.com/search?q=author%3A${GITHUB_ID}++org%3Anodejs&type=Issues`
163-
and
164-
`https://github.com/search?q=commenter%3A${GITHUB_ID}++org%3Anodejs&type=Issues`
162+
`https://github.com/search?q=author%3A${GITHUB_ID}++org%3Anodejs&type=Issues`
163+
and
164+
`https://github.com/search?q=commenter%3A${GITHUB_ID}++org%3Anodejs&type=Issues`
165165
* Other participation in the wider Node.js community
166166

167167
Mention @nodejs/collaborators in the issue to notify other Collaborators about

README.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
<p align="center">
22
<a href="https://nodejs.org/">
3-
<img alt="Node.js" src="https://nodejs.org/static/images/logo-light.svg" width="400"/>
3+
<img
4+
alt="Node.js"
5+
src="https://nodejs.org/static/images/logo-light.svg"
6+
width="400"
7+
/>
48
</a>
59
</p>
610

doc/api/_toc.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
@// NB(chrisdickinson): if you move this file, be sure to update tools/doc/html.js to
2-
@// point at the new location.
1+
@// NB(chrisdickinson): if you move this file, be sure to update
32
@// tools/doc/html.js to point at the new location.
43

54
<!--introduced_in=v0.10.0-->

doc/api/assert.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ changes:
2525
description: Added strict mode to the assert module.
2626
-->
2727

28-
When using the `strict mode`, any `assert` function will use the equality used in
29-
the strict function mode. So [`assert.deepEqual()`][] will, for example, work the
30-
same as [`assert.deepStrictEqual()`][].
28+
When using the `strict mode`, any `assert` function will use the equality used
29+
in the strict function mode. So [`assert.deepEqual()`][] will, for example,
30+
work the same as [`assert.deepStrictEqual()`][].
3131

3232
On top of that, error messages which involve objects produce an error diff
3333
instead of displaying both objects. That is not the case for the legacy mode.
@@ -209,8 +209,8 @@ changes:
209209
- version: v9.0.0
210210
pr-url: https://github.com/nodejs/node/pull/15036
211211
description: NaN is now compared using the
212-
[SameValueZero](https://tc39.github.io/ecma262/#sec-samevaluezero)
213-
comparison.
212+
[SameValueZero](https://tc39.github.io/ecma262/#sec-samevaluezero)
213+
comparison.
214214
- version: v8.5.0
215215
pr-url: https://github.com/nodejs/node/pull/15001
216216
description: Error names and messages are now properly compared
@@ -595,8 +595,8 @@ changes:
595595
- version: v9.0.0
596596
pr-url: https://github.com/nodejs/node/pull/15036
597597
description: NaN is now compared using the
598-
[SameValueZero](https://tc39.github.io/ecma262/#sec-samevaluezero)
599-
comparison.
598+
[SameValueZero](https://tc39.github.io/ecma262/#sec-samevaluezero)
599+
comparison.
600600
- version: v9.0.0
601601
pr-url: https://github.com/nodejs/node/pull/15001
602602
description: Error names and messages are now properly compared

doc/api/async_hooks.md

+10-10
Original file line numberDiff line numberDiff line change
@@ -206,8 +206,8 @@ instance is destroyed.
206206
* `type` {string} The type of the async resource.
207207
* `triggerAsyncId` {number} The unique ID of the async resource in whose
208208
execution context this async resource was created.
209-
* `resource` {Object} Reference to the resource representing the async operation,
210-
needs to be released during _destroy_.
209+
* `resource` {Object} Reference to the resource representing the async
210+
operation, needs to be released during _destroy_.
211211

212212
Called when a class is constructed that has the _possibility_ to emit an
213213
asynchronous event. This _does not_ mean the instance must call
@@ -283,11 +283,11 @@ The `TCPSERVERWRAP` is the server which receives the connections.
283283

284284
The `TCPWRAP` is the new connection from the client. When a new
285285
connection is made the `TCPWrap` instance is immediately constructed. This
286-
happens outside of any JavaScript stack (side note: a `executionAsyncId()` of `0`
287-
means it's being executed from C++, with no JavaScript stack above it).
286+
happens outside of any JavaScript stack (side note: a `executionAsyncId()` of
287+
`0` means it's being executed from C++, with no JavaScript stack above it).
288288
With only that information, it would be impossible to link resources together in
289-
terms of what caused them to be created, so `triggerAsyncId` is given the task of
290-
propagating what resource is responsible for the new resource's existence.
289+
terms of what caused them to be created, so `triggerAsyncId` is given the task
290+
of propagating what resource is responsible for the new resource's existence.
291291

292292
###### `resource`
293293

@@ -582,8 +582,8 @@ the details of the V8 [PromiseHooks][] API.
582582
## JavaScript Embedder API
583583

584584
Library developers that handle their own asynchronous resources performing tasks
585-
like I/O, connection pooling, or managing callback queues may use the `AsyncWrap`
586-
JavaScript API so that all the appropriate callbacks are called.
585+
like I/O, connection pooling, or managing callback queues may use the
586+
`AsyncWrap` JavaScript API so that all the appropriate callbacks are called.
587587

588588
### `class AsyncResource()`
589589

@@ -728,8 +728,8 @@ never be called.
728728

729729
#### `asyncResource.triggerAsyncId()`
730730

731-
* Returns: {number} The same `triggerAsyncId` that is passed to the `AsyncResource`
732-
constructor.
731+
* Returns: {number} The same `triggerAsyncId` that is passed to the
732+
`AsyncResource` constructor.
733733

734734
[`after` callback]: #async_hooks_after_asyncid
735735
[`asyncResource.runInAsyncScope()`]: #async_hooks_asyncresource_runinasyncscope_fn_thisarg_args

doc/api/buffer.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Buffer
22

33
<!--introduced_in=v0.10.0-->
4+
<!--lint disable maximum-line-length-->
45

56
> Stability: 2 - Stable
67

doc/api/child_process.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Child Process
22

33
<!--introduced_in=v0.10.0-->
4+
<!--lint disable maximum-line-length-->
45

56
> Stability: 2 - Stable
67

doc/api/cluster.md

+9-8
Original file line numberDiff line numberDiff line change
@@ -269,8 +269,8 @@ changes:
269269

270270
* Returns: {cluster.Worker} A reference to `worker`.
271271

272-
In a worker, this function will close all servers, wait for the `'close'` event on
273-
those servers, and then disconnect the IPC channel.
272+
In a worker, this function will close all servers, wait for the `'close'` event
273+
on those servers, and then disconnect the IPC channel.
274274

275275
In the master, an internal message is sent to the worker causing it to call
276276
`.disconnect()` on itself.
@@ -280,8 +280,8 @@ Causes `.exitedAfterDisconnect` to be set.
280280
Note that after a server is closed, it will no longer accept new connections,
281281
but connections may be accepted by any other listening worker. Existing
282282
connections will be allowed to close as usual. When no more connections exist,
283-
see [`server.close()`][], the IPC channel to the worker will close allowing it to
284-
die gracefully.
283+
see [`server.close()`][], the IPC channel to the worker will close allowing it
284+
to die gracefully.
285285

286286
The above applies *only* to server connections, client connections are not
287287
automatically closed by workers, and disconnect does not wait for them to close
@@ -465,9 +465,9 @@ Emitted after the worker IPC channel has disconnected. This can occur when a
465465
worker exits gracefully, is killed, or is disconnected manually (such as with
466466
worker.disconnect()).
467467

468-
There may be a delay between the `'disconnect'` and `'exit'` events. These events
469-
can be used to detect if the process is stuck in a cleanup or if there are
470-
long-living connections.
468+
There may be a delay between the `'disconnect'` and `'exit'` events. These
469+
events can be used to detect if the process is stuck in a cleanup or if there
470+
are long-living connections.
471471

472472
```js
473473
cluster.on('disconnect', (worker) => {
@@ -639,7 +639,8 @@ Calls `.disconnect()` on each worker in `cluster.workers`.
639639
When they are disconnected all internal handles will be closed, allowing the
640640
master process to die gracefully if no other event is waiting.
641641

642-
The method takes an optional callback argument which will be called when finished.
642+
The method takes an optional callback argument which will be called when
643+
finished.
643644

644645
This can only be called from the master process.
645646

doc/api/console.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,8 @@ added: v8.0.0
449449
* `label` {string} Defaults to `'default'`.
450450

451451
This method does not display anything unless used in the inspector. The
452-
`console.markTimeline()` method is the deprecated form of [`console.timeStamp()`][].
452+
`console.markTimeline()` method is the deprecated form of
453+
[`console.timeStamp()`][].
453454

454455
### console.profile([label])
455456
<!-- YAML
@@ -514,7 +515,8 @@ added: v8.0.0
514515
* `label` {string} Defaults to `'default'`.
515516

516517
This method does not display anything unless used in the inspector. The
517-
`console.timelineEnd()` method is the deprecated form of [`console.timeEnd()`][].
518+
`console.timelineEnd()` method is the deprecated form of
519+
[`console.timeEnd()`][].
518520

519521
[`console.error()`]: #console_console_error_data_args
520522
[`console.group()`]: #console_console_group_label

doc/api/crypto.md

+8-5
Original file line numberDiff line numberDiff line change
@@ -1232,8 +1232,8 @@ become deprecated in a future Node.js release.
12321232
added: v6.0.0
12331233
-->
12341234

1235-
Property for checking and controlling whether a FIPS compliant crypto provider is
1236-
currently in use. Setting to true requires a FIPS build of Node.js.
1235+
Property for checking and controlling whether a FIPS compliant crypto provider
1236+
is currently in use. Setting to true requires a FIPS build of Node.js.
12371237

12381238
### crypto.createCipher(algorithm, password[, options])
12391239
<!-- YAML
@@ -1285,7 +1285,8 @@ changes:
12851285
- `options` {Object} [`stream.transform` options][]
12861286

12871287
Creates and returns a `Cipher` object, with the given `algorithm`, `key` and
1288-
initialization vector (`iv`). Optional `options` argument controls stream behavior.
1288+
initialization vector (`iv`). Optional `options` argument controls stream
1289+
behavior.
12891290

12901291
The `algorithm` is dependent on OpenSSL, examples are `'aes192'`, etc. On
12911292
recent OpenSSL releases, `openssl list-cipher-algorithms` will display the
@@ -1381,7 +1382,8 @@ changes:
13811382
-->
13821383
- `prime` {string | Buffer | TypedArray | DataView}
13831384
- `primeEncoding` {string}
1384-
- `generator` {number | string | Buffer | TypedArray | DataView} Defaults to `2`.
1385+
- `generator` {number | string | Buffer | TypedArray | DataView} Defaults to
1386+
`2`.
13851387
- `generatorEncoding` {string}
13861388

13871389
Creates a `DiffieHellman` key exchange object using the supplied `prime` and an
@@ -1404,7 +1406,8 @@ otherwise a number, [`Buffer`][], `TypedArray`, or `DataView` is expected.
14041406
added: v0.5.0
14051407
-->
14061408
- `primeLength` {number}
1407-
- `generator` {number | string | Buffer | TypedArray | DataView} Defaults to `2`.
1409+
- `generator` {number | string | Buffer | TypedArray | DataView} Defaults to
1410+
`2`.
14081411

14091412
Creates a `DiffieHellman` key exchange object and generates a prime of
14101413
`primeLength` bits using an optional specific numeric `generator`.

doc/api/debugger.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88

99
Node.js includes an out-of-process debugging utility accessible via a
1010
[V8 Inspector][] and built-in debugging client. To use it, start Node.js
11-
with the `inspect` argument followed by the path to the script to debug; a prompt
12-
will be displayed indicating successful launch of the debugger:
11+
with the `inspect` argument followed by the path to the script to debug; a
12+
prompt will be displayed indicating successful launch of the debugger:
1313

1414
```txt
1515
$ node inspect myscript.js
@@ -173,7 +173,8 @@ breakpoint)
173173
### V8 Inspector Integration for Node.js
174174

175175
V8 Inspector integration allows attaching Chrome DevTools to Node.js
176-
instances for debugging and profiling. It uses the [Chrome Debugging Protocol][].
176+
instances for debugging and profiling. It uses the
177+
[Chrome Debugging Protocol][].
177178

178179
V8 Inspector can be enabled by passing the `--inspect` flag when starting a
179180
Node.js application. It is also possible to supply a custom port with that flag,

doc/api/deprecations.md

+8-7
Original file line numberDiff line numberDiff line change
@@ -82,16 +82,16 @@ is strongly recommended:
8282

8383
* [`Buffer.alloc(size[, fill[, encoding]])`][alloc] - Create a `Buffer` with
8484
*initialized* memory.
85-
* [`Buffer.allocUnsafe(size)`][alloc_unsafe_size] - Create a `Buffer` with *uninitialized*
86-
memory.
85+
* [`Buffer.allocUnsafe(size)`][alloc_unsafe_size] - Create a `Buffer` with
86+
*uninitialized* memory.
8787
* [`Buffer.allocUnsafeSlow(size)`][] - Create a `Buffer` with *uninitialized*
8888
memory.
8989
* [`Buffer.from(array)`][] - Create a `Buffer` with a copy of `array`
90-
* [`Buffer.from(arrayBuffer[, byteOffset[, length]])`][from_arraybuffer] - Create a `Buffer`
91-
that wraps the given `arrayBuffer`.
90+
* [`Buffer.from(arrayBuffer[, byteOffset[, length]])`][from_arraybuffer] -
91+
Create a `Buffer` that wraps the given `arrayBuffer`.
9292
* [`Buffer.from(buffer)`][] - Create a `Buffer` that copies `buffer`.
93-
* [`Buffer.from(string[, encoding])`][from_string_encoding] - Create a `Buffer` that copies
94-
`string`.
93+
* [`Buffer.from(string[, encoding])`][from_string_encoding] - Create a `Buffer`
94+
that copies `string`.
9595

9696
<a id="DEP0006"></a>
9797
### DEP0006: child\_process options.customFds
@@ -699,7 +699,8 @@ Type: Runtime
699699
700700
`Module._debug()` has been deprecated.
701701
702-
The `Module._debug()` function was never documented as an officially supported API.
702+
The `Module._debug()` function was never documented as an officially supported
703+
API.
703704
704705
<a id="DEP0078"></a>
705706
### DEP0078: REPLServer.turnOffEditorMode()

0 commit comments

Comments
 (0)