Change pattern proposal: prettier v1 to prettier v2
Change pattern proposal: prettier v1 to prettier v2
This detailed blog post is quite interesting on what changed: https://prettier.io/blog/2020/03/21/2.0.0.html
The biggest impact for us will be:
// before: prettier v1
const arrowFun = x => 10;
// after: prettier v2
const arrowFun = (x) => 10;
Advantages of switching patterns
- At some point in the future there will be even more changes
- Future JS versions / features could become incompatible with prettier
Disadvantages of switching patterns
- Will make force people to rebase
- Might lead to a red master
What is the impact on our existing codebase?
If we do enable arrowParens: always
, we need to touch around 1700 files, if not we "only" touch 300 files.