mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-28 00:17:14 +02:00
refactor(v2): cleanup console output (#4979)
* refactor(v2): cleanup console output * fix jest issue Co-authored-by: slorber <lorber.sebastien@gmail.com>
This commit is contained in:
parent
8501db78a1
commit
41d9288e3d
86 changed files with 382 additions and 339 deletions
|
@ -20,14 +20,14 @@ export const isValidationDisabledEscapeHatch =
|
|||
if (isValidationDisabledEscapeHatch) {
|
||||
console.error(
|
||||
chalk.red(
|
||||
'You should avoid using DISABLE_DOCUSAURUS_VALIDATION escape hatch, this will be removed',
|
||||
'You should avoid using DISABLE_DOCUSAURUS_VALIDATION escape hatch, this will be removed.',
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
export const logValidationBugReportHint = (): void => {
|
||||
console.log(
|
||||
`\n${chalk.red('A validation error occured.')}${chalk.cyanBright(
|
||||
`\n${chalk.red('A validation error occurred.')}${chalk.cyanBright(
|
||||
'\nThe validation system was added recently to Docusaurus as an attempt to avoid user configuration errors.' +
|
||||
'\nWe may have made some mistakes.' +
|
||||
'\nIf you think your configuration is valid and should keep working, please open a bug report.',
|
||||
|
@ -141,7 +141,7 @@ export function validateFrontMatter<T>(
|
|||
|
||||
console.error(
|
||||
chalk.red(
|
||||
`The following FrontMatter:\n${chalk.yellow(
|
||||
`The following frontmatter:\n${chalk.yellow(
|
||||
frontMatterString,
|
||||
)}\ncontains invalid values for field(s): ${invalidFields}.\n${errorMessages}\n`,
|
||||
),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue