Skip to content

Commit b3d015d

Browse files
aduh95UlisesGascon
authored andcommitted
doc: get rid of unnecessary eslint-skip comments
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]>
1 parent 076dc75 commit b3d015d

File tree

7 files changed

+14
-24
lines changed

7 files changed

+14
-24
lines changed

doc/api/crypto.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ calling `require('node:crypto')` will result in an error being thrown.
4242

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

45-
<!-- eslint-skip -->
45+
<!-- eslint-disable no-global-assign -->
4646

4747
```cjs
4848
let crypto;
@@ -53,6 +53,8 @@ try {
5353
}
5454
```
5555

56+
<!-- eslint-enable no-global-assign -->
57+
5658
When using the lexical ESM `import` keyword, the error can only be
5759
caught if a handler for `process.on('uncaughtException')` is registered
5860
_before_ any attempt to load the module is made (using, for instance,

doc/api/errors.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2975,9 +2975,7 @@ signal (such as [`subprocess.kill()`][]).
29752975
[self-reference a package using its name][] and [define a custom subpath][] in
29762976
the [`"exports"`][] field of the [`package.json`][] file.
29772977

2978-
<!-- eslint-skip -->
2979-
2980-
```js
2978+
```mjs
29812979
import './'; // unsupported
29822980
import './index.js'; // supported
29832981
import 'package-name'; // supported

doc/api/http.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,12 @@ user is able to stream data.
1616

1717
HTTP message headers are represented by an object like this:
1818

19-
<!-- eslint-skip -->
20-
21-
```js
22-
{ 'content-length': '123',
23-
'content-type': 'text/plain',
24-
'connection': 'keep-alive',
25-
'host': 'example.com',
26-
'accept': '*/*' }
19+
```json
20+
{ "content-length": "123",
21+
"content-type": "text/plain",
22+
"connection": "keep-alive",
23+
"host": "example.com",
24+
"accept": "*/*" }
2725
```
2826

2927
Keys are lowercased. Values are not modified.

doc/api/https.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ calling `require('node:https')` will result in an error being thrown.
1717

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

20-
<!-- eslint-skip -->
21-
2220
```cjs
2321
let https;
2422
try {

doc/api/querystring.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,10 @@ collection of key and value pairs.
8787

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

90-
<!-- eslint-skip -->
91-
92-
```js
90+
```json
9391
{
94-
foo: 'bar',
95-
abc: ['xyz', '123']
92+
"foo": "bar",
93+
"abc": ["xyz", "123"]
9694
}
9795
```
9896

doc/api/tls.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ calling `require('node:tls')` will result in an error being thrown.
2222

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

25-
<!-- eslint-skip -->
26-
2725
```cjs
2826
let tls;
2927
try {

doc/api/util.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2511,9 +2511,7 @@ added: v10.0.0
25112511
25122512
Returns `true` if the value is an instance of a [Module Namespace Object][].
25132513
2514-
<!-- eslint-skip -->
2515-
2516-
```js
2514+
```mjs
25172515
import * as ns from './a.js';
25182516

25192517
util.types.isModuleNamespaceObject(ns); // Returns true

0 commit comments

Comments
 (0)