chore: add lint:fix script for ESLint auto-fixes#1510
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughAdds a root ChangesLint auto-fix scripts
Estimated code review effort: 1 (Trivial) | ~5 minutes 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 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: 1
🤖 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 `@CHANGELOG.md`:
- Around line 10-11: Update the changelog entry for the lint:fix script to
replace the placeholder [`#XXXX`] reference and URL with the actual pull request
number and corresponding GitHub link once the PR is created.
🪄 Autofix (Beta)
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: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 60313d5c-9208-4cbc-bd69-580d74077215
📒 Files selected for processing (3)
CHANGELOG.mdpackage.jsonpackages/web/package.json
| ### Added | ||
| - Added a `lint:fix` script to auto-fix ESLint issues across workspaces. [#XXXX](https://github.com/sourcebot-dev/sourcebot/pull/XXXX) |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Replace the placeholder PR link.
[#XXXX] is not a valid PR reference. After the PR is created, update this entry to use the actual PR number and URL in the required follow-up commit.
🤖 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 `@CHANGELOG.md` around lines 10 - 11, Update the changelog entry for the
lint:fix script to replace the placeholder [`#XXXX`] reference and URL with the
actual pull request number and corresponding GitHub link once the PR is created.
Source: Coding guidelines
Closes #1466
Added a
lint:fixscript that mirrors the existinglintscript setup — root script fans out viayarn workspaces foreach, and added the actualeslint . --fixcommand in packages/web (currently the only workspace with a lint script).Tested by running
yarn lint:fix— it auto-fixed what ESLint could fix and correctly left 4 warnings that need manual review (unused vars, missing hook deps), same as expected behavior with --fix.Also added a CHANGELOG entry under Unreleased.
Note
Low Risk
Tooling-only script and documentation changes with no runtime or production behavior impact.
Overview
Adds
yarn lint:fixat the repo root, using the sameyarn workspaces foreachpattern aslint, so developers can auto-fix ESLint issues across workspaces from one command.@sourcebot/webgets a matchinglint:fixscript that runseslint . --fixwith the sameSKIP_ENV_VALIDATIONsetup aslint. Other packages are unchanged until they define their ownlint:fix.The unreleased CHANGELOG documents the new script.
Reviewed by Cursor Bugbot for commit 1c6e175. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by CodeRabbit
New Features
lint:fixcommand to automatically detect and fix ESLint issues across workspace packages.lint:fixscript for the web package (eslint . --fix) aligned with the existing lint environment behavior.Documentation
lint:fixcommand in the unreleased changelog.