nilbuild/makers.ae

Add command to validate if all the members have valid data

开放

#5 创建于 2020年11月2日

 (0 条评论) (0 个反应) (0 位负责人)TypeScript (9 个派生)github user discovery
good first issue

仓库指标

星标
 (39 个星标)
PR 合并指标
 (30 天内没有已合并 PR)

描述

We need to write a command which will be used during the build time to validate if all the members have valid data.

The command should go through the members directory, run the following validations:

  • All the directories have two files inside profile.json and bio.md
  • profile.json has valid JSON
  • Directory name matches the username inside profile.json
  • The imageUrl given in profile.json exists in the image directory.
  • All the required fields exist in the profile.json i.e. username, title, designation, company, imageUrl and joinDate

If any of the validation checks above fail, prepare the list of errors and exit with error.

I have already added the placeholder code for running the commands, we just have to write the logic inside the command.

yarn cmd members.validate

贡献者指南