Repository navigation
feat: TypeScript error pattern support (closes #84) - #98
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
🚧 Files skipped from review as they are similar to previous changes (4)
📝 WalkthroughWalkthroughThe CLI now runs ChangesTypeScript support
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related issues
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@bin/index.js`:
- Around line 112-116: Update the child-process launch around isTsFile,
resolveTsRunner, and execArgs so TypeScript files invoke the resolved runner
executable directly (or via npx --no-install) with filePath, while JavaScript
files continue using process.execPath. Adjust the command and arguments
consistently for both branches.
In `@lib/database.json`:
- Around line 520-525: Differentiate the TS2305 and TS2694 diagnostics by
assigning each a unique match phrase so matching by name cannot merge their
guidance: update lib/database.json lines 520-525 for TS2694 and lines 456-461
for TS2305. Replace the corresponding generic and duplicate localization keys in
locales/en.json lines 214-218 and 249-253 with keys for those unique phrases.
Update test/test-ts.js lines 7-14 to assert one result and the expected
diagnostic name for both cases.
- Around line 584-589: Update the database entry for “Cannot find global type”
from TS2309 to TS2318, preserving its existing match, explanation, fixes, and
example. Locate the related diagnostic-code test and replace its expected TS2309
value with TS2318.
- Around line 512-517: Update the TS2488 diagnostic configuration in
lib/database.json (lines 512-517) so match includes the emitted
“[Symbol.iterator]()” token; rename the corresponding localization keys in
locales/en.json (lines 244-248) to the corrected phrase, and update the TS2488
assertion in test/test-ts.js (line 13) to verify that token is present.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: e17b071e-90f1-4e6e-b891-a24dd855822e
📒 Files selected for processing (4)
bin/index.jslib/database.jsonlocales/en.jsontest/test-ts.js
- bin/index.js: spawn TS runner via 'npx --no-install' instead of treating the runner name as a Node script path; keep JS files on process.execPath
- lib/database.json: give TS2305 (module...) and TS2694 (namespace...) unique match phrases so guidance is no longer merged; use emitted '[Symbol.iterator]()' token for TS2488; correct TS2309 -> TS2318 ('Cannot find global type')
- locales/en.json: rename duplicate localization keys to the new unique match phrases
- test/test-ts.js: assert exactly-one match and the expected diagnostic name for the differentiated cases
|
@coderabbitai review |
✅ Action performedReview finished.
|
What
Adds TypeScript error pattern matching to errlens, closing #84.
Changes
Notes
Summary by CodeRabbit
New Features
errlens runcommand.Tests