vuestorefront / storefront-api

Storefront GraphQL API Gateway. Modular architecture. ElasticSearch included. Works great with Magento1, Magento2, Spree, OpenCart, Pimcore and custom backends

Home Page:https://storefrontapi.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Adding Prettier for Code formatting

ResuBaka opened this issue · comments

Summary

For a more consistent code formation I would throw in Prettier so that all code is formatted the same.

Motivation

This would help with contribution as we don't need to look into the formation of the code so much as it should a be correct from the start as it is formatted with prettier.

Drawbacks

Possible drawbacks would be that some people don't like the prettier rules when they contribute to the project but as they should not use the Repo directly and just install it from npm that should not be a problem for the end user.

A second problem/drawback would be that we need to change the eslint rules a bit, but as I want to update the version of it anyways these probably are going to change a bit when I do it.

Rationale and alternatives

The only alternative I know of is eslint it self with the fix option, but that is more for bad habits and trying to find bugs before they happen and not formatting.

Here a link to Prettier.