Commit Graph

7 Commits

Author SHA1 Message Date
Pierre-Yves B
23c0406bed Migrate from CommonJS to ESM (#6651) 2021-07-09 12:53:55 +01:00
chris48s
504015c0ba migrate hapi/joi to joi (#5624)
* update joi + joi-extension-semver

* @hapi/joi --> joi

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-09-30 17:51:02 +00:00
chris48s
ad834b0aba match upstream [codefactor] badge if no grade yet (#4558) 2020-01-19 15:43:56 +00:00
Caleb Cartwright
2c70700134 fix: codefactor grade schema (#4270) 2019-10-31 11:39:04 -05:00
Paul Melnikow
311ccc8834 Fix [CodefactorGrade] again (#4034)
This looks like a case of confusing `Joi.allow()` with `Joi.valid()`.

`Joi.valid(...['A', 'A-']).validate('-')` throws an error but `Joi.allow(...['A', 'A-']).validate('-')` allows it through.

Closes #4033
2019-09-16 17:37:54 +00:00
Paul Melnikow
fe34bcf28b Throw explicit error on invalid [codefactorgrade] color (#4015)
It’s hard to understand how #3813 is persisting. The schema should reject keys not in the object… it’s very puzzling.

This replaces the code used to get the color with a function call that throws an explicit error when the key is missing. It should at least make it clear what the key value is when this fails in the future.
2019-09-14 11:24:57 -05:00
Caleb Cartwright
c312eae3e3 feat: add CodeFactor grade badge (#3588) 2019-06-22 09:13:34 -05:00