doc: allow the $schema property in node.config.json

The documentation states people can use the `$schema` property, but the
JSON schema forbids this. This change allows it.

PR-URL: https://github.com/nodejs/node/pull/57560
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Jordan Harband <ljharb@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
Remco Haszing 2025-04-06 19:19:36 +02:00 committed by GitHub
parent 52425d2ee7
commit 7d45c346bb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 0 deletions

View File

@ -2,6 +2,9 @@
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"$schema": {
"type": "string"
},
"nodeOptions": {
"additionalProperties": false,
"properties": {

View File

@ -45,6 +45,10 @@ function generateConfigJsonSchema() {
$schema: 'https://json-schema.org/draft/2020-12/schema',
additionalProperties: false,
properties: {
$schema: {
__proto__: null,
type: 'string',
},
nodeOptions: {
__proto__: null,
additionalProperties: false,