我在一个非常简单的文件上运行 jshint,看起来像
if ( 1 == 2 ) {
}
输出看起来有点奇怪。我将文本输出到日志文件,这就是日志的样子
^[[4mRunning "lint:files" (lint) task^[[24m
Linting src/bad.js...^[[31mERROR^[[39m
^[[31m[^[[39m^[[33mL1^[[39m^[[31m:^[[39m^[[33mC8^[[39m^[[31m]^[[39m ^[[33mExpected '===' and instead saw '=='.^[[39m
if ( 1 ^[[31m^[[7m=^[[27m^[[39m= 2 ) {
但是如果我将它打印到控制台它看起来像
Linting src/bad.js...ERROR
[L1:C8] Expected '===' and instead saw '=='.
if ( 1 == 2 ) {
任何想法为什么文件版本看起来很奇怪?