chore: add prettier formatting enforcement to CI and fix existing formatting#1205
Open
marshacb wants to merge 1 commit into
Open
chore: add prettier formatting enforcement to CI and fix existing formatting#1205marshacb wants to merge 1 commit into
marshacb wants to merge 1 commit into
Conversation
f367c02 to
0130886
Compare
0130886 to
4c0bcf9
Compare
4c0bcf9 to
1a31cb9
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Adds Prettier formatting enforcement to CI and applies repo-wide formatting fixes to match Prettier’s style.
Changes:
- Add a new
prettierjob to the mainsdkGitHub Actions workflow to enforce formatting viayarn lint. - Apply Prettier-driven formatting updates across JS/TS/JSON/YAML/MD/CSS/HTML files.
- Add
.prettierignoreto excludedocs/api_reference/from Prettier checks.
Reviewed changes
Copilot reviewed 177 out of 301 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| wasm/test.js | Prettier formatting in wasm test script |
| wasm/build.js | Prettier formatting in wasm build script |
| wasm/README.md | Markdown formatting updates |
| sdk/tests/record-scanner-integration.spec.ts | Prettier formatting in tests |
| sdk/tests/record-provider.test.ts | Prettier formatting in tests |
| sdk/tests/record-provider.integration.ts | Prettier formatting in tests |
| sdk/tests/network-client.test.ts | Prettier formatting in tests |
| sdk/tests/network-client.integration.ts | Prettier formatting in integration tests |
| sdk/tests/data/proving.ts | Prettier formatting in test data |
| sdk/src/utils.ts | Prettier formatting in utility functions |
| sdk/src/security.ts | Prettier formatting in crypto helpers |
| sdk/src/polyfill/xmlhttprequest.ts | Prettier formatting in polyfill |
| sdk/src/polyfill/worker.ts | Prettier formatting + string literal changes in error messages |
| sdk/src/polyfill/fetch.ts | Prettier formatting in fetch polyfill |
| sdk/src/models/transition/transitionObject.ts | Type formatting tweaks |
| sdk/src/models/transition/transitionJSON.ts | Type formatting tweaks |
| sdk/src/models/transaction/transactionObject.ts | Import formatting tweaks |
| sdk/src/models/record-scanner/tagsResult.ts | Remove trailing whitespace |
| sdk/src/models/record-scanner/statusResult.ts | Remove trailing whitespace |
| sdk/src/models/record-scanner/serialNumbersResult.ts | Remove trailing whitespace |
| sdk/src/models/record-scanner/registrationResponse.ts | Interface punctuation normalized |
| sdk/src/models/record-scanner/registrationRequest.ts | Type punctuation normalized |
| sdk/src/models/record-scanner/recordsResponseFilter.ts | Type punctuation normalized |
| sdk/src/models/record-scanner/ownedRecordsResult.ts | Remove trailing whitespace |
| sdk/src/models/record-scanner/error.ts | Remove trailing whitespace |
| sdk/src/models/record-scanner/encryptedRecordsResult.ts | Type formatting tweaks |
| sdk/src/models/record-provider/ownedRecord.ts | Type punctuation normalized |
| sdk/src/models/record-provider/encryptedRecord.ts | Type punctuation normalized |
| sdk/src/models/provingResponse.ts | Function signature formatting |
| sdk/src/models/plaintext/struct.ts | Type punctuation normalized |
| sdk/src/models/plaintext/plaintext.ts | Union type formatting |
| sdk/src/models/plaintext/array.ts | Union type formatting |
| sdk/src/models/output/outputObject.ts | Interface punctuation normalized |
| sdk/src/models/input/inputObject.ts | Interface punctuation normalized |
| sdk/src/models/imports.ts | Export punctuation normalized |
| sdk/src/models/functionObject.ts | Interface keys normalized |
| sdk/src/models/functionInput.ts | Interface punctuation normalized |
| sdk/src/models/finalizeJSON.ts | Interface keys normalized |
| sdk/src/models/encryptedProvingRequest.ts | Interface punctuation normalized |
| sdk/src/models/deployment/deploymentObject.ts | Interface keys normalized |
| sdk/src/models/deployment/deploymentJSON.ts | Interface keys normalized |
| sdk/src/models/cryptoBoxPubkey.ts | Interface punctuation normalized |
| sdk/src/models/confirmed_transaction.ts | Interface punctuation normalized |
| sdk/src/models/blockJSON.ts | Array/union type formatting |
| sdk/src/integrations/sealance/merkle-tree.ts | Prettier formatting in integration code |
| sdk/src/constants.ts | Formatting + line wrapping of constants |
| sdk/src/browser.ts | Import formatting and export formatting |
| sdk/src/account.ts | Prettier formatting in Account methods |
| sdk/rollup.test.js | Prettier formatting in rollup test config |
| sdk/rollup.config.js | Prettier formatting in rollup config |
| sdk/jsdoc.json | JSON formatting and wrapping |
| sdk/README.md | Markdown list formatting and spacing |
| scripts/change-version.js | Prettier formatting in script |
| e2e/testnet/index.js | Prettier formatting in e2e script |
| e2e/nodenext/tsconfig.json | JSON formatting in tsconfig |
| e2e/nodenext/index.ts | Import formatting in e2e TS entry |
| e2e/mainnet/index.js | Prettier formatting in e2e script |
| e2e/dynamic/index.js | Prettier formatting in e2e script |
| docs/guide/10_finding_records.md | Markdown formatting and wrapping |
| docs/guide/08_public_program_state.md | Markdown formatting and wrapping |
| docs/guide/07_deploying_programs.md | Markdown formatting and wrapping |
| docs/guide/04_programs.md | Markdown formatting and wrapping |
| docs/guide/03_creating_accounts.md | Markdown formatting and wrapping |
| docs/guide/02_setup.md | Markdown formatting and wrapping |
| docs/guide/01_intro.md | Markdown formatting and wrapping |
| docs/examples/04_execute_program.md | Markdown formatting and snippet reflow |
| docs/examples/03_deploy_program.md | Markdown formatting and snippet reflow |
| docs/examples/02_transfer_private.md | Markdown formatting and snippet reflow |
| docs/examples/01_transfer_public.md | Markdown formatting and snippet reflow |
| docs/create-leo-app/02_react_js_tutorial.md | Markdown wrapping and admonition formatting |
| docs/create-leo-app/01_intro.md | Markdown formatting and list normalization |
| docs/00_overview.md | Markdown formatting and wrapping |
| create-leo-app/template-vanilla/worker.js | Prettier formatting in template worker |
| create-leo-app/template-vanilla/vite.config.js | Prettier formatting in Vite config |
| create-leo-app/template-react-ts/webpack.config.ts | Prettier formatting in webpack config |
| create-leo-app/template-react-ts/vite.config.ts | Prettier formatting in Vite config |
| create-leo-app/template-react-ts/tsconfig.json | Prettier formatting in tsconfig |
| create-leo-app/template-react-ts/src/App.tsx | Prettier formatting in template app |
| create-leo-app/template-react-ts/index.html | Prettier formatting in HTML/CSS |
| create-leo-app/template-react-ts/helloworld/README.md | Markdown spacing tweaks |
| create-leo-app/template-react-ts/README.md | Markdown wrapping |
| create-leo-app/template-react-ts/.eslintrc.cjs | Prettier formatting in ESLint config |
| create-leo-app/template-react-managed-worker/vite.config.js | Prettier formatting in Vite config |
| create-leo-app/template-react-managed-worker/src/App.jsx | Prettier formatting in template app |
| create-leo-app/template-react-managed-worker/index.html | Prettier formatting in HTML/CSS |
| create-leo-app/template-react-managed-worker/README.md | Markdown wrapping |
| create-leo-app/template-react-managed-worker/.eslintrc.cjs | Prettier formatting in ESLint config |
| create-leo-app/template-react-loyalty-program-ts/webpack.config.ts | Prettier formatting in webpack config |
| create-leo-app/template-react-loyalty-program-ts/vite.config.ts | Prettier formatting in Vite config |
| create-leo-app/template-react-loyalty-program-ts/src/main.tsx | Prettier formatting in entrypoint |
| create-leo-app/template-react-loyalty-program-ts/src/App.css | CSS formatting changes |
| create-leo-app/template-react-loyalty-program-ts/loyalty_token/build/abi.json | JSON formatting in generated ABI |
| create-leo-app/template-react-loyalty-program-ts/loyalty_rewards/build/imports/loyalty_token.abi.json | JSON formatting in imported ABI |
| create-leo-app/template-react-loyalty-program-ts/loyalty_rewards/build/abi.json | JSON formatting in generated ABI |
| create-leo-app/template-react-loyalty-program-ts/README.md | Markdown wrapping and list spacing |
| create-leo-app/template-react-leo/webpack.config.js | Prettier formatting in webpack config |
| create-leo-app/template-react-leo/vite.config.js | Prettier formatting in Vite config |
| create-leo-app/template-react-leo/src/App.jsx | Prettier formatting in template app |
| create-leo-app/template-react-leo/index.html | Prettier formatting in HTML/CSS |
| create-leo-app/template-react-leo/helloworld/README.md | Markdown spacing tweaks |
| create-leo-app/template-react-leo/README.md | Markdown wrapping |
| create-leo-app/template-react-leo/.eslintrc.cjs | Prettier formatting in ESLint config |
| create-leo-app/template-react-credits-aleo-functions-ts/src/workers/worker.ts | Prettier formatting in worker code |
| create-leo-app/template-react-credits-aleo-functions-ts/src/App.tsx | JSX formatting updates |
| create-leo-app/template-react-credits-aleo-functions-ts/README.md | Markdown wrapping |
| create-leo-app/template-private-transaction-ts/src/index.ts | Prettier formatting in template |
| create-leo-app/template-private-transaction-ts/rollup.config.js | Prettier formatting in rollup config |
| create-leo-app/template-private-transaction-ts/README.md | Markdown wrapping |
| create-leo-app/template-offline-public-transaction-ts/src/index.ts | Prettier formatting in template |
| create-leo-app/template-offline-public-transaction-ts/src/helpers.ts | Prettier formatting in helpers |
| create-leo-app/template-offline-public-transaction-ts/rollup.config.js | Prettier formatting in rollup config |
| create-leo-app/template-offline-public-transaction-ts/README.md | Markdown wrapping and list formatting |
| create-leo-app/template-node/index.js | Prettier formatting in node template |
| create-leo-app/template-node-ts/src/index.ts | Prettier formatting in TS node template |
| create-leo-app/template-node-ts/rollup.config.js | Prettier formatting in rollup config |
| create-leo-app/template-node-loyalty-program-ts/loyalty_token/build/abi.json | JSON formatting in generated ABI |
| create-leo-app/template-node-loyalty-program-ts/loyalty_rewards/build/imports/loyalty_token.abi.json | JSON formatting in imported ABI |
| create-leo-app/template-node-loyalty-program-ts/loyalty_rewards/build/abi.json | JSON formatting in generated ABI |
| create-leo-app/template-node-loyalty-program-ts/README.md | Markdown wrapping and table formatting |
| create-leo-app/template-node-credits-aleo-functions-ts/src/index.ts | Prettier formatting in template |
| create-leo-app/template-node-credits-aleo-functions-ts/README.md | Markdown wrapping |
| create-leo-app/template-nextjs-ts/src/app/worker.ts | Prettier formatting in worker |
| create-leo-app/template-nextjs-ts/src/app/page.tsx | Prettier formatting in page |
| create-leo-app/template-nextjs-ts/src/app/page.module.css | CSS formatting updates |
| create-leo-app/template-nextjs-ts/src/app/layout.tsx | Prettier formatting + quote normalization |
| create-leo-app/template-nextjs-ts/src/app/globals.css | CSS formatting updates |
| create-leo-app/template-nextjs-ts/next.config.js | Prettier formatting in config |
| create-leo-app/template-extension/static/offscreen.html | HTML formatting updates |
| create-leo-app/template-extension/static/manifest.json | Manifest JSON formatting |
| create-leo-app/template-extension/src/worker.js | Prettier formatting in extension worker |
| create-leo-app/template-extension/src/service_worker.js | Prettier formatting in service worker |
| create-leo-app/template-extension/README.md | Markdown admonition formatting |
| create-leo-app/template-devnode-js/index.js | Prettier formatting in devnode template |
| create-leo-app/template-devnode-js/README.md | Markdown wrapping |
| create-leo-app/template-build-and-execute-authorization-ts/src/index.ts | Prettier formatting in template |
| create-leo-app/template-build-and-execute-authorization-ts/rollup.config.js | Prettier formatting in rollup config |
| create-leo-app/src/index.ts | Prettier formatting in CLI code |
| create-leo-app/index.js | Prettier formatting in entrypoint |
| create-leo-app/build.config.ts | Prettier formatting in build config |
| create-leo-app/README.md | Markdown wrapping |
| README.md | Markdown wrapping and list formatting |
| .prettierignore | Ignore generated API reference docs |
| .github/workflows/update-snarkvm.yml | Quote normalization / formatting |
| .github/workflows/sdk.yml | Add prettier formatting-check job |
| .github/actions/setup-yarn/action.yml | Quote normalization / formatting |
| .github/ISSUE_TEMPLATE/proposal.md | Quote normalization / formatting |
| .github/ISSUE_TEMPLATE/feature.md | Markdown wrapping |
| .github/ISSUE_TEMPLATE/documentation.md | Quote normalization / formatting |
| .github/ISSUE_TEMPLATE/config.yml | YAML wrapping |
| .github/ISSUE_TEMPLATE.md | Markdown wrapping |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
1a31cb9 to
3f517d8
Compare
3f517d8 to
41adb8b
Compare
|
You have run out of free Bugbot PR reviews for this billing cycle. This will reset on March 24. To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial. |
41adb8b to
28dd361
Compare
28dd361 to
d0b59a2
Compare
d0b59a2 to
5cd5641
Compare
5cd5641 to
984559f
Compare
984559f to
e4f8bf9
Compare
e4f8bf9 to
a260dbc
Compare
a260dbc to
96af347
Compare
96af347 to
3a8aa9d
Compare
3a8aa9d to
79dff57
Compare
79dff57 to
b40442a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Add Prettier formatting enforcement to CI, mirroring how
cargo fmt --checkenforces Rust formatting. Fixes all existing formatting violations across the repo.Test Plan
Note
Medium Risk
Mostly mechanical formatting, but it touches CI YAML and some JS/TS entrypoints; a mis-indented workflow or subtle string/command change could break builds or scaffolding.
Overview
Adds CI formatting enforcement by introducing a
prettierjob insdk.ymlthat runsyarn lint(Prettier--check) alongside existing Rustcargo fmt --check.Applies Prettier formatting repo-wide, re-indenting/quoting many GitHub Actions/workflows and templates, docs, and
create-leo-appsources/templates (including a small output tweak increate-leo-app/src/index.tsto use a template-specificcustomCommandlikestartinstead of alwaysdev). Also adds.prettierignoreto excludedocs/api_reference/.Written by Cursor Bugbot for commit 3f517d8. This will update automatically on new commits. Configure here.