Skip to content

Commit

Permalink
update code-comment to be less confusing
Browse files Browse the repository at this point in the history
  • Loading branch information
mansona authored and kategengler committed Aug 5, 2022
1 parent 7b874fa commit 8ed5414
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/frontmatter-linter.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ module.exports = class FrontmatterLinter {
required: true,
conform: function (value) {
const result = value?.every((item) => teams.includes(item));
// we need to warn like this because revalidator doesn't allow custom messages
// we need to warn like this because revalidator doesn't allow you to use specific
// context in custom messages. i.e. it will tell you that there an unmatched team
// but it won't tell you which one is the offending team.
if (!result) {
console.warn(`Invalid team in ${value}. Available teams: ${teams}`);
}
Expand Down

0 comments on commit 8ed5414

Please sign in to comment.