diff --git a/build-system/common/colors.js b/build-system/common/colors.js index b9bc7dde3baaf..b09f3deaad340 100644 --- a/build-system/common/colors.js +++ b/build-system/common/colors.js @@ -23,7 +23,7 @@ module.exports = Object.entries(colors).reduce((map, [key, formatter]) => { } map[key] = function (input) { if (!input) { - return ''; + return `${input}`; } if (input instanceof Array) { diff --git a/build-system/test-configs/dep-check-config.js b/build-system/test-configs/dep-check-config.js index 6c789afe0d5ce..e0b912e7e9737 100644 --- a/build-system/test-configs/dep-check-config.js +++ b/build-system/test-configs/dep-check-config.js @@ -553,4 +553,10 @@ exports.rules = [ /** DO NOT ADD TO ALLOWLIST */ ], }, + // Rules for build-system + { + filesMatching: 'build-system/**/*.js', + mustNotDependOn: 'kleur/colors', + allowlist: ['build-system/common/colors.js'], + }, ];