Skip to content

chore: add prettier formatting enforcement to CI and fix existing formatting#1205

Open
marshacb wants to merge 1 commit into
mainnetfrom
chore/prettier-sdk-linting
Open

chore: add prettier formatting enforcement to CI and fix existing formatting#1205
marshacb wants to merge 1 commit into
mainnetfrom
chore/prettier-sdk-linting

Conversation

@marshacb
Copy link
Copy Markdown
Collaborator

@marshacb marshacb commented Feb 24, 2026

Motivation

Add Prettier formatting enforcement to CI, mirroring how cargo fmt --check enforces Rust formatting. Fixes all existing formatting violations across the repo.

Test Plan

  • yarn lint passes (all files match Prettier code style).

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 prettier job in sdk.yml that runs yarn lint (Prettier --check) alongside existing Rust cargo fmt --check.

Applies Prettier formatting repo-wide, re-indenting/quoting many GitHub Actions/workflows and templates, docs, and create-leo-app sources/templates (including a small output tweak in create-leo-app/src/index.ts to use a template-specific customCommand like start instead of always dev). Also adds .prettierignore to exclude docs/api_reference/.

Written by Cursor Bugbot for commit 3f517d8. This will update automatically on new commits. Configure here.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds Prettier formatting enforcement to CI and applies repo-wide formatting fixes to match Prettier’s style.

Changes:

  • Add a new prettier job to the main sdk GitHub Actions workflow to enforce formatting via yarn lint.
  • Apply Prettier-driven formatting updates across JS/TS/JSON/YAML/MD/CSS/HTML files.
  • Add .prettierignore to exclude docs/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.

Comment thread sdk/src/models/input/inputObject.ts
Comment thread docs/examples/02_transfer_private.md
Comment thread docs/examples/01_transfer_public.md
Comment thread e2e/testnet/index.js
@cursor
Copy link
Copy Markdown

cursor Bot commented Mar 3, 2026

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.

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