Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: get rid of unnecessary eslint-skip comments #50829

Merged
merged 2 commits into from
Nov 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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