Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 10, 2026

PR Checklist:

  • Provide a meaningful description to this PR or mention which issues this fixes.
  • Ensure the project builds with npm run build
  • Add tests for your change. This includes negative tests (i.e. inputs that need to fail) as well as baseline tests (i.e. how should the directory structure look like?).
  • Run the test suite with npm test
  • If there are baseline changes, review them and make a separate commit for them with the comment "accept baselines" if they are desired changes
  • If you added a required option, also add it to the template creation (.github/create_templates.ts)
  • Add a detailed migration description to docs/updates explaining what the user needs to do when manually updating an existing project
  • Add your changes to CHANGELOG.md (referencing the migration description and this PR or the issue you fixed)

Description:

Addresses review comment from #1255 regarding a reported missing trailing comma in the ESM module settings block at templates/tsconfig.json.ts:49.

Investigation Results:

Line 49 contains "noEmit": true, with a trailing comma present. Tested JSON generation across multiple scenarios:

  • TypeScript with/without ESM
  • TypeScript without build with/without ESM
  • JavaScript with type checking and ESM

All scenarios generate valid JSON. The template string interpolation correctly preserves commas:

"noEmit": true,
${
  useESM
    ? `
    // ESM module settings
    "module": "ES2022",
    "moduleResolution": "bundler",
`
    : ""
}

    // check JS files...
    "allowJs": true,

Awaiting clarification on specific case that produces invalid JSON.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Fix ESM module settings in create-adapter PR Investigate and clarify ESM module settings trailing comma issue Jan 10, 2026
Copilot AI requested a review from Apollon77 January 10, 2026 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants