Microsoft/TypeScript

Color highlight makes error messages unreadable on black-on-white screens

Open

#46,764 建立於 2021年11月10日

在 GitHub 查看
 (10 留言) (2 反應) (0 負責人)TypeScript (6,726 fork)batch import
Experience EnhancementHelp WantedSuggestion

倉庫指標

Star
 (48,455 star)
PR 合併指標
 (平均合併 6天 17小時) (30 天內合併 9 個 PR)

描述

Suggestion

Error messages generated by TSC use bright blue and bright yellow to highlight paths and line numbers. These are too close to white to be readable on a black-on-white console.

🔍 Search Terms

terminal background color highlight highlighting error unreadable

✅ Viability Checklist

My suggestion meets these guidelines:

  • [✅] This wouldn't be a breaking change in existing TypeScript/JavaScript code
  • [✅] This wouldn't change the runtime behavior of existing JavaScript code
  • [✅] This could be implemented without emitting different JS based on the types of the expressions
  • [✅] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
  • [✅] This feature would agree with the rest of TypeScript's Design Goals.

⭐ Suggestion

Possiblities:

  1. Provide an option to just disable color highlighting.
  2. (better) Provide an option to switch to a "light background" color scheme
  3. (maybe too far) Allow configuration of colors used.

If http://go/gh/microsoft/TypeScript/issues/44233 were implemented, then it would provide a way to do the first option.

📃 Motivating Example

Run tsc on a black-on-white terminal over code that generates error messages.

💻 Use Cases

Primary workarounds:

  1. Select the colored text to make it visible.
  2. Use a terminal with a dark background and light text.

貢獻者指南