Skip to content

Oxfmt#438

Draft
sjvans wants to merge 9 commits into
mainfrom
oxfmt
Draft

Oxfmt#438
sjvans wants to merge 9 commits into
mainfrom
oxfmt

Conversation

@sjvans

@sjvans sjvans commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

@hyperspace-insights

Copy link
Copy Markdown
Contributor

Summary

The following content is AI-generated and provides a summary of the pull request:


Integrate oxfmt Formatter for Code Style Consistency

Chore

🔧 Adds oxfmt (OXC-based formatter) as the project's code formatter, along with configuration and related tooling setup. Minor code style reformatting has been applied across existing files.

Changes

  • .oxfmtrc.jsonc: New formatter configuration file defining code style rules (single quotes, no semicolons, 120 print width, no trailing commas, etc.).
  • package.json: Added fmt and fmt:check scripts using oxfmt, added lint-staged integration to auto-format on commit, and added oxfmt and lint-staged as dev dependencies. Also reordered fields (homepage, license, author, peerDependencies) to match formatter output, and moved main field to its canonical position.
  • jest.config.js: Reformatted a multi-property object literal to span multiple lines per the new style rules.
  • lib/exporter/ConsoleMetricExporter.js: Reformatted a long LOG.info(...) call to wrap across multiple lines within the 120-character print width.
  • .gitignore: Added .claude/ to ignored paths.

  • 🔄 Regenerate and Update Summary
  • ✏️ Insert as PR Description (deletes this comment)
  • 🗑️ Delete comment
PR Bot Information

Version: 1.26.5

  • File Content Strategy: Full file content
  • Summary Prompt: Default Prompt
  • Correlation ID: 9c9108ba-9281-4f2d-86e1-bfbfcbeeda47
  • Event Trigger: pull_request.opened
  • LLM: anthropic--claude-4.6-sonnet
  • Output Template: Default Template

@hyperspace-insights hyperspace-insights 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.

The PR is exploratory ("playing around with oxfmt") but has a concrete formatting regression in jest.config.js where the newly reformatted object literal has its key at column 0, suggesting the formatter output was applied incorrectly or the tool has a bug at that indentation level. The missing newline at EOF in the formatter's own config file is also worth addressing.

PR Bot Information

Version: 1.26.5

  • Event Trigger: pull_request.opened
  • Correlation ID: 9c9108ba-9281-4f2d-86e1-bfbfcbeeda47
  • File Content Strategy: Full file content
  • LLM: anthropic--claude-4.6-sonnet

Comment thread jest.config.js
Comment on lines +11 to +13
process.env.cds_requires_telemetry_tracing = JSON.stringify({
_hana_prom: process.env.HANA_PROM === 'true'
})

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.

Formatting: The object key _hana_prom is not indented - it's at column 0 instead of being indented inside the object literal, which is inconsistent and hard to read.

Suggested change
process.env.cds_requires_telemetry_tracing = JSON.stringify({
_hana_prom: process.env.HANA_PROM === 'true'
})
process.env.cds_requires_telemetry_tracing = JSON.stringify({
_hana_prom: process.env.HANA_PROM === 'true',
})

Double-check suggestion before committing. Edit this comment for amendments.


Please provide feedback on the review comment by checking the appropriate box:

  • 🌟 Awesome comment, a human might have missed that.
  • ✅ Helpful comment
  • 🤷 Neutral
  • ❌ This comment is not helpful

Comment thread package.json Outdated
"oxfmt": "^0.56.0"
},
"peerDependencies": {
"@sap/cds": "^8 || ^9"

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.

Bug: peerDependencies was moved to after devDependencies, which is unconventional, but more critically it was temporarily removed and re-added — verify the final file still contains @sap/cds as a peer dependency (it does at lines 57-59), but this reordering should be intentional.


Please provide feedback on the review comment by checking the appropriate box:

  • 🌟 Awesome comment, a human might have missed that.
  • ✅ Helpful comment
  • 🤷 Neutral
  • ❌ This comment is not helpful

Comment thread .oxfmtrc.jsonc Outdated
"ignorePatterns": [
"*.md"
]
} No newline at end of file

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.

Best Practice: File is missing a trailing newline (\ No newline at end of file) - most linters and editors expect a newline at end of file, and it's inconsistent with the formatter's own intent.


Please provide feedback on the review comment by checking the appropriate box:

  • 🌟 Awesome comment, a human might have missed that.
  • ✅ Helpful comment
  • 🤷 Neutral
  • ❌ This comment is not helpful

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.

1 participant