Skip to content

Commit 6a7a7d5

Browse files
committed
use allOf instead of "extendRefs: true" option
this is recommended by @epoberezkin
1 parent 3ba9ed9 commit 6a7a7d5

2 files changed

Lines changed: 21 additions & 12 deletions

File tree

lib/validateSchema.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ const Ajv = require("ajv");
88
const ajv = new Ajv({
99
errorDataPath: "configuration",
1010
allErrors: true,
11-
verbose: true,
12-
extendRefs: true
11+
verbose: true
1312
});
1413
require("ajv-keywords")(ajv, ["instanceof"]);
1514
require("../schemas/ajv.absolutePath")(ajv);

schemas/webpackOptionsSchema.json

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -568,16 +568,22 @@
568568
]
569569
},
570570
"exclude": {
571-
"$ref": "#/definitions/ruleSet-condition",
572-
"absolutePath": true
571+
"allOf": [
572+
{"$ref": "#/definitions/ruleSet-condition"},
573+
{"absolutePath": true}
574+
]
573575
},
574576
"include": {
575-
"$ref": "#/definitions/ruleSet-condition",
576-
"absolutePath": true
577+
"allOf": [
578+
{"$ref": "#/definitions/ruleSet-condition"},
579+
{"absolutePath": true}
580+
]
577581
},
578582
"issuer": {
579-
"$ref": "#/definitions/ruleSet-condition",
580-
"absolutePath": true
583+
"allOf": [
584+
{"$ref": "#/definitions/ruleSet-condition"},
585+
{"absolutePath": true}
586+
]
581587
},
582588
"loader": {
583589
"anyOf": [
@@ -606,8 +612,10 @@
606612
"$ref": "#/definitions/ruleSet-query"
607613
},
608614
"resource": {
609-
"$ref": "#/definitions/ruleSet-condition",
610-
"absolutePath": true
615+
"allOf": [
616+
{"$ref": "#/definitions/ruleSet-condition"},
617+
{"absolutePath": true}
618+
]
611619
},
612620
"resourceQuery": {
613621
"$ref": "#/definitions/ruleSet-condition"
@@ -616,8 +624,10 @@
616624
"$ref": "#/definitions/ruleSet-rules"
617625
},
618626
"test": {
619-
"$ref": "#/definitions/ruleSet-condition",
620-
"absolutePath": true
627+
"allOf": [
628+
{"$ref": "#/definitions/ruleSet-condition"},
629+
{"absolutePath": true}
630+
]
621631
},
622632
"use": {
623633
"$ref": "#/definitions/ruleSet-use"

0 commit comments

Comments
 (0)