Skip to content

chore: Add prettier check to CI#1303

Open
tbwebb22 wants to merge 2 commits intomasterfrom
taylor/prettier-ci
Open

chore: Add prettier check to CI#1303
tbwebb22 wants to merge 2 commits intomasterfrom
taylor/prettier-ci

Conversation

@tbwebb22
Copy link
Contributor

@tbwebb22 tbwebb22 commented Feb 6, 2026

Add prettier format check for Solidity files (contracts/ and script/) to CI, and add yarn format-contracts convenience command. Also fixes the broken glob in lint-fix.

VSCode / Cursor setup - add this to your workspace or user settings.json:

    "[solidity]": {
        "editor.defaultFormatter": "esbenp.prettier-vscode",
        "editor.formatOnSave": true
    },

This ensures VS Code uses the project's node_modules/prettier and .prettierrc to format Solidity files on save, matching what CI enforces. If you don't want format-on-save, you can omit that line and just run yarn format-contracts before committing.

Closes ACP-47

Signed-off-by: Taylor Webb <tbwebb22@gmail.com>
@tbwebb22 tbwebb22 changed the title add prettier to ci chore: Add prettier check to CI Feb 6, 2026
Signed-off-by: Taylor Webb <tbwebb22@gmail.com>
@linear
Copy link

linear bot commented Feb 6, 2026

@tbwebb22 tbwebb22 marked this pull request as ready for review February 6, 2026 21:31
Copy link
Contributor

@grasphoper grasphoper left a comment

Choose a reason for hiding this comment

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

A few Qs:

  • Is "editor.defaultFormatter": "esbenp.prettier-vscode", referring to the prettier -- the node module, or prettier -- the vs code extension? If the extension, are there any extra settings to change on the extension for it to use node_modules/prettier and .prettierrc, .prettierignore and something like prettier-plugin-solidity? E.g. can it happen that the extension is overriding the prettierrc config?
  • yarn pretty-quick --staged: what prettier path + version is that using?
  • should we perhaps upgrade versions of prettier-plugin-solidity, pretty-quick as a part of this change?

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