mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-21 21:16:59 +02:00
fix(v2): fix theme validation for prism field and add tests (#3210)
* fix(v2): fix theme validation for prism field * chore(v2): minor changes * chore(v2): remove unused dependencies
This commit is contained in:
parent
0d7314a6f7
commit
8f0c00f3d4
4 changed files with 131 additions and 63 deletions
|
@ -203,6 +203,18 @@ const ThemeConfigSchema = Joi.object({
|
|||
}),
|
||||
),
|
||||
}),
|
||||
prism: Joi.object({
|
||||
theme: Joi.object({
|
||||
plain: Joi.alternatives().try(Joi.array(), Joi.object()).required(),
|
||||
styles: Joi.alternatives().try(Joi.array(), Joi.object()).required(),
|
||||
}),
|
||||
darkTheme: Joi.object({
|
||||
plain: Joi.alternatives().try(Joi.array(), Joi.object()).required(),
|
||||
styles: Joi.alternatives().try(Joi.array(), Joi.object()).required(),
|
||||
}),
|
||||
defaultLanguage: Joi.string(),
|
||||
additionalLanguages: Joi.array().items(Joi.string()),
|
||||
}).unknown(),
|
||||
});
|
||||
|
||||
exports.validateThemeConfig = ({validate, themeConfig}) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue