The isExcludedPath function uses segment-based matching to skip types/ directories, which is meant to filter out auto-generated TypeScript type definition folders. But it also catches legitimate hand-written src/types/ directories that many projects use for their own type definitions.
This isn't a new problem — the old glob pattern **/types/** did the same thing — but now that it's segment-based it's harder to override via config. If you have a directory literally named types with source code you want scanned, there's no way to opt it back in.
Possible fixes:
- Only exclude
.d.ts files instead of entire types/ directories (we already skip .d.ts by extension)
- Make the
types exclusion configurable so projects can override it
- Only exclude root-level
types/ instead of any types segment
The
isExcludedPathfunction uses segment-based matching to skiptypes/directories, which is meant to filter out auto-generated TypeScript type definition folders. But it also catches legitimate hand-writtensrc/types/directories that many projects use for their own type definitions.This isn't a new problem — the old glob pattern
**/types/**did the same thing — but now that it's segment-based it's harder to override via config. If you have a directory literally namedtypeswith source code you want scanned, there's no way to opt it back in.Possible fixes:
.d.tsfiles instead of entiretypes/directories (we already skip.d.tsby extension)typesexclusion configurable so projects can override ittypes/instead of anytypessegment