docs(types) - update plugins configuration interface #1246
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
JSON Schema validation fails for nest-cli.json if an item in CompilerOptions.plugins[] uses the object notation.
PR Checklist
Please check if your PR fulfills the following requirements:
I don't think tests or doc updates are applicable here. Backwards compatible as it just adds a union with the existing type
string[]
and does not affect the preferred default value.PR Type
What kind of change does this PR introduce?
What is the current behavior?
When validating a local nest-cli.json via it's JSON Schema at json.schemastore.org/nest-cli.json, the plugin items will fail validation if using the object notation (see second code block).
Side note, some IDEs (i.e. IntelliJ IDEA) have capabilities bundled-in that automatically reference schemastore.org for matching schemas based on local filenames, with the editor reporting invalid JSON as per the schema without any obvious indicators as to what or where the schema is being defined.
Issue Number: N/A
What is the new behavior?
JSON Schema now honors plugins defined in string or object format.
Does this PR introduce a breaking change?
Other information
I'm unsure if this is automated as part of this project's CI, but a new draft of the JSON Schema will need to be published to https://json.schemastore.org/nest-cli.json