From fe2d136d641aa2fbd1214f1c33b5d7dcb559c162 Mon Sep 17 00:00:00 2001 From: Shubham Pandey Date: Wed, 6 Sep 2023 20:32:44 +0530 Subject: [PATCH 1/2] doc: update documentation for node:process warning --- doc/api/process.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/api/process.md b/doc/api/process.md index 8b906eec9cb6ba..278ee0741080fd 100644 --- a/doc/api/process.md +++ b/doc/api/process.md @@ -606,7 +606,9 @@ process.on('warning', (warning) => { By default, Node.js will print process warnings to `stderr`. The `--no-warnings` command-line option can be used to suppress the default console output but the -`'warning'` event will still be emitted by the `process` object. +`'warning'` event will still be emitted by the `process` object. Currently, it +is not possible to suppress specific warning types other than deprecation +warnings. To suppress deprecation warnings, check out the [`--no-deprecation`][] flag. The following example illustrates the warning that is printed to `stderr` when too many listeners have been added to an event: @@ -3954,6 +3956,7 @@ cases: [`'message'`]: child_process.md#event-message [`'uncaughtException'`]: #event-uncaughtexception [`--experimental-permission`]: cli.md#--experimental-permission +[`--no-deprecation`]: cli.md#--no-deprecation [`--unhandled-rejections`]: cli.md#--unhandled-rejectionsmode [`Buffer`]: buffer.md [`ChildProcess.disconnect()`]: child_process.md#subprocessdisconnect From c1f1208dbb2467d6d4022bf2ed554271ad76ea7c Mon Sep 17 00:00:00 2001 From: Shubham Pandey Date: Wed, 6 Sep 2023 21:32:13 +0530 Subject: [PATCH 2/2] lint fix --- doc/api/process.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/api/process.md b/doc/api/process.md index 278ee0741080fd..5c1ab8f68e7fa5 100644 --- a/doc/api/process.md +++ b/doc/api/process.md @@ -608,7 +608,8 @@ By default, Node.js will print process warnings to `stderr`. The `--no-warnings` command-line option can be used to suppress the default console output but the `'warning'` event will still be emitted by the `process` object. Currently, it is not possible to suppress specific warning types other than deprecation -warnings. To suppress deprecation warnings, check out the [`--no-deprecation`][] flag. +warnings. To suppress deprecation warnings, check out the [`--no-deprecation`][] +flag. The following example illustrates the warning that is printed to `stderr` when too many listeners have been added to an event: