Update Danger rule for joi (#5667)

Follow-on to #5624
This commit is contained in:
Paul Melnikow
2020-10-06 20:48:03 -04:00
committed by GitHub
parent e0604d855b
commit 3a23695f89

View File

@@ -131,11 +131,11 @@ if (allFiles.length > 100) {
)
}
if (diff.includes("require('joi')")) {
if (diff.includes("require('@hapi/joi')")) {
fail(
[
`Found import of 'joi' in \`${file}\`. <br>`,
"Joi must be imported as '@hapi/joi'.",
`Found import of '@hapi/joi' in \`${file}\`. <br>`,
"Joi must be imported as 'joi'.",
].join('')
)
}