doc: get rid of unnecessary eslint-skip
comments
PR-URL: https://github.com/nodejs/node/pull/50829 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ethan Arrowood <ethan@arrowood.dev> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
This commit is contained in:
parent
041d435be9
commit
5dd7ba66ad
@ -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;
|
||||
@ -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,
|
||||
|
@ -2940,9 +2940,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
|
||||
|
@ -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.
|
||||
|
@ -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 {
|
||||
|
@ -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"]
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -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 {
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user