From ee8fff0cfcc259ebdd30a49560fd7a4719d32656 Mon Sep 17 00:00:00 2001 From: Sam Ruby Date: Thu, 12 Jul 2018 13:28:42 -0400 Subject: [PATCH 1/3] doc: make markdown input compliant --- doc/api/crypto.md | 12 ++++---- doc/api/fs.md | 2 +- doc/api/http.md | 6 ++-- doc/api/os.md | 15 ++++----- doc/api/stream.md | 77 ++++------------------------------------------- 5 files changed, 24 insertions(+), 88 deletions(-) diff --git a/doc/api/crypto.md b/doc/api/crypto.md index ab33ff3a578d13..1389d7bfc068bb 100644 --- a/doc/api/crypto.md +++ b/doc/api/crypto.md @@ -2671,18 +2671,18 @@ the `crypto`, `tls`, and `https` modules and are generally specific to OpenSSL. RSA_PSS_SALTLEN_DIGEST - Sets the salt length for `RSA_PKCS1_PSS_PADDING` to the digest size - when signing or verifying. + Sets the salt length for RSA_PKCS1_PSS_PADDING to the + digest size when signing or verifying. RSA_PSS_SALTLEN_MAX_SIGN - Sets the salt length for `RSA_PKCS1_PSS_PADDING` to the maximum - permissible value when signing data. + Sets the salt length for RSA_PKCS1_PSS_PADDING to the + maximum permissible value when signing data. RSA_PSS_SALTLEN_AUTO - Causes the salt length for `RSA_PKCS1_PSS_PADDING` to be determined - automatically when verifying a signature. + Causes the salt length for RSA_PKCS1_PSS_PADDING to be + determined automatically when verifying a signature. POINT_CONVERSION_COMPRESSED diff --git a/doc/api/fs.md b/doc/api/fs.md index 3f19ccc3cd526b..bf22c793a8e4fb 100644 --- a/doc/api/fs.md +++ b/doc/api/fs.md @@ -4378,7 +4378,7 @@ The following constants are meant for use with `fs.open()`. O_NOATIME Flag indicating reading accesses to the file system will no longer - result in an update to the `atime` information associated with the file. + result in an update to the atime information associated with the file. This flag is available on Linux operating systems only. diff --git a/doc/api/http.md b/doc/api/http.md index 1776012f814c7f..4e06270109c877 100644 --- a/doc/api/http.md +++ b/doc/api/http.md @@ -1900,9 +1900,9 @@ changes: Authorization header. * `agent` {http.Agent | boolean} Controls [`Agent`][] behavior. Possible values: - * `undefined` (default): use [`http.globalAgent`][] for this host and port. - * `Agent` object: explicitly use the passed in `Agent`. - * `false`: causes a new `Agent` with default values to be used. + * `undefined` (default): use [`http.globalAgent`][] for this host and port. + * `Agent` object: explicitly use the passed in `Agent`. + * `false`: causes a new `Agent` with default values to be used. * `createConnection` {Function} A function that produces a socket/stream to use for the request when the `agent` option is not used. This can be used to avoid creating a custom `Agent` class just to override the default diff --git a/doc/api/os.md b/doc/api/os.md index 8db4904d29a489..b7bd246f97dbfd 100644 --- a/doc/api/os.md +++ b/doc/api/os.md @@ -442,7 +442,7 @@ The following signal constants are exported by `os.constants.signals`: SIGINT Sent to indicate when a user wishes to interrupt a process - (`(Ctrl+C)`). + ((Ctrl+C)). SIGQUIT @@ -855,9 +855,9 @@ The following error constants are exported by `os.constants.errno`: EOPNOTSUPP - Indicates that an operation is not supported on the socket. - Note that while `ENOTSUP` and `EOPNOTSUPP` have the same value on Linux, - according to POSIX.1 these error values should be distinct.) + Indicates that an operation is not supported on the socket. Note that + while ENOTSUP and EOPNOTSUPP have the same value + on Linux, according to POSIX.1 these error values should be distinct.) EOVERFLOW @@ -1114,7 +1114,8 @@ The following error codes are specific to the Windows operating system: WSAVERNOTSUPPORTED - Indicates that the `winsock.dll` version is out of range. + Indicates that the winsock.dll version is out of + range. WSANOTINITIALISED @@ -1197,8 +1198,8 @@ information. RTLD_LOCAL - The converse of `RTLD_GLOBAL`. This is the default behavior if neither - flag is specified. + The converse of RTLD_GLOBAL. This is the default behavior + if neither flag is specified. RTLD_DEEPBIND diff --git a/doc/api/stream.md b/doc/api/stream.md index 47d1154cc017b7..25f3f5486e5b30 100644 --- a/doc/api/stream.md +++ b/doc/api/stream.md @@ -1419,77 +1419,12 @@ class MyWritable extends Writable { The new stream class must then implement one or more specific methods, depending on the type of stream being created, as detailed in the chart below: - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

Use-case

-
-

Class

-
-

Method(s) to implement

-
-

Reading only

-
-

[`Readable`](#stream_class_stream_readable)

-
-

[_read][stream-_read]

-
-

Writing only

-
-

[`Writable`](#stream_class_stream_writable)

-
-

- [_write][stream-_write], - [_writev][stream-_writev], - [_final][stream-_final] -

-
-

Reading and writing

-
-

[`Duplex`](#stream_class_stream_duplex)

-
-

- [_read][stream-_read], - [_write][stream-_write], - [_writev][stream-_writev], - [_final][stream-_final]

-
-

Operate on written data, then read the result

-
-

[`Transform`](#stream_class_stream_transform)

-
-

- [_transform][stream-_transform], - [_flush][stream-_flush], - [_final][stream-_final] -

-
+| Use-case | Class | Method(s) to implement | +| -------- | ----- | ---------------------- | +| Reading only |[`Readable`](#stream_class_stream_readable) |[_read][stream-_read] | +|Writing only |[`Writable`](#stream_class_stream_writable) | [_write][stream-_write], [_writev][stream-_writev], [_final][stream-_final] | +| Reading and writing |[`Duplex`](#stream_class_stream_duplex) | [_read][stream-_read], [_write][stream-_write], [_writev][stream-_writev], [_final][stream-_final] | +| Operate on written data, then read the result |[`Transform`](#stream_class_stream_transform) | [_transform][stream-_transform], [_flush][stream-_flush], [_final][stream-_final] | The implementation code for a stream should *never* call the "public" methods of a stream that are intended for use by consumers (as described in the From 2e933dc1fadf13bdb496a47f6b40f14f50310002 Mon Sep 17 00:00:00 2001 From: Sam Ruby Date: Thu, 12 Jul 2018 19:56:20 -0400 Subject: [PATCH 2/3] find lint issues and address comment --- doc/api/fs.md | 4 ++-- doc/api/stream.md | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/api/fs.md b/doc/api/fs.md index bf22c793a8e4fb..2e3f18b448f058 100644 --- a/doc/api/fs.md +++ b/doc/api/fs.md @@ -4378,8 +4378,8 @@ The following constants are meant for use with `fs.open()`. O_NOATIME Flag indicating reading accesses to the file system will no longer - result in an update to the atime information associated with the file. - This flag is available on Linux operating systems only. + result in an update to the atime information associated with + the file. This flag is available on Linux operating systems only. O_NOFOLLOW diff --git a/doc/api/stream.md b/doc/api/stream.md index 25f3f5486e5b30..c3b87c5f29f67e 100644 --- a/doc/api/stream.md +++ b/doc/api/stream.md @@ -1421,10 +1421,10 @@ on the type of stream being created, as detailed in the chart below: | Use-case | Class | Method(s) to implement | | -------- | ----- | ---------------------- | -| Reading only |[`Readable`](#stream_class_stream_readable) |[_read][stream-_read] | -|Writing only |[`Writable`](#stream_class_stream_writable) | [_write][stream-_write], [_writev][stream-_writev], [_final][stream-_final] | -| Reading and writing |[`Duplex`](#stream_class_stream_duplex) | [_read][stream-_read], [_write][stream-_write], [_writev][stream-_writev], [_final][stream-_final] | -| Operate on written data, then read the result |[`Transform`](#stream_class_stream_transform) | [_transform][stream-_transform], [_flush][stream-_flush], [_final][stream-_final] | +| Reading only | [`Readable`](#stream_class_stream_readable) | [_read][stream-_read] | +| Writing only | [`Writable`](#stream_class_stream_writable) | [_write][stream-_write], [_writev][stream-_writev], [_final][stream-_final] | +| Reading and writing | [`Duplex`](#stream_class_stream_duplex) | [_read][stream-_read], [_write][stream-_write], [_writev][stream-_writev], [_final][stream-_final] | +| Operate on written data, then read the result | [`Transform`](#stream_class_stream_transform) | [_transform][stream-_transform], [_flush][stream-_flush], [_final][stream-_final] | The implementation code for a stream should *never* call the "public" methods of a stream that are intended for use by consumers (as described in the From 44ea288b3feafff1ba69ca88908aaad50793aaf6 Mon Sep 17 00:00:00 2001 From: Sam Ruby Date: Fri, 13 Jul 2018 20:40:32 -0700 Subject: [PATCH 3/3] avoid redeclaring already declared refs --- doc/api/stream.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/api/stream.md b/doc/api/stream.md index c3b87c5f29f67e..009332dd861aae 100644 --- a/doc/api/stream.md +++ b/doc/api/stream.md @@ -1421,10 +1421,10 @@ on the type of stream being created, as detailed in the chart below: | Use-case | Class | Method(s) to implement | | -------- | ----- | ---------------------- | -| Reading only | [`Readable`](#stream_class_stream_readable) | [_read][stream-_read] | -| Writing only | [`Writable`](#stream_class_stream_writable) | [_write][stream-_write], [_writev][stream-_writev], [_final][stream-_final] | -| Reading and writing | [`Duplex`](#stream_class_stream_duplex) | [_read][stream-_read], [_write][stream-_write], [_writev][stream-_writev], [_final][stream-_final] | -| Operate on written data, then read the result | [`Transform`](#stream_class_stream_transform) | [_transform][stream-_transform], [_flush][stream-_flush], [_final][stream-_final] | +| Reading only | [`Readable`] | [_read][stream-_read] | +| Writing only | [`Writable`] | [_write][stream-_write], [_writev][stream-_writev], [_final][stream-_final] | +| Reading and writing | [`Duplex`] | [_read][stream-_read], [_write][stream-_write], [_writev][stream-_writev], [_final][stream-_final] | +| Operate on written data, then read the result | [`Transform`] | [_transform][stream-_transform], [_flush][stream-_flush], [_final][stream-_final] | The implementation code for a stream should *never* call the "public" methods of a stream that are intended for use by consumers (as described in the