Skip to content

Commit

Permalink
doc: compact eslint directives in common/README
Browse files Browse the repository at this point in the history
Backport-PR-URL: #20456
PR-URL: #17971
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Khaidi Chu <i@2333.moe>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
  • Loading branch information
vsemozhetbyt authored and MylesBorins committed May 2, 2018
1 parent e9de5a9 commit 9404573
Showing 1 changed file with 8 additions and 32 deletions.
40 changes: 8 additions & 32 deletions test/common/README.md
Expand Up @@ -509,10 +509,7 @@ Returns the result of
The http2.js module provides a handful of utilities for creating mock HTTP/2
frames for testing of HTTP/2 endpoints

<!-- eslint-disable strict -->
<!-- eslint-disable required-modules -->
<!-- eslint-disable no-unused-vars -->
<!-- eslint-disable no-undef -->
<!-- eslint-disable no-undef, no-unused-vars, required-modules, strict -->
```js
const http2 = require('../common/http2');
```
Expand All @@ -522,10 +519,7 @@ const http2 = require('../common/http2');
The `http2.Frame` is a base class that creates a `Buffer` containing a
serialized HTTP/2 frame header.

<!-- eslint-disable strict -->
<!-- eslint-disable required-modules -->
<!-- eslint-disable no-unused-vars -->
<!-- eslint-disable no-undef -->
<!-- eslint-disable no-undef, no-unused-vars, required-modules, strict -->
```js
// length is a 24-bit unsigned integer
// type is an 8-bit unsigned integer identifying the frame type
Expand All @@ -544,10 +538,7 @@ The serialized `Buffer` may be retrieved using the `frame.data` property.
The `http2.DataFrame` is a subclass of `http2.Frame` that serializes a `DATA`
frame.

<!-- eslint-disable strict -->
<!-- eslint-disable required-modules -->
<!-- eslint-disable no-unused-vars -->
<!-- eslint-disable no-undef -->
<!-- eslint-disable no-undef, no-unused-vars, required-modules, strict -->
```js
// id is the 32-bit stream identifier
// payload is a Buffer containing the DATA payload
Expand All @@ -564,10 +555,7 @@ socket.write(frame.data);
The `http2.HeadersFrame` is a subclass of `http2.Frame` that serializes a
`HEADERS` frame.

<!-- eslint-disable strict -->
<!-- eslint-disable required-modules -->
<!-- eslint-disable no-unused-vars -->
<!-- eslint-disable no-undef -->
<!-- eslint-disable no-undef, no-unused-vars, required-modules, strict -->
```js
// id is the 32-bit stream identifier
// payload is a Buffer containing the HEADERS payload (see either
Expand All @@ -585,10 +573,7 @@ socket.write(frame.data);
The `http2.SettingsFrame` is a subclass of `http2.Frame` that serializes an
empty `SETTINGS` frame.

<!-- eslint-disable strict -->
<!-- eslint-disable required-modules -->
<!-- eslint-disable no-unused-vars -->
<!-- eslint-disable no-undef -->
<!-- eslint-disable no-undef, no-unused-vars, required-modules, strict -->
```js
// ack is a boolean indicating whether or not to set the ACK flag.
const frame = new http2.SettingsFrame(ack);
Expand All @@ -601,10 +586,7 @@ socket.write(frame.data);
Set to a `Buffer` instance that contains a minimal set of serialized HTTP/2
request headers to be used as the payload of a `http2.HeadersFrame`.

<!-- eslint-disable strict -->
<!-- eslint-disable required-modules -->
<!-- eslint-disable no-unused-vars -->
<!-- eslint-disable no-undef -->
<!-- eslint-disable no-undef, no-unused-vars, required-modules, strict -->
```js
const frame = new http2.HeadersFrame(1, http2.kFakeRequestHeaders, 0, true);

Expand All @@ -616,10 +598,7 @@ socket.write(frame.data);
Set to a `Buffer` instance that contains a minimal set of serialized HTTP/2
response headers to be used as the payload a `http2.HeadersFrame`.

<!-- eslint-disable strict -->
<!-- eslint-disable required-modules -->
<!-- eslint-disable no-unused-vars -->
<!-- eslint-disable no-undef -->
<!-- eslint-disable no-undef, no-unused-vars, required-modules, strict -->
```js
const frame = new http2.HeadersFrame(1, http2.kFakeResponseHeaders, 0, true);

Expand All @@ -631,10 +610,7 @@ socket.write(frame.data);
Set to a `Buffer` containing the preamble bytes an HTTP/2 client must send
upon initial establishment of a connection.

<!-- eslint-disable strict -->
<!-- eslint-disable required-modules -->
<!-- eslint-disable no-unused-vars -->
<!-- eslint-disable no-undef -->
<!-- eslint-disable no-undef, no-unused-vars, required-modules, strict -->
```js
socket.write(http2.kClientMagic);
```
Expand Down

0 comments on commit 9404573

Please sign in to comment.