Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Allow V2 console rules to use colors #7689
To improve the UX of V2 rules, there are certain times that we would like to use colors in the output, just as we do in V1.
However, we also need some way to respect the global flag
Add safe color methods to the
Console rule users would then use colors like this:
Alternative API considered: stripping output
Instead of defining color methods on the
This reduces the risk of people in the current approach accidentally directly using
However, the idea of first adding color codes then intentionally stripping them away is awkward and it was decided that this was not worth it.
Colors can now be safely used in V2, which unblocks #7676.
The v2 test rule was also updated to print in red "Tests failed" upon any failures.