Skip to content

Add format and format:check scripts#1154

Merged
jdalton merged 2 commits intomainfrom
chore/add-format-scripts
Apr 4, 2026
Merged

Add format and format:check scripts#1154
jdalton merged 2 commits intomainfrom
chore/add-format-scripts

Conversation

@jdalton
Copy link
Copy Markdown
Contributor

@jdalton jdalton commented Apr 3, 2026

Summary

  • Add format and format:check scripts to root package.json
  • Aligns with socket-btm and ultrathink convention

Details

  • format: oxfmt --write . — auto-fix formatting
  • format:check: oxfmt . — check-only (for CI)

Both repos already had oxfmt as a devDependency and in lint-staged, but no top-level scripts to run it standalone.


Note

Low Risk
Low risk: this only adds root-level npm scripts for running the existing formatter and does not affect runtime code or build outputs unless invoked.

Overview
Adds root package.json scripts to run oxfmt directly: format for write-mode formatting (oxfmt --write .) and format:check for check-only runs (oxfmt .). This makes formatting available as a standalone command (e.g., for local use or CI) without changing any application logic.

Written by Cursor Bugbot for commit 5b6435d. Configure here.

Aligns with socket-btm and ultrathink convention:
- format: oxfmt --write . (auto-fix formatting)
- format:check: oxfmt . (check-only, CI)
Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix prepared a fix for the issue found in the latest run.

  • ✅ Fixed: Missing --check flag in format:check script
    • Added the --check flag to the format:check script so it validates formatting without modifying files, as intended for CI usage.

Create PR

Or push these changes by commenting:

@cursor push c4291df99d
Preview (c4291df99d)
diff --git a/package.json b/package.json
--- a/package.json
+++ b/package.json
@@ -24,7 +24,7 @@
     "lint": "node scripts/lint.mjs",
     "lint:all": "node scripts/lint.mjs --all",
     "format": "oxfmt --write .",
-    "format:check": "oxfmt .",
+    "format:check": "oxfmt --check .",
     "// Claude": "",
     "claude": "pnpm --filter @socketsecurity/cli run claude --",
     "// Type Checking": "",

You can send follow-ups to the cloud agent here.

Comment @cursor review or bugbot run to trigger another review on this PR

@jdalton jdalton merged commit f63af52 into main Apr 4, 2026
13 checks passed
@jdalton jdalton deleted the chore/add-format-scripts branch April 4, 2026 13:36
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.

2 participants