Skip to content

feat: add glob pattern support for project configuration#439

Closed
zackarychapple wants to merge 3 commits intoweb-infra-dev:mainfrom
zackarychapple:main
Closed

feat: add glob pattern support for project configuration#439
zackarychapple wants to merge 3 commits intoweb-infra-dev:mainfrom
zackarychapple:main

Conversation

@zackarychapple
Copy link
Copy Markdown

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.

  • 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

Summary

Related Links

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

- 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
@netlify
Copy link
Copy Markdown

netlify bot commented Jan 15, 2026

Deploy Preview for rslint ready!

Name Link
🔨 Latest commit 84e49ec
🔍 Latest deploy log https://app.netlify.com/projects/rslint/deploys/696910694f1d4d0008f2f536
😎 Deploy Preview https://deploy-preview-439--rslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@fansenze
Copy link
Copy Markdown
Contributor

Thanks for the PR! The changes look great, but there are a few CI failures. For the linting error, I think adding typescript-go/** to ignores in rslint.json should fix it. Could you check the other failures as well?

@zackarychapple
Copy link
Copy Markdown
Author

@fansenze I made an update for the lint, however the typecheck fails on things that are nowhere near my changes. not sure why. Maybe @kdy1 will know. Can you please approve the workflow run so we can see.

@fansenze
Copy link
Copy Markdown
Contributor

fansenze commented Feb 2, 2026

@zackarychapple The glob pattern support looks great! Just a couple of things before we can merge:

  1. Quick rebase needed — The branch is a few commits behind main. We've since fixed some Windows CI issues there, so a rebase should help get those checks passing.
  2. Mind restoring the @ts-nocheck? — I noticed it was removed from worker.ts, but that file depends on wasm_exec.js (Go's WASM runtime) which doesn't have TypeScript definitions yet. That's why the build is failing. Since it's not related to this PR's scope, let's keep it as-is for now — I'll look into adding proper type definitions separately

@fansenze
Copy link
Copy Markdown
Contributor

fansenze commented Mar 5, 2026

Hi @zackarychapple, just checking in — do you have time to address the remaining items (rebase + restoring @ts-nocheck)? They should be pretty quick to wrap up. Let us know if you need any help!

@kdy1
Copy link
Copy Markdown
Collaborator

kdy1 commented Mar 5, 2026

Can I take this task of addressing remaining items?

@kdy1
Copy link
Copy Markdown
Collaborator

kdy1 commented Mar 6, 2026

I opened #493 to carry this over on top of current main and address the remaining maintainer feedback (@ts-nocheck kept in worker.ts, typescript-go/** ignored again, and the config glob support re-applied with tests).

@fansenze fansenze closed this Mar 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants