Skip to content

Commit

Permalink
fix(v2): make schema for plugins stricter
Browse files Browse the repository at this point in the history
  • Loading branch information
9oelM committed Dec 31, 2020
1 parent 93f7283 commit fa71a66
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/docusaurus/src/server/configValidation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ export const DEFAULT_CONFIG: Pick<

const PluginSchema = Joi.alternatives().try(
Joi.string(),
Joi.array().items(Joi.string().required(), Joi.object().required()).length(2),
Joi.array()
.ordered(Joi.string().required(), Joi.object().required())
.length(2),
Joi.bool().equal(false), // In case of conditional adding of plugins.
);

Expand Down

0 comments on commit fa71a66

Please sign in to comment.