mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-29 17:07:08 +02:00
chore: clean up ESLint config, enable a few rules (#6514)
* chore: clean up ESLint config, enable a few rules * enable max-len for comments * fix build
This commit is contained in:
parent
b8ccb869f1
commit
aa446b7a9c
167 changed files with 1157 additions and 960 deletions
|
@ -58,12 +58,11 @@ export function normalizePluginOptions<T extends {id?: string}>(
|
|||
if (isValidationDisabledEscapeHatch) {
|
||||
logger.error(error);
|
||||
return options as T;
|
||||
} else {
|
||||
throw error;
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
|
||||
return value!; // TODO remove ! this in TS 4.6, see https://twitter.com/sebastienlorber/status/1481950042277793793
|
||||
return value!; // TODO remove this ! in TS 4.6, see https://twitter.com/sebastienlorber/status/1481950042277793793
|
||||
}
|
||||
|
||||
export function normalizeThemeConfig<T>(
|
||||
|
@ -86,11 +85,10 @@ export function normalizeThemeConfig<T>(
|
|||
if (isValidationDisabledEscapeHatch) {
|
||||
logger.error(error);
|
||||
return themeConfig as T;
|
||||
} else {
|
||||
throw error;
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
return value!; // TODO remove ! this in TS 4.6, see https://twitter.com/sebastienlorber/status/1481950042277793793
|
||||
return value!; // TODO remove this ! in TS 4.6
|
||||
}
|
||||
|
||||
export function validateFrontMatter<T>(
|
||||
|
@ -120,5 +118,5 @@ ${errorDetails.map(({message}) => message)}
|
|||
throw error;
|
||||
}
|
||||
|
||||
return value!; // TODO remove ! this in TS 4.6, see https://twitter.com/sebastienlorber/status/1481950042277793793
|
||||
return value!; // TODO remove this ! in TS 4.6
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue