Problem with prettier setting trailingComma: all
One problem we have with the prettier setting trailingComma: "all"
, is that build scripts like the webpack config or the new scripts/frontend/prettier.js
will break on node < 8, because it adds trailing commas to function parameters.
There are three solutions for this problem:
-
trailingComma: "es5"
until node 6 is not supported anymore - bump the minimum recommended dev version to node 8
- ignore build scripts (this was done for the webpack config (https://gitlab.com/gitlab-org/gitlab-ce/issues/44483))
I am actually in favor of 1. or 2., because I think we should format FE and tooling code the same way. Now I do not know enough (e.g. what version is used during build, etc.) to make a good recommendation, but would lean towards the second option.
/cc @mgreiling @timzallmann @iamphill @filipa
Edited by Lukas 'ai-pi' Eipert