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

Default Formatter #55

Open
thkruz opened this issue Dec 29, 2023 · 1 comment
Open

Default Formatter #55

thkruz opened this issue Dec 29, 2023 · 1 comment

Comments

@thkruz
Copy link

thkruz commented Dec 29, 2023

I'd like to suggest we pick a formatter. I have always used prettier because it is well supported but, I am not as concerned about which formatter as much as the fact that we use the same one.

I will work a lot faster if I don't have to worry about spacing and trailing commas, but if I can't rely on my formatter to fix that without changing 20 other random lines of code I didn't write then the quality of PRs from me will be much lower.

Let me know if you have one in mind or if I can setup prettier along with husky to force the formatting rules before pushing.

@ajmas
Copy link
Owner

ajmas commented Jan 5, 2024

As long as we have a solution that works for both formatting and linting, then I am open to solutions. Based on working with other teams, I simply want to be sure that what gets merged is a of a consistent and enforced format. This means that one of the check points has to be that it works with the CI, so we reject anything that doesn't conform.

BTW When it comes to formatting, my philosophy is prioritise a style that facilities maintenance and readability. This means I am picky about single letter variables and making sure conditions & loops are surrounded by braces, for example. Of course there may be exceptions, such as with x, y and z, coordinates, but I prefer to minimise these situations.

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

No branches or pull requests

2 participants