refactor: remove unnecessary default values normalized during validation (#6864)

* refactor: remove unnecessary default values normalized during validation

* more
This commit is contained in:
Joshua Chen 2022-03-07 19:23:30 +08:00 committed by GitHub
parent 7fc134ba0e
commit 8e934450d8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
27 changed files with 146 additions and 138 deletions

View file

@ -47,7 +47,7 @@ export default async function pluginContentPages(
): Promise<Plugin<LoadedContent | null>> {
if (options.admonitions) {
options.remarkPlugins = options.remarkPlugins.concat([
[admonitions, options.admonitions || {}],
[admonitions, options.admonitions],
]);
}
const {
@ -77,7 +77,7 @@ export default async function pluginContentPages(
name: 'docusaurus-plugin-content-pages',
getPathsToWatch() {
const {include = []} = options;
const {include} = options;
return getContentPathList(contentPaths).flatMap((contentPath) =>
include.map((pattern) => `${contentPath}/${pattern}`),
);