Docs feedback: Consistent onboarding issues with VSCode + prettier setup
A number of new developers have had issues with vscode
+ prettier
+ vetur
auto-format on save not working correctly out of the box. This seems like a notable pain point for onboarding.
See:
https://gitlab.slack.com/archives/C0GQHHPGW/p1547222789207000
https://gitlab.slack.com/archives/C0GQHHPGW/p1545057783301700
I also had this issue (@tristan.read) though I didn't raise anything in slack, instead spent a while digging around in vetur/prettier docs and eventually found it.
Settings are documented here https://docs.gitlab.com/ee/development/new_fe_guide/style/prettier.html#vscode-settings. This documentation itself is pretty clear, so perhaps it's not visible enough for new developers.
One solution - remove the need to document these settings by providing a vscode settings file to the codebase. This way, vscode should 'just work' whenever a new developer sets up their environment.
Also somewhat related - we use different auto-format mechanisms for prettier versus eslint, and diverge from prettier's own recommended plugin (https://gitlab.com/gitlab-org/gitlab-ce/issues/55465 | TODO: add link to prettier repo). Fixing this would eliminate the need for the prettier editor plugin for auto-format, and simplify the amount of dev setup required.