From d371cc27d1ce8a727dbaa58de26078809cb68cfd Mon Sep 17 00:00:00 2001 From: Peter Wagenet Date: Sat, 2 May 2026 08:23:25 -0700 Subject: [PATCH 1/2] Enable Glint by default for both JS and TS apps MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Implements RFC #976 (https://github.com/emberjs/rfcs/pull/976): install and configure Glint v2 in blueprint output regardless of --typescript. JS apps get IDE tooling via jsconfig.json + the TypeScript Server plugin; TS apps get the full template type-check via the ember-tsc CLI. - Move @glint/ember-tsc, @glint/template, @glint/tsserver-plugin, @ember/app-tsconfig, and typescript out of the <% if (typescript) %> blocks in package.json so they install for both paths. - Add files/jsconfig.json for the JS path (extends @ember/app-tsconfig, noEmit:true). Filter it out for TS apps in index.js. - Stop excluding tsconfig.json's `types/` directory for JS apps — types/ is referenced by both jsconfig.json and tsconfig.json. The lint:types script remains TS-only (ember-tsc --noEmit). JS apps opt into editor tooling without a CLI type-check workflow. Co-Authored-By: Claude Opus 4.7 (1M context) --- files/jsconfig.json | 19 +++++++++++++++++++ files/package.json | 14 +++++++------- index.js | 6 ++++-- 3 files changed, 30 insertions(+), 9 deletions(-) create mode 100644 files/jsconfig.json diff --git a/files/jsconfig.json b/files/jsconfig.json new file mode 100644 index 0000000..984906a --- /dev/null +++ b/files/jsconfig.json @@ -0,0 +1,19 @@ +{ + "extends": "@ember/app-tsconfig", + "include": ["app", "tests", "types"], + "compilerOptions": { + "allowJs": true, + "noEmit": true, + "paths": { + "<%= name %>/tests/*": ["./tests/*"], + "<%= name %>/*": ["./app/*"], + "*": ["./types/*"] + }, + "types": [ + "ember-source/types", + "@embroider/core/virtual", + "vite/client", + "@glint/ember-tsc/types" + ] + } +} diff --git a/files/package.json b/files/package.json index 27034ad..5cab91c 100644 --- a/files/package.json +++ b/files/package.json @@ -35,8 +35,8 @@ "@babel/runtime": "^7.29.2", "@babel/plugin-transform-runtime": "^7.29.0<% if (typescript) { %>", "@babel/plugin-transform-typescript": "^7.28.6<% } %>", - "@babel/eslint-parser": "^7.28.6<% if (typescript) { %>", - "@ember/app-tsconfig": "^2.0.0<% } %>", + "@babel/eslint-parser": "^7.28.6", + "@ember/app-tsconfig": "^2.0.0", "@ember/optional-features": "^3.0.0", "@ember/string": "^4.0.1", "@ember/test-helpers": "^5.4.1", @@ -49,10 +49,10 @@ "@embroider/config-meta-loader": "^1.0.0", "@embroider/legacy-inspector-support": "^0.1.3", "@eslint/js": "^9.39.4", - "@glimmer/component": "^2.1.1<% if (typescript) { %>", + "@glimmer/component": "^2.1.1", "@glint/ember-tsc": "^1.5.0", "@glint/template": "^1.7.7", - "@glint/tsserver-plugin": "^2.4.0<% } %>", + "@glint/tsserver-plugin": "^2.4.0", "@rollup/plugin-babel": "^7.0.0<% if (typescript) { %>", "@types/qunit": "^2.19.13", "@types/rsvp": "^4.0.9<% } %><% if (warpDrive) { %>", @@ -88,9 +88,9 @@ "qunit-dom": "^3.5.1", "stylelint": "^17.8.0", "stylelint-config-standard": "^40.0.0", - "testem": "^3.20.0<% if (typescript) { %>", - "typescript": "^6.0.3", - "typescript-eslint": "^8.58.2<% } %>", + "testem": "^3.20.0", + "typescript": "^6.0.3",<% if (typescript) { %> + "typescript-eslint": "^8.58.2",<% } %> "vite": "^8.0.9" }, "engines": { diff --git a/index.js b/index.js index dfdac88..74b00fe 100644 --- a/index.js +++ b/index.js @@ -148,12 +148,14 @@ module.exports = { (file) => file !== 'tsconfig.json' && file !== 'app/config/environment.ts' && - !file.startsWith('types/') && !file.endsWith('.d.ts'), ); } else { // For TypeScript apps, exclude the JS version of app/config/environment - files = files.filter((file) => file !== 'app/config/environment.js'); + // and the JS-only jsconfig.json. + files = files.filter( + (file) => file !== 'app/config/environment.js' && file !== 'jsconfig.json', + ); } const warpDrive = options.warpDrive || options.emberData; From 0584699afa9f9a310057d6cb25c19a7c0d727d5d Mon Sep 17 00:00:00 2001 From: Peter Wagenet Date: Mon, 4 May 2026 15:56:03 -0700 Subject: [PATCH 2/2] Apply prettier formatting to index.js Co-Authored-By: Claude Opus 4.7 (1M context) --- index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 74b00fe..0a14547 100644 --- a/index.js +++ b/index.js @@ -154,7 +154,8 @@ module.exports = { // For TypeScript apps, exclude the JS version of app/config/environment // and the JS-only jsconfig.json. files = files.filter( - (file) => file !== 'app/config/environment.js' && file !== 'jsconfig.json', + (file) => + file !== 'app/config/environment.js' && file !== 'jsconfig.json', ); }