Mail: Add Prettier for consistent code formatting

Created on 20 Sep 2018  ·  6Comments  ·  Source: nextcloud/mail

When making changes, I'm finding that most of the diffs are formatting changes rather than actual code changes
Prettier is a nice tool we could use to have consistent formatting throughout the codebase

1. to develop technical debt

Most helpful comment

Closed in #1172

All 6 comments

What do you think @ChristophWurst ?
I'm thinking of doing this as part of the Vue rewrite

Absolutely, this coding style is quite inconsistent right now. I remember @skjnldsv telling me that I should use a certain tool, which one was it?

Depends on the tech, eslint for js, stylelint for css :)
That's the two most used and they integrate nicely on webpack

Prettier is concerned only with code formatting i.e. semicolons, tabs/spaces, etc.
eslint and stylelint are complementary tools for finding errors in the js/css files

And as @skjnldsv says they play well together 😄

@kevgathuku eslint and stylelint also handle formatting ;)

Closed in #1172

Was this page helpful?
0 / 5 - 0 ratings