Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Non-enum CLI options with multiple values separated by comma and space aren't whitespace trimmed

Open Beginner friendly
#64,618 0 comments 0 reactions 1 assignee View on GitHub

Maintainers usually reply within 1 day

@RyanCavanaugh is already working on this.

Since Oct 6, 2026.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
68/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
typescript
Domain
cli, compilers

Research direction

Start from the CLI option parsing exercised by the provided npx tsc --showConfig command, comparing the non-enum options with lib handling. Verify the reported options no longer retain a leading space after comma splitting, while the resolved configuration remains otherwise unchanged.

Written by the indexing model from the issue text.

Description

Bug
🔎 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

Dominant language
Go
Stars
111k
Forks
16.4k
Avg merge
1d 11h
Merged PRs (30d)
149

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/TypeScript

All issues in microsoft/TypeScript

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.