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..0a14547 100644 --- a/index.js +++ b/index.js @@ -148,12 +148,15 @@ 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;