Skip to content

Commit

Permalink
doc: add new documentation lint rule
Browse files Browse the repository at this point in the history
Add 80 characters limit to docs.
Change docs to fit 80 characters per row.

PR-URL: nodejs#18726
Fixes: nodejs#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]>
  • Loading branch information
estrada9166 authored and BridgeAR committed Feb 23, 2018
1 parent 3a19122 commit a29089d
Show file tree
Hide file tree
Showing 56 changed files with 351 additions and 252 deletions.
14 changes: 8 additions & 6 deletions BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ Support is divided into three tiers:
### Supported platforms

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

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

If the path to your build directory contains a space, the build will likely fail.
If the path to your build directory contains a space, the build will likely
fail.

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

If the path to your build directory contains a space or a non-ASCII character, the
build will likely fail.
If the path to your build directory contains a space or a non-ASCII character,
the build will likely fail.

```console
> .\vcbuild
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Node.js Changelog

<!--lint disable maximum-line-length-->

To make the changelog easier to both use and manage, it has been split into
multiple files organized according to significant major and minor Node.js
release lines.
Expand Down
30 changes: 16 additions & 14 deletions COLLABORATOR_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,22 +154,23 @@ The pull request should have a CI status indicator if possible.
#### Useful CI Jobs

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

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

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

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

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

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

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

Check and re-review the changes:

Expand Down
4 changes: 2 additions & 2 deletions GOVERNANCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,9 @@ repository, with a summary of the nominee's contributions, for example:
* Participation in other projects, teams, and working groups of the
Node.js organization
* Can be shown using the links
`https://github.com/search?q=author%3A${GITHUB_ID}++org%3Anodejs&type=Issues`
`https://github.com/search?q=author%3A${GITHUB_ID}++org%3Anodejs&type=Issues`
and
`https://github.com/search?q=commenter%3A${GITHUB_ID}++org%3Anodejs&type=Issues`
`https://github.com/search?q=commenter%3A${GITHUB_ID}++org%3Anodejs&type=Issues`
* Other participation in the wider Node.js community

Mention @nodejs/collaborators in the issue to notify other Collaborators about
Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
<p align="center">
<a href="https://nodejs.org/">
<img alt="Node.js" src="https://nodejs.org/static/images/logo-light.svg" width="400"/>
<img
alt="Node.js"
src="https://nodejs.org/static/images/logo-light.svg"
width="400"
/>
</a>
</p>

Expand Down
4 changes: 2 additions & 2 deletions doc/api/_toc.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@// NB(chrisdickinson): if you move this file, be sure to update tools/doc/html.js to
@// point at the new location.
@// NB(chrisdickinson): if you move this file, be sure to update
@// tools/doc/html.js to point at the new location.
* [About these Docs](documentation.html)
* [Usage & Example](synopsis.html)

Expand Down
14 changes: 7 additions & 7 deletions doc/api/assert.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ changes:
description: Added strict mode to the assert module.
-->

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

On top of that, error messages which involve objects produce an error diff
instead of displaying both objects. That is not the case for the legacy mode.
Expand Down Expand Up @@ -209,8 +209,8 @@ changes:
- version: v9.0.0
pr-url: https://github.com/nodejs/node/pull/15036
description: NaN is now compared using the
[SameValueZero](https://tc39.github.io/ecma262/#sec-samevaluezero)
comparison.
[SameValueZero](https://tc39.github.io/ecma262/#sec-samevaluezero)
comparison.
- version: v8.5.0
pr-url: https://github.com/nodejs/node/pull/15001
description: Error names and messages are now properly compared
Expand Down Expand Up @@ -621,8 +621,8 @@ changes:
- version: v9.0.0
pr-url: https://github.com/nodejs/node/pull/15036
description: NaN is now compared using the
[SameValueZero](https://tc39.github.io/ecma262/#sec-samevaluezero)
comparison.
[SameValueZero](https://tc39.github.io/ecma262/#sec-samevaluezero)
comparison.
- version: v9.0.0
pr-url: https://github.com/nodejs/node/pull/15001
description: Error names and messages are now properly compared
Expand Down
20 changes: 10 additions & 10 deletions doc/api/async_hooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,8 @@ instance is destroyed.
* `type` {string} The type of the async resource.
* `triggerAsyncId` {number} The unique ID of the async resource in whose
execution context this async resource was created.
* `resource` {Object} Reference to the resource representing the async operation,
needs to be released during _destroy_.
* `resource` {Object} Reference to the resource representing the async
operation, needs to be released during _destroy_.

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

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

###### `resource`

Expand Down Expand Up @@ -582,8 +582,8 @@ the details of the V8 [PromiseHooks][] API.
## JavaScript Embedder API

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

### `class AsyncResource()`

Expand Down Expand Up @@ -734,8 +734,8 @@ never be called.

#### `asyncResource.triggerAsyncId()`

* Returns: {number} The same `triggerAsyncId` that is passed to the `AsyncResource`
constructor.
* Returns: {number} The same `triggerAsyncId` that is passed to the
`AsyncResource` constructor.

[`after` callback]: #async_hooks_after_asyncid
[`asyncResource.runInAsyncScope()`]: #async_hooks_asyncresource_runinasyncscope_fn_thisarg_args
Expand Down
1 change: 1 addition & 0 deletions doc/api/buffer.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Buffer

<!--introduced_in=v0.10.0-->
<!--lint disable maximum-line-length-->

> Stability: 2 - Stable
Expand Down
1 change: 1 addition & 0 deletions doc/api/child_process.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Child Process

<!--introduced_in=v0.10.0-->
<!--lint disable maximum-line-length-->

> Stability: 2 - Stable
Expand Down
17 changes: 9 additions & 8 deletions doc/api/cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -269,8 +269,8 @@ changes:

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

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

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

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

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

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

The method takes an optional callback argument which will be called when finished.
The method takes an optional callback argument which will be called when
finished.

This can only be called from the master process.

Expand Down
6 changes: 4 additions & 2 deletions doc/api/console.md
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,8 @@ added: v8.0.0
* `label` {string} Defaults to `'default'`.

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

### console.profile([label])
<!-- YAML
Expand Down Expand Up @@ -476,7 +477,8 @@ added: v8.0.0
* `label` {string} Defaults to `'default'`.

This method does not display anything unless used in the inspector. The
`console.timelineEnd()` method is the deprecated form of [`console.timeEnd()`][].
`console.timelineEnd()` method is the deprecated form of
[`console.timeEnd()`][].

[`console.error()`]: #console_console_error_data_args
[`console.group()`]: #console_console_group_label
Expand Down
13 changes: 8 additions & 5 deletions doc/api/crypto.md
Original file line number Diff line number Diff line change
Expand Up @@ -1245,8 +1245,8 @@ added: v6.0.0
deprecated: REPLACEME
-->

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

This property is deprecated. Please use `crypto.setFips()` and
`crypto.getFips()` instead.
Expand Down Expand Up @@ -1301,7 +1301,8 @@ changes:
- `options` {Object} [`stream.transform` options][]

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

The `algorithm` is dependent on OpenSSL, examples are `'aes192'`, etc. On
recent OpenSSL releases, `openssl list-cipher-algorithms` will display the
Expand Down Expand Up @@ -1397,7 +1398,8 @@ changes:
-->
- `prime` {string | Buffer | TypedArray | DataView}
- `primeEncoding` {string}
- `generator` {number | string | Buffer | TypedArray | DataView} Defaults to `2`.
- `generator` {number | string | Buffer | TypedArray | DataView} Defaults to
`2`.
- `generatorEncoding` {string}

Creates a `DiffieHellman` key exchange object using the supplied `prime` and an
Expand All @@ -1420,7 +1422,8 @@ otherwise a number, [`Buffer`][], `TypedArray`, or `DataView` is expected.
added: v0.5.0
-->
- `primeLength` {number}
- `generator` {number | string | Buffer | TypedArray | DataView} Defaults to `2`.
- `generator` {number | string | Buffer | TypedArray | DataView} Defaults to
`2`.

Creates a `DiffieHellman` key exchange object and generates a prime of
`primeLength` bits using an optional specific numeric `generator`.
Expand Down
7 changes: 4 additions & 3 deletions doc/api/debugger.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

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

```txt
$ node inspect myscript.js
Expand Down Expand Up @@ -173,7 +173,8 @@ breakpoint)
### V8 Inspector Integration for Node.js

V8 Inspector integration allows attaching Chrome DevTools to Node.js
instances for debugging and profiling. It uses the [Chrome Debugging Protocol][].
instances for debugging and profiling. It uses the
[Chrome Debugging Protocol][].

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

0 comments on commit a29089d

Please sign in to comment.