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

貢獻者指南