[tsserverlibrary] Allow reporting helpful links and error-names
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 30/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- typescript
調査の方向性
tsserverlibrary の Diagnostic 型と language-service API 型から始め、続いてそれらの Diagnostic code の形状を、リンクされている vscode-languageserver-node の定義と比較します。数値の Diagnostic code を維持しつつ、plugin が報告する diagnostics に対して提案された string 形式と helpful-link 形式を許可できれば完了です。payload ではテストファイルや実装ファイルを指定しません。
索引モデルが issue の本文から書いたものです。
説明
Search Terms
Support Links
Helpful Links
Diagnostic
Suggestion
VSCode now accepts either strings or numbers alongside with a support-link as the code-property of a Diagnostic, which provides the comfort to easily open up a website showing more details about the error:
It would be very awesome if TypeScript language services had the same option to not only pass a number as error-code but also strings and, most importantly, a link containing helpful info.
Use Cases
Basically whenever you use a plugin which reports errors especially when they're a tiny bit too complex to describe them in a few sentences.
Examples
interceptor.AddMethod(
"getSemanticDiagnostics",
(target, delegate, fileName) =>
{
let diagnostics = delegate(fileName);
diagnostics.push(
{
file: this.Program.getSourceFile(fileName),
start: 1,
length: 1,
messageText: "The member-ordering is incorrect.",
category: ts.DiagnosticCategory.Warning,
source: "eslint",
code: {
value: "import/order",
target: "https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/order.md"
}
}
return diagnostics;
});
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, etc.)
- This feature would agree with the rest of TypeScript's Design Goals.
- 主要言語
- Go
- スター
- 111k
- フォーク
- 14.4k
- 平均マージ
- 1日 19時間
- マージ済み PR(30日)
- 117
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoft/TypeScript のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
microsoft/TypeScript#64322 · コメント 2 件 · リアクション 1 件 · 担当者 2 名 ·
-
Possible Improvement
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
microsoft/TypeScript#64278 · コメント 1 件 · リアクション 1 件 ·
-
Docs
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
microsoft/TypeScript#64118 · コメント 1 件 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
microsoft/TypeScript#64094 ·
-
Docs
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
microsoft/TypeScript#63959 · コメント 5 件 ·
microsoft/TypeScript の issue をすべて見る
似ている issue
-
optimization optimization:agents-md-curator
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
githubnext/gh-aw-cao#13143 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
blinklabs-io/bursa#904 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
yanet-platform/ipfw-go#129 ·
-
bug confmap/provider/googlesecretmanagerprovider needs triage
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
open-telemetry/opentelemetry-collector-contrib#51273 · コメント 2 件 ·
-
bug: AI Gateway client filter lists "Unknown" twice when NULL and literal Unknown clients coexist オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100