Skip to content

Commit 26ed6ab

Browse files
author
einarlove
committed
Upgrade chalk and use strip-ansi when needed
1 parent d679843 commit 26ed6ab

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

packages/react-dev-utils/eslintFormatter.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
'use strict';
1111

1212
const chalk = require('chalk');
13+
const stripAnsi = require('strip-ansi');
1314
const table = require('text-table');
1415

1516
function isError(message) {
@@ -67,7 +68,7 @@ function formatter(results) {
6768
let outputTable = table(messages, {
6869
align: ['l', 'l', 'l'],
6970
stringLength(str) {
70-
return chalk.stripColor(str).length;
71+
return stripAnsi(str).length;
7172
},
7273
});
7374

packages/react-dev-utils/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"address": "1.0.2",
3737
"anser": "1.4.1",
3838
"babel-code-frame": "6.22.0",
39-
"chalk": "1.1.3",
39+
"chalk": "^2.0.1",
4040
"cross-spawn": "4.0.2",
4141
"detect-port-alt": "1.1.3",
4242
"escape-string-regexp": "1.0.5",

0 commit comments

Comments
 (0)