mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-10 23:57:22 +02:00
chore(v2): fix several lint warnings, add missing types, cleanup (#3844)
* fix several lint warnings, add missing types, cleanup * fix EnumChangefreq issue * better utilization of EnumChangefreq type * update test snapshot
This commit is contained in:
parent
139b668737
commit
ad31facb32
49 changed files with 228 additions and 171 deletions
|
@ -19,7 +19,7 @@ function createTestHelpers({
|
|||
schema,
|
||||
defaultValue,
|
||||
}: {
|
||||
schema: Joi.SchemaLike;
|
||||
schema: Joi.Schema;
|
||||
defaultValue?: unknown;
|
||||
}) {
|
||||
function testOK(value: unknown) {
|
||||
|
@ -36,7 +36,7 @@ function createTestHelpers({
|
|||
return {testOK, testFail};
|
||||
}
|
||||
|
||||
function testMarkdownPluginSchemas(schema: Joi.SchemaLike) {
|
||||
function testMarkdownPluginSchemas(schema: Joi.Schema) {
|
||||
const {testOK, testFail} = createTestHelpers({
|
||||
schema,
|
||||
defaultValue: [],
|
||||
|
|
|
@ -25,7 +25,7 @@ if (isValidationDisabledEscapeHatch) {
|
|||
);
|
||||
}
|
||||
|
||||
export const logValidationBugReportHint = () => {
|
||||
export const logValidationBugReportHint = (): void => {
|
||||
console.log(
|
||||
`\n${chalk.red('A validation error occured.')}${chalk.cyanBright(
|
||||
'\nThe validation system was added recently to Docusaurus as an attempt to avoid user configuration errors.' +
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue