Skip to content

Commit

Permalink
doc: get rid of unnecessary eslint-skip comments
Browse files Browse the repository at this point in the history
PR-URL: #50829
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Ethan Arrowood <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Paolo Insogna <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Marco Ippolito <[email protected]>
  • Loading branch information
aduh95 authored and RafaelGSS committed Nov 29, 2023
1 parent 3fdecc4 commit 08c3b0a
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 24 deletions.
4 changes: 3 additions & 1 deletion doc/api/crypto.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ calling `require('node:crypto')` will result in an error being thrown.

When using CommonJS, the error thrown can be caught using try/catch:

<!-- eslint-skip -->
<!-- eslint-disable no-global-assign -->

```cjs
let crypto;
Expand All @@ -53,6 +53,8 @@ try {
}
```

<!-- eslint-enable no-global-assign -->

When using the lexical ESM `import` keyword, the error can only be
caught if a handler for `process.on('uncaughtException')` is registered
_before_ any attempt to load the module is made (using, for instance,
Expand Down
4 changes: 1 addition & 3 deletions doc/api/errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -2938,9 +2938,7 @@ signal (such as [`subprocess.kill()`][]).
[self-reference a package using its name][] and [define a custom subpath][] in
the [`"exports"`][] field of the [`package.json`][] file.

<!-- eslint-skip -->

```js
```mjs
import './'; // unsupported
import './index.js'; // supported
import 'package-name'; // supported
Expand Down
14 changes: 6 additions & 8 deletions doc/api/http.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,12 @@ user is able to stream data.

HTTP message headers are represented by an object like this:

<!-- eslint-skip -->

```js
{ 'content-length': '123',
'content-type': 'text/plain',
'connection': 'keep-alive',
'host': 'example.com',
'accept': '*/*' }
```json
{ "content-length": "123",
"content-type": "text/plain",
"connection": "keep-alive",
"host": "example.com",
"accept": "*/*" }
```

Keys are lowercased. Values are not modified.
Expand Down
2 changes: 0 additions & 2 deletions doc/api/https.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ calling `require('node:https')` will result in an error being thrown.

When using CommonJS, the error thrown can be caught using try/catch:

<!-- eslint-skip -->

```cjs
let https;
try {
Expand Down
8 changes: 3 additions & 5 deletions doc/api/querystring.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,10 @@ collection of key and value pairs.

For example, the query string `'foo=bar&abc=xyz&abc=123'` is parsed into:

<!-- eslint-skip -->

```js
```json
{
foo: 'bar',
abc: ['xyz', '123']
"foo": "bar",
"abc": ["xyz", "123"]
}
```

Expand Down
2 changes: 0 additions & 2 deletions doc/api/tls.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ calling `require('node:tls')` will result in an error being thrown.

When using CommonJS, the error thrown can be caught using try/catch:

<!-- eslint-skip -->

```cjs
let tls;
try {
Expand Down
4 changes: 1 addition & 3 deletions doc/api/util.md
Original file line number Diff line number Diff line change
Expand Up @@ -2513,9 +2513,7 @@ added: v10.0.0
Returns `true` if the value is an instance of a [Module Namespace Object][].
<!-- eslint-skip -->
```js
```mjs
import * as ns from './a.js';

util.types.isModuleNamespaceObject(ns); // Returns true
Expand Down

0 comments on commit 08c3b0a

Please sign in to comment.