Summary
When a .gts file (Glimmer TypeScript — used in Ember.js / Glimmer.js) imports a module via a tsconfig path alias, fallow does not resolve the alias and the imported module appears unreachable.
Environment
- fallow 2.62.0
- Ember.js monorepo (pnpm workspaces)
Reproduction
tsconfig.json:
{
"compilerOptions": {
"baseUrl": ".",
"paths": {
"my-app/*": ["./app/*"]
}
}
}
app/components/my-component.gts:
import MyService from 'my-app/services/my-service';
export default class MyComponent extends Component {
@service declare myService: MyService;
}
Where app/services/my-service.ts exists on disk.
Result: fallow reports app/services/my-service.ts as unused.
Expected: fallow resolves my-app/services/my-service → app/services/my-service.ts via the tsconfig path alias, the same way it does when the import appears in a .ts file.
Context
The workspaces documentation states: "Path aliases from each package's tsconfig.json are used when resolving imports within that package." This works correctly for .ts importers but not for .gts importers.
.gts is the standard TypeScript file format for Glimmer components — syntactically TypeScript with an embedded <template> block, part of the Glimmer Component Authoring Format. tsconfig path aliases should apply to it the same way they apply to .ts.
Workaround
Adding the affected directories to entry in .fallowrc.json suppresses the false positives but also prevents fallow from detecting genuinely dead files in those directories.
Summary
When a
.gtsfile (Glimmer TypeScript — used in Ember.js / Glimmer.js) imports a module via a tsconfig path alias, fallow does not resolve the alias and the imported module appears unreachable.Environment
Reproduction
tsconfig.json:{ "compilerOptions": { "baseUrl": ".", "paths": { "my-app/*": ["./app/*"] } } }app/components/my-component.gts:Where
app/services/my-service.tsexists on disk.Result: fallow reports
app/services/my-service.tsas unused.Expected: fallow resolves
my-app/services/my-service→app/services/my-service.tsvia the tsconfig path alias, the same way it does when the import appears in a.tsfile.Context
The workspaces documentation states: "Path aliases from each package's
tsconfig.jsonare used when resolving imports within that package." This works correctly for.tsimporters but not for.gtsimporters..gtsis the standard TypeScript file format for Glimmer components — syntactically TypeScript with an embedded<template>block, part of the Glimmer Component Authoring Format. tsconfig path aliases should apply to it the same way they apply to.ts.Workaround
Adding the affected directories to
entryin.fallowrc.jsonsuppresses the false positives but also prevents fallow from detecting genuinely dead files in those directories.