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 天 11 小时
- 30 天内合并 PR
- 151
环境准备
在浏览器里用你自己的 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 于 2 天前认领。 未关闭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 于 3 天前认领。 未关闭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 于 10 天前认领。 未关闭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 于 24 天前认领。 未关闭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 于 37 天前认领,目前没有进行中的 PR。 未关闭Docs
难度 2/5 1-3 小时 新手友好度 70/100
microsoft/TypeScript#64118 · 1 条评论 ·
维护者通常 1 天内回复
查看 microsoft/TypeScript 的全部 Issue
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 75/100
open-telemetry/opentelemetry-go-compile-instrumentation#1467 ·
维护者通常 3 天内回复
-
Python 3.15 support可能已有人在做 @amnesiaof 今天认领。 未关闭L: python L: python:uv
难度 2/5 1-3 小时 新手友好度 72/100
dependabot/dependabot-core#16524 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
duplication
难度 2/5 1-3 小时 新手友好度 78/100
openvibely/openvibely#1443 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 60/100
canonical/service-mesh#845 ·
维护者通常 1 天内回复