Skip to content

Commit 0cd0b4b

Browse files
authored
Fix validation to automatically allow popular unofficial keyword extensions (#4605)
1 parent f46a56f commit 0cd0b4b

File tree

3 files changed

+36
-200
lines changed

3 files changed

+36
-200
lines changed

CONTRIBUTING.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,10 @@ Used by: `vscode-json-languageservice`.
302302

303303
Used by: `vscode-json-languageservice`. See [Documenting Enums](#documenting-enums) for details.
304304

305+
**`markdownEnumDescriptions`**
306+
307+
Used by: `vscode-json-languageservice`. See [Documenting Enums](#documenting-enums) for details.
308+
305309
**`x-taplo`**
306310

307311
Used by: `tamasfe/taplo`.

cli.js

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,21 @@ async function ajvFactory(
467467
/**
468468
* Ditto, but with keywords (ex. "x-intellij-html-description")..
469469
*/
470-
for (const unknownKeyword of unknownKeywords) {
470+
for (const unknownKeyword of unknownKeywords.concat([
471+
'allowTrailingCommas',
472+
'defaultSnippets',
473+
'markdownDescription',
474+
'enumDescriptions',
475+
'markdownEnumDescriptions',
476+
'x-taplo',
477+
'x-taplo-info',
478+
'x-tombi-toml-version',
479+
'x-tombi-array-values-order',
480+
'x-tombi-table-keys-order',
481+
'x-intellij-language-injection',
482+
'x-intellij-html-description',
483+
'x-intellij-enum-metadata',
484+
])) {
471485
ajv.addKeyword(unknownKeyword)
472486
}
473487

0 commit comments

Comments
 (0)