fix: make Docusaurus PnP strict mode compatible (#6047)

Co-authored-by: Kristoffer K. <merceyz@users.noreply.github.com>
This commit is contained in:
Joshua Chen 2021-12-08 21:26:24 +08:00 committed by GitHub
parent 68b75bf855
commit e07ebadf6c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
65 changed files with 304 additions and 269 deletions

View file

@ -4,15 +4,15 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import Joi from './Joi';
import {isValidPathname} from '@docusaurus/utils';
import {isValidPathname, DEFAULT_PLUGIN_ID} from '@docusaurus/utils';
import type {Tag} from '@docusaurus/utils';
import {JoiFrontMatter} from './JoiFrontMatter';
export const PluginIdSchema = Joi.string()
.regex(/^[a-zA-Z_-]+$/)
// duplicate core constant, otherwise cyclic dependency is created :(
.default('default');
.default(DEFAULT_PLUGIN_ID);
const MarkdownPluginsSchema = Joi.array()
.items(