bloom-frontend icon indicating copy to clipboard operation
bloom-frontend copied to clipboard

Add vscode settings + format on commit

Open annarhughes opened this issue 10 months ago • 2 comments

What changes did you make?

Added vscode settings for autoformatting code on save. Added pre-commit/husky setup to run prettier formatter on commit. This should be working as a pre-commit action but husky is adding the changes after the commit is pushed. This means a second commit can then be pushed for lint changes.

Why did you make the changes?

To keep code formatting in sync

annarhughes avatar Apr 08 '24 14:04 annarhughes

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
bloom-frontend ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 13, 2024 10:14am

vercel[bot] avatar Apr 08 '24 14:04 vercel[bot]

Nice @annarhughes! Two things:

  • Can you add documentation for how this behaves in the README? No worries about perfect phrasing & formatting, a basic explanation is fine. I'll edit after.
  • You mentioned this requiring VSCode. Can we document how these settings could be removed for use with other IDEs? VSCode is by far the most popular, but I'd be concerned about excluding Jetbrains which is the second leading IDE.

kyleecodes avatar Apr 10 '24 00:04 kyleecodes

@kyleecodes I've added notes to the readme now! Ah and it's not that VSCode is required for this to work, it's that we have extra settings/automation for formatting and linting on VSCode. Developers using alternative IDE's should be able to replicate or follow the settings on their IDE

annarhughes avatar May 13 '24 10:05 annarhughes