Non-enum CLI options with multiple values separated by comma and space aren't whitespace trimmed
維護者通常 1 天內回覆
評估
- 難度
- 2/5
- 預估耗時
- 1-3 小時
- 新手友好度
- 68/100
- Issue 類型
- 缺陷
- 描述清晰度
- 基本清楚
- 活躍度
- 活躍
- 技術堆疊
- typescript
研究方向
從提供的 npx tsc --showConfig 命令所執行的 CLI 選項解析著手,將 non-enum 選項與 lib 處理進行比較。驗證回報的選項在依逗號分割後不再保留前導空格,同時解析後的設定在其他方面維持不變。
由索引模型根據 Issue 內容生成。
描述
🔎 Search Terms
CLI, compilerOptions, whitespace, comma
🕗 Version & Regression Information
Checked on the latest main
⏯ Playground Link
No response
💻 Code
> npx tsc --showConfig --customConditions "a, b" --types "a, b" --typeRoots "a, b" --moduleSuffixes "a, b" --excludeDirectories "a, b" --excludeFiles "a, b" --lib "es2015, dom" index.ts
🙁 Actual behavior
{
"compilerOptions": {
"customConditions": [
"a",
" b"
],
"lib": [
"es6",
"dom"
],
"moduleSuffixes": [
"a",
" b"
],
"typeRoots": [
"./a",
"./ b"
],
"types": [
"a",
" b"
]
},
"files": [
"./index.ts"
]
}
See space before b in resolved config, and also note that lib values are trimmed correctly
🙂 Expected behavior
{
"compilerOptions": {
"customConditions": [
"a",
"b"
],
"lib": [
"es6",
"dom"
],
"moduleSuffixes": [
"a",
"b"
],
"typeRoots": [
"./a",
"./b"
],
"types": [
"a",
"b"
]
},
"files": [
"./index.ts"
]
}
Non-enum options should be whitespace-trimmed as well
Additional information about the issue
Followup for https://github.com/microsoft/TypeScript/pull/64522#discussion_r4147589423
- 主要語言
- Go
- 星號
- 111k
- 分支
- 15.5k
- 平均合併
- 1 天 19 小時
- 30 天內合併 PR
- 158
環境準備
在瀏覽器裡用你自己的 GitHub 帳號啟動這個專案的開發容器。
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
microsoft/TypeScript 的其他 Issue
-
Class names `eval` and `arguments` are not reported as invalid strict mode bindings可能已有人在做 @dmety 今天認領。 未關閉Bug
難度 2/5 1-3 小時 新手友好度 68/100
microsoft/TypeScript#64661 ·
維護者通常 1 天內回覆
-
TypeScript 7 VS Code extension: a workspace "typescript" 7.x package is not detected, only "@typescript/native-preview", which is no longer published可能已有人在做 @jakebailey 於 1 天前認領。 未關閉Needs Investigation
難度 2/5 1-3 小時 新手友好度 84/100
microsoft/TypeScript#64565 · 1 個 reaction · 已指派 1 人 ·
維護者通常 1 天內回覆
-
`EFNoLeadingComments` suppresses synthesized leading comments in tsgo; Strada only suppresses source comments可能已有人在做 @weswigham 於 8 天前認領。 未關閉Needs Investigation
難度 2/5 1-3 小時 新手友好度 84/100
microsoft/TypeScript#64453 · 1 則留言 · 已指派 1 人 ·
維護者通常 1 天內回覆
-
enhance: Add tests for premature caching of contextual parameter types可能已有人在做 @luchenxu73 於 23 天前認領。 未關閉Possible Improvement
難度 2/5 1-3 小時 新手友好度 78/100
microsoft/TypeScript#64278 · 1 則留言 · 1 個 reaction ·
維護者通常 1 天內回覆
-
dom.generated.d.ts is missing from this repo while still referenced in the docs可能重新可做 @seanxuu 於 35 天前認領,目前沒有進行中的 PR。 未關閉Docs
難度 2/5 1-3 小時 新手友好度 70/100
microsoft/TypeScript#64118 · 1 則留言 ·
維護者通常 1 天內回覆
查看 microsoft/TypeScript 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 76/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 76/100
evilmartians/lefthook#1588 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 85/100
kubernetes-sigs/kubebuilder#6084 ·
維護者通常 3 天內回覆
-
agent-research-recommend agent-review-finding chore
難度 2/5 1-3 小時 新手友好度 78/100
jordansmall/spindrift#4821 · 1 則留言 ·
維護者通常 1 天內回覆
-
area:web
難度 2/5 1-3 小時 新手友好度 82/100
praetorianer777/GoTome#178 ·
維護者通常 1 天內回覆