mirror of
https://github.com/facebook/docusaurus.git
synced 2025-07-29 14:38:50 +02:00
improve type
This commit is contained in:
parent
a9d6bcf968
commit
91aa292d26
2 changed files with 2 additions and 6 deletions
|
@ -87,10 +87,8 @@ export default function pluginContentShowcase(
|
|||
);
|
||||
|
||||
const sourcePath = path.join(contentPath, relativeSource);
|
||||
|
||||
const data = await fs.readFile(sourcePath, 'utf-8');
|
||||
// todo remove as ... because bad practice ?
|
||||
const unsafeData = Yaml.load(data) as {[key: string]: unknown};
|
||||
const unsafeData = Yaml.load(data);
|
||||
const showcaseItem = validateShowcaseItem(unsafeData);
|
||||
|
||||
validateFrontMatterTags(showcaseItem.tags, createdTagSchema);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue