Skip to content

chore: add lint:fix script for ESLint auto-fixes#1510

Open
var-raphael wants to merge 2 commits into
sourcebot-dev:mainfrom
var-raphael:chore/lint-fix-script
Open

chore: add lint:fix script for ESLint auto-fixes#1510
var-raphael wants to merge 2 commits into
sourcebot-dev:mainfrom
var-raphael:chore/lint-fix-script

Conversation

@var-raphael

@var-raphael var-raphael commented Jul 26, 2026

Copy link
Copy Markdown

Closes #1466

Added a lint:fix script that mirrors the existing lint script setup — root script fans out via yarn workspaces foreach, and added the actual eslint . --fix command 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:fix at the repo root, using the same yarn workspaces foreach pattern as lint, so developers can auto-fix ESLint issues across workspaces from one command.

@sourcebot/web gets a matching lint:fix script that runs eslint . --fix with the same SKIP_ENV_VALIDATION setup as lint. Other packages are unchanged until they define their own lint: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

    • Added a root lint:fix command to automatically detect and fix ESLint issues across workspace packages.
    • Added a lint:fix script for the web package (eslint . --fix) aligned with the existing lint environment behavior.
  • Documentation

    • Documented the new lint:fix command in the unreleased changelog.

@coderabbitai

coderabbitai Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 59a09141-a14c-4fbb-a9dc-b0110368b9e7

📥 Commits

Reviewing files that changed from the base of the PR and between 52e9795 and 1c6e175.

📒 Files selected for processing (1)
  • CHANGELOG.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • CHANGELOG.md

Walkthrough

Adds a root lint:fix workspace command, a web workspace ESLint auto-fix script, and an Unreleased changelog entry documenting the new command.

Changes

Lint auto-fix scripts

Layer / File(s) Summary
Workspace lint auto-fix flow
package.json, packages/web/package.json, CHANGELOG.md
The root script runs lint:fix topologically across workspaces; the web script runs eslint . --fix with SKIP_ENV_VALIDATION=1; the changelog records the addition.

Estimated code review effort: 1 (Trivial) | ~5 minutes

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The PR adds the root shortcut and web script, but it misses the other four workspace scripts and the required CONTRIBUTING.md update from #1466. Add lint:fix to backend, db, schemas, and shared; update CONTRIBUTING.md; then verify yarn lint:fix and yarn lint.
Out of Scope Changes check ⚠️ Warning The CHANGELOG.md entry is unrelated to the requested lint script and CONTRIBUTING.md changes, so it appears to be extra scope. Remove the changelog edit or move it to a separate release-notes PR unless it's required by repository policy.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is concise and accurately describes the main change: adding an auto-fix lint script.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 9491a13 and 52e9795.

📒 Files selected for processing (3)
  • CHANGELOG.md
  • package.json
  • packages/web/package.json

Comment thread CHANGELOG.md Outdated
Comment on lines +10 to +11
### Added
- Added a `lint:fix` script to auto-fix ESLint issues across workspaces. [#XXXX](https://github.com/sourcebot-dev/sourcebot/pull/XXXX)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chore(ci): add yarn lint:fix script for ESLint auto-fixes

1 participant