Skip to content

Conversation

xfq
Copy link
Contributor

@xfq xfq commented Jun 16, 2022

Description of Problem

There are some different auto-formatting styles in some PRs.

Proposed Solution

Add a pre-commit hook.

Additional Information

See #233

@netlify
Copy link

netlify bot commented Jun 16, 2022

Deploy Preview for vuejs ready!

Name Link
🔨 Latest commit ab2197b
🔍 Latest deploy log https://app.netlify.com/sites/vuejs/deploys/62ab164b8a4fcb00084cdcff
😎 Deploy Preview https://deploy-preview-1778--vuejs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@skirtles-code
Copy link
Contributor

We've experimented with using automatic formatting before, but it's always proven to be problematic. The examples in the docs sometimes need the flexibility to deviate from strict formatting rules to allow for more effective communication.

I just tried running Prettier over the existing files and it does find some inconsistencies that need to be fixed. But it also changes things that really shouldn't be changed. While there are some weaker styling rules that could theoretically be applied, I don't think we'd be able to achieve that using Prettier.

I'm going to leave this open for now, as we need to fix some of the actual mistakes that Prettier finds.

@yyx990803
Copy link
Member

For the reason explained - some examples are easier to understand when hand-formatted.

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.

3 participants