chore: add lint workflow for PRs#1200
Conversation
Adds a Lint workflow that fans out via a new root `lint` script (mirroring the existing `test` script's foreach pattern) and fixes the existing no-explicit-any errors in the review-agent test files so the workflow lands green. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
@brendan-kellam your pull request is missing a changelog! |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughAdds a GitHub Actions lint workflow (PRs to main) and a root ChangesLint workflow and test type safety
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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.
🧹 Nitpick comments (1)
.github/workflows/lint.yml (1)
18-21: ⚡ Quick winConsider enabling dependency caching for faster CI runs.
The
setup-nodeaction supports built-in caching for Yarn dependencies. Adding caching would significantly speed up subsequent workflow runs by reusing installed dependencies.⚡ Proposed enhancement to enable Yarn caching
- name: Use Node.js uses: actions/setup-node@v4 with: node-version: '20.x' + cache: 'yarn'🤖 Prompt for 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. In @.github/workflows/lint.yml around lines 18 - 21, Update the GitHub Actions step that uses actions/setup-node@v4 (the block containing node-version: '20.x') to enable built-in dependency caching for Yarn by adding the cache option (cache: 'yarn') and set cache-dependency-path to point at yarn.lock (e.g., cache-dependency-path: '**/yarn.lock'); this will allow setup-node to restore and persist Yarn dependencies across runs and speed up CI.
🤖 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.
Nitpick comments:
In @.github/workflows/lint.yml:
- Around line 18-21: Update the GitHub Actions step that uses
actions/setup-node@v4 (the block containing node-version: '20.x') to enable
built-in dependency caching for Yarn by adding the cache option (cache: 'yarn')
and set cache-dependency-path to point at yarn.lock (e.g.,
cache-dependency-path: '**/yarn.lock'); this will allow setup-node to restore
and persist Yarn dependencies across runs and speed up CI.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 3ff5a45e-4d37-467f-afa7-0b1f34521512
📒 Files selected for processing (6)
.github/workflows/lint.ymlpackage.jsonpackages/web/src/features/agents/review-agent/nodes/githubPrParser.test.tspackages/web/src/features/agents/review-agent/nodes/githubPushPrReviews.test.tspackages/web/src/features/agents/review-agent/nodes/gitlabMrParser.test.tspackages/web/src/features/agents/review-agent/nodes/gitlabPushMrReviews.test.ts
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
License Audit
Weak Copyleft Packages (informational)
Resolved Packages (20)
|
Summary
.github/workflows/lint.ymlthat runs on PRs tomainand executesyarn lint.lintscript (yarn workspaces foreach --all --topological run lint) mirroring the existingtestscript — only@sourcebot/webdefines alintscript today, but new packages with alintscript will be picked up automatically.@typescript-eslint/no-explicit-anyerrors inreview-agenttest files so the new workflow lands green. Replacesas anycasts on mock Octokit / Gitlab clients withas unknown as Octokit/as unknown as GitlabClient.Test plan
yarn lintexits 0 locally (0 errors, 7 pre-existing warnings remain)Lintcheck appears and passes on this PR🤖 Generated with Claude Code
Summary by CodeRabbit