From ca866487268deec574c1683c20c910eeee44053a Mon Sep 17 00:00:00 2001 From: Joe Haddad Date: Sun, 14 Jan 2018 13:43:20 -0500 Subject: [PATCH] bugfix: set color level when color is forced (#7216) Color level 1 matches our usages, level 0 is no color --- packages/babel-code-frame/src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/babel-code-frame/src/index.js b/packages/babel-code-frame/src/index.js index 8fb318ec43..d43420b005 100644 --- a/packages/babel-code-frame/src/index.js +++ b/packages/babel-code-frame/src/index.js @@ -190,7 +190,7 @@ export function codeFrameColumns( (opts.highlightCode && Chalk.supportsColor) || opts.forceColor; let chalk = Chalk; if (opts.forceColor) { - chalk = new Chalk.constructor({ enabled: true }); + chalk = new Chalk.constructor({ enabled: true, level: 1 }); } const maybeHighlight = (chalkFn, string) => { return highlighted ? chalkFn(string) : string;