Some colors make error messages hard to read on white backgrounds.

オープン 初心者向け
#63,648 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
75/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
静か
技術スタック
go
領域
cli

調査の方向性

internal/diagnosticwriter/diagnosticwriter.go の、issue でリンクされている色書き込みコードから始め、そこで出力されるターミナルシーケンスを、報告されている白い背景での挙動と比較してください。デフォルトの色を使ってターミナルで診断出力を確認してください。エラーメッセージが明るい色のバリエーションを強制せずに読みやすいままであれば完了です。

索引モデルが issue の本文から書いたものです。

説明

Awaiting More Feedback Suggestion

On a terminal with white background, some parts of the error messages are very hard to read:

Image
Cause

The problem is that the diagnosticwriter is forcing the bright versions of the colors, instead of using the default colors set by the terminal configuration (by writing 9x instead of 3x):

https://github.com/microsoft/typescript-go/blob/168e7015edf98244febc8f4ae450b673b5d195d7/internal/diagnosticwriter/diagnosticwriter.go#L108-L112

If I patch the binary to replace the colors to 3x with this:

$ sed -i 's/\x1b\[9\(.\)m/\x1b[3\1m/g' ./node_modules/@typescript/typescript-linux-x64/lib/tsc

Then the output is much easier to read:

Image
主要言語
Go
スター
111k
フォーク
14.4k
平均マージ
1日 15時間
マージ済み PR(30日)
115

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

microsoft/TypeScript のほかの issue

microsoft/TypeScript の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。