Skip to content

Add JavaScript and C++ formatting for javascript directory#745

Merged
K20shores merged 2 commits intomainfrom
copilot/update-formatting-scripts
Jan 21, 2026
Merged

Add JavaScript and C++ formatting for javascript directory#745
K20shores merged 2 commits intomainfrom
copilot/update-formatting-scripts

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 20, 2026

Adds automatic formatting for JavaScript and C++ code in the javascript directory via the existing format.yml workflow.

Changes

  • Added Prettier for JavaScript

    • Created .prettierrc with standard config (2-space tabs, single quotes, 100-char width)
    • Added prettier as dev dependency
  • Added npm format scripts

    "format": "npm run format:js && npm run format:cpp",
    "format:js": "prettier --write 'javascript/**/*.js'",
    "format:cpp": "find javascript -type f \\( -name '*.cpp' -or -name '*.hpp' -or -name '*.c' -or -name '*.h' \\) -exec clang-format -i --style=file --verbose {} +"
  • Updated format.yml workflow

    • Added Node.js setup and npm install steps
    • Added step to run npm run format after existing clang-format steps
    • Updated workflow name and commit messages to include Prettier

All JavaScript and C++ files in the javascript directory have been formatted according to the new configuration.

Original prompt

This section details on the original issue you should resolve

<issue_title>Update formatting</issue_title>
<issue_description>With the inclusion of our javascript extension, we need more formatting.

Acceptance criteria

  • all javascript codes is automatically formatted in our format.yml action under the javascript directory
  • all c++ code is automatically formatted in our format.yml action under the javascript directory

Ideas

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI changed the title [WIP] Update formatting for JavaScript and C++ code Add JavaScript and C++ formatting for javascript directory Jan 20, 2026
Copilot AI requested a review from K20shores January 20, 2026 22:49
@K20shores K20shores requested a review from boulderdaze January 20, 2026 22:56
@K20shores K20shores marked this pull request as ready for review January 20, 2026 22:57
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Jan 20, 2026

Codecov Report

❌ Patch coverage is 90.96946% with 68 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.58%. Comparing base (52cea7e) to head (30193c1).

Files with missing lines Patch % Lines
...vascript/mechanism_configuration/reaction_types.js 94.33% 23 Missing ⚠️
javascript/micm/solver.js 67.64% 11 Missing ⚠️
javascript/micm/state.js 88.76% 10 Missing ⚠️
javascript/micm/conditions.js 18.18% 9 Missing ⚠️
javascript/micm/micm.js 90.24% 8 Missing ⚠️
javascript/mechanism_configuration/types.js 93.68% 6 Missing ⚠️
javascript/micm/solver_result.js 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #745      +/-   ##
==========================================
- Coverage   74.60%   74.58%   -0.02%     
==========================================
  Files         109      109              
  Lines        8115     8090      -25     
==========================================
- Hits         6054     6034      -20     
+ Misses       2061     2056       -5     
Flag Coverage Δ
cpp_fortran 68.49% <ø> (ø)
javascript 92.56% <90.96%> (+0.29%) ⬆️
python 78.34% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@K20shores K20shores merged commit 20b5b75 into main Jan 21, 2026
45 of 46 checks passed
@K20shores K20shores deleted the copilot/update-formatting-scripts branch January 21, 2026 03:47
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.

Update formatting

4 participants