@@ -4,7 +4,7 @@ import 'types/format.dart';
44import 'types/lint.dart' ;
55
66const _kDefaultSigns = [' ' , '⚠' , '✖' ];
7- final _defaultColors = [ansi. white, ansi. yellow, ansi. red];
7+ final _defaultColors = [white, yellow, red];
88
99///
1010/// Format commitlint [report] to formatted output message.
@@ -22,10 +22,10 @@ String format({
2222
2323List <String > _formatInput (LintOutcome result) {
2424 final sign = '⧗' ;
25- final decoration = ansi. gray (sign);
25+ final decoration = gray (sign);
2626 final commitText =
2727 result.errors.isNotEmpty ? result.input : result.input.split ('\n ' ).first;
28- final decoratedInput = ansi. bold (commitText);
28+ final decoratedInput = bold (commitText);
2929 final hasProblem = result.errors.isNotEmpty || result.warnings.isNotEmpty;
3030 return hasProblem || Verbose .enabled
3131 ? ['$decoration input: $decoratedInput ' ]
@@ -37,7 +37,7 @@ List<String> _formatResult(LintOutcome result) {
3737 final sign = _kDefaultSigns[problem.level.index];
3838 final color = _defaultColors[problem.level.index];
3939 final decoration = color (sign);
40- final name = ansi. gray (problem.name);
40+ final name = gray (problem.name);
4141 return '$decoration ${problem .message } $name ' ;
4242 });
4343
@@ -47,7 +47,7 @@ List<String> _formatResult(LintOutcome result) {
4747 final summary = problems.isNotEmpty || Verbose .enabled
4848 ? '$decoration found ${result .errors .length } error(s), ${result .warnings .length } warning(s)'
4949 : '' ;
50- final fmtSummary = summary.isNotEmpty ? ansi. bold (summary) : summary;
50+ final fmtSummary = summary.isNotEmpty ? bold (summary) : summary;
5151 return [
5252 ...problems,
5353 if (problems.isNotEmpty) '' ,
@@ -65,7 +65,7 @@ String _selectSign(LintOutcome result) {
6565
6666String Function (String ) _selectColor (LintOutcome result) {
6767 if (result.errors.isNotEmpty) {
68- return ansi. red;
68+ return red;
6969 }
70- return result.warnings.isNotEmpty ? ansi. yellow : ansi. green;
70+ return result.warnings.isNotEmpty ? yellow : green;
7171}
0 commit comments