You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* feat(merge-schemas): support mergeSchemas rule option
This option controlls whether schemas from different sources are merged and combined together.
Can be an array of ["$schema", "options", "catalog"] or true as shorthand for all three.
Closes#235
* test(merge-schema): add test cases for the mergeSchemas option
* docs(merge-schemas): document the mergeSchemas option
* Create fluffy-jeans-whisper.md
* Update fluffy-jeans-whisper.md
---------
Co-authored-by: Yosuke Ota <otameshiyo23@gmail.com>
Copy file name to clipboardExpand all lines: docs/rules/no-invalid.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -54,7 +54,8 @@ This rule validates the file with JSON Schema and reports errors.
54
54
"schema": {/* JSON Schema Definition */} // or string
55
55
}
56
56
],
57
-
"useSchemastoreCatalog":true
57
+
"useSchemastoreCatalog":true,
58
+
"mergeSchemas":true// or ["$schema", "options", "catalog"]
58
59
}
59
60
]
60
61
}
@@ -64,6 +65,7 @@ This rule validates the file with JSON Schema and reports errors.
64
65
-`fileMatch` ... A list of known file names (or globs) that match the schema.
65
66
-`schema` ... An object that defines a JSON schema. Or the path of the JSON schema file or URL.
66
67
-`useSchemastoreCatalog` ... If `true`, it will automatically configure some schemas defined in [https://www.schemastore.org/api/json/catalog.json](https://www.schemastore.org/api/json/catalog.json). Default `true`
68
+
-`mergeSchemas` ... If `true`, it will merge all schemas defined in `schemas`, at the `$schema` field within files, and the catalogue. If an array is given, it will merge only schemas from the given sources. Default `false`
67
69
68
70
This option can also be given a JSON schema file or URL. This is useful for configuring with the `/* eslint */` directive comments.
0 commit comments