Skip to main content

Code formatting

There are all kinds of ways to format your code. It can become tricky to keep code readable when different programmers work on the same project and have different styles of code throughout the project.

Prettier

Prettier is an opinionated code formatter. It helps you format your code automatically for you. When working together in Git it's important to make sure everybody in the team is using the same configuation. This way you'll avoid committing unintended formatted code to your repository.

By far the biggest reason for adopting Prettier is to stop all the on-going debates over styles.

Humanoids plugin

We've created a custom Prettier configuration which we will be using within our TaskFlow codebase.

You can download and initialise the formatter on this page.

Our configuration is based on the Airbnb code style which was written to increase code readability and consistency.

Further reading