From 4b86fa5759a4b52771bb69d3ea50762b87583765 Mon Sep 17 00:00:00 2001 From: jimjenkins5 Date: Fri, 18 Sep 2020 11:22:41 -0400 Subject: [PATCH] fix(Config Schema): Recognize enhanced object syntax for plugins (#8259) --- lib/configSchema.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/lib/configSchema.js b/lib/configSchema.js index 587410d2321..fbf49a22dea 100644 --- a/lib/configSchema.js +++ b/lib/configSchema.js @@ -32,7 +32,20 @@ const schema = { required: [], // User is free to add any properties for its own purpose }, - plugins: { type: 'array', items: { type: 'string' } }, + plugins: { + anyOf: [ + { + type: 'object', + properties: { + localPath: { type: 'string' }, + modules: { type: 'array', items: { type: 'string' } }, + }, + additionalProperties: false, + required: ['modules'], + }, + { type: 'array', items: { type: 'string' } }, + ], + }, functions: { type: 'object',