Skip TypeScript activation and patching for GJS/GTS projects without tsconfig/jsconfig#1076
Closed
Skip TypeScript activation and patching for GJS/GTS projects without tsconfig/jsconfig#1076
Conversation
…nfig/jsconfig For JS/GJS projects without a tsconfig.json or jsconfig.json, the Glint extension was incorrectly: 1. Activating the TypeScript extension 2. Patching it to treat .gjs/.gts as TypeScript-like languages 3. Running configureTsserverPlugin() which logged confusing messages This caused the raw TypeScript parser to try parsing <template> tags in .gjs files, resulting in spurious 'Declaration or statement expected' errors (ts-plugin 1128). Fixes: only activate/patch TypeScript and configure tsserver plugin when findConfigFileInWorkspace() confirms a tsconfig.json/jsconfig.json exists. Co-authored-by: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix TypeScript activation for JS/GJS projects
Skip TypeScript activation and patching for GJS/GTS projects without tsconfig/jsconfig
Mar 12, 2026
27 tasks
Contributor
|
Is this superseded? |
Contributor
|
yup |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
JS/GJS projects without a
tsconfig.jsonorjsconfig.jsonwere receiving spurious TypeScript errors (ts-plugin(1128): Declaration or statement expected) because the extension unconditionally patched the TS extension to treat.gjs/.gtsas TypeScript-like languages — causing the raw TS parser to choke on<template>syntax with no Glint server running to handle it.Changes (
packages/vscode/src/extension.ts)tsExtension.activate()behindhasWorkspaceConfigso TypeScript never activates for config-less GJS projectsjsTsLanguageModes/isSupportedLanguageModemonkey-patch behind the samehasWorkspaceConfigcheck, preventing.gjs/.gtsfrom being registered as TS-like language modesconfigureTsserverPlugin— early-return when no config file is found, eliminating the noise log lines (typescript.configurePlugin not available,Workspace ember-tsc not found) that appeared even when Glint had already correctly skipped activation💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.