doc: change `ExperimentalWarnings` to `ExperimentalWarning`
Change Summary
This PR changes ExperimentalWarnings
to ExperimentalWarning
in the documentation for the latest version of NodeJS as of this writing - v21.6.1
.
Why?
I am using the experimental JSON Modules feature within my NodeJS project. Although the JSON Modules feature works, whenever I execute my ES Module based JavaScript file, I would receive the following warning:
(node:30484) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
After reading through the documentation under the section titled --disable-warning=code-or-type
, I tried to suppress the ExperimentalWarning
by changing the following start
script within my package.json
file:
{
...
"scripts": {
"start": "node --disable-warning=ExperimentalWarnings src/index.js"
},
...
}
But I still received the aforementioned ExperimentalWarning
within my console.
After re-reading the documentation (and referring other documentations - like this comment on issue #30810), instead of the plural version (ExperimentalWarnings
), I tried the singular version (ExperimentalWarning
):
{
...
"scripts": {
- "start": "node --disable-warning=ExperimentalWarnings src/index.js"
+ "start": "node --disable-warning=ExperimentalWarning src/index.js"
},
...
}
And it worked! The warning was suppressed. Hence, this PR to address the confusion in the documentation.