- Implements glob expansion for project paths as documented at https://rslint.rs/config/
- Uses existing doublestar/v4 dependency for pattern matching
- Adds comprehensive test coverage with 7 test cases
- Maintains backward compatibility with non-glob paths
- Updates rslint's own config to use glob patterns
- Adds deduplication to handle overlapping patterns
This resolves the FIXME comment about 'enable legacy multi tsconfig project'
Changes:
- internal/config/loader.go: Add glob detection and expansion logic
- internal/config/loader_test.go: Add comprehensive test suite (NEW)
- rslint.json: Refactor to use glob patterns
Benefits:
- Simplifies monorepo configuration (3 lines vs 10+ explicit paths)
- Automatically discovers new packages/apps without config updates
- Matches documented behavior
- No new dependencies
- Full backward compatibility
Testing:
All tests passing: go test ./internal/config/... -v
- TestContainsGlobPattern
- TestLoadTsConfigsFromRslintConfig_GlobExpansion
- TestLoadTsConfigsFromRslintConfig_NoMatches
- TestLoadTsConfigsFromRslintConfig_MixedGlobAndNonGlob
- TestLoadTsConfigsFromRslintConfig_Deduplication
- TestLoadTsConfigsFromRslintConfig_NonExistentNonGlobFile
- TestLoadTsConfigsFromRslintConfig_DoubleStarPattern
The official documentation states that glob patterns work in the project configuration, however this code was commented out waiting for support in ts-go, it appears this support has been added. I verified that this is working for our project.
This resolves the FIXME comment about 'enable legacy multi tsconfig project'
Changes:
Benefits:
Testing:
All tests passing: go test ./internal/config/... -v
Summary
Related Links
Checklist