Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[election-ui-js] Use Prettier to autoformat code #92

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

paulbrimicombe
Copy link
Contributor

What?

  • Use prettier to auto-format code in the election-ui-javascript project

Why?

  • We have already done this in the election-api-javascript project (see [election-api-js]: Use prettier for code formatting #88)
  • It is a very common pattern to use prettier (and similar tools) to automatically format code in a consistent manner. I have set it up to auto-format the project files when you run npm test.

Notes

  • This is somewhat a matter of taste so feel free to disagree with this change but please do give reasons if you do!
  • I promise that I've not made any changes other than:
    • Installing prettier
    • Adding the .prettierignore file
    • Adding prettier to the test script in package.json
    • Running npm test to format all the code and run the tests

Copy link
Contributor

@TimPerry TimPerry left a comment

Choose a reason for hiding this comment

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

LGTM

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