diff options
author | Mike Lewis <mlewis@gitlab.com> | 2019-09-12 01:09:53 +0000 |
---|---|---|
committer | Mike Lewis <mlewis@gitlab.com> | 2019-09-12 01:09:53 +0000 |
commit | 5587ccfdc232648fb15dd2b98e5341b43012a2a6 (patch) | |
tree | e60a68ba90c0932eb5db9118acd47372026262fb /doc/development | |
parent | 9dc6df4feb29081eda070e5bd58b2b8fa1b802e6 (diff) | |
parent | 394aa08a1efa487143855bb6a189b9d6ac3a5b41 (diff) | |
download | gitlab-ce-5587ccfdc232648fb15dd2b98e5341b43012a2a6.tar.gz |
Merge branch 'docs-update-vetur-vscode-extension' into 'master'
Update outdated instructions for vetur in vscode
Closes #66733
See merge request gitlab-org/gitlab-ce!32480
Diffstat (limited to 'doc/development')
-rw-r--r-- | doc/development/new_fe_guide/style/prettier.md | 35 |
1 files changed, 19 insertions, 16 deletions
diff --git a/doc/development/new_fe_guide/style/prettier.md b/doc/development/new_fe_guide/style/prettier.md index 5f44c640d76..17b209d419e 100644 --- a/doc/development/new_fe_guide/style/prettier.md +++ b/doc/development/new_fe_guide/style/prettier.md @@ -61,35 +61,38 @@ This will go over all files in a specific folder and save it. ## VSCode Settings -### Format on Save +### Select Prettier as default formatter -To automatically format your files with Prettier, add the following properties to your User or Workspace Settings: +To select Prettier as a formatter, add the following properties to your User or Workspace Settings: ```javascript { + "[html]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, "[javascript]": { - "editor.formatOnSave": true + "editor.defaultFormatter": "esbenp.prettier-vscode" }, "[vue]": { - "editor.formatOnSave": true - }, + "editor.defaultFormatter": "esbenp.prettier-vscode" + } } ``` -### Conflicts with Vetur Extension +### Format on Save -There are some [runtime issues](https://github.com/vuejs/vetur/issues/950) with [Prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) and [the Vetur extension](https://marketplace.visualstudio.com/items?itemName=octref.vetur) for VSCode. To fix this, try adding the following properties to your User or Workspace Settings: +To automatically format your files with Prettier, add the following properties to your User or Workspace Settings: ```javascript { - "prettier.disableLanguages": [], - "vetur.format.defaultFormatter.html": "none", - "vetur.format.defaultFormatter.js": "none", - "vetur.format.defaultFormatter.css": "none", - "vetur.format.defaultFormatter.less": "none", - "vetur.format.defaultFormatter.postcss": "none", - "vetur.format.defaultFormatter.scss": "none", - "vetur.format.defaultFormatter.stylus": "none", - "vetur.format.defaultFormatter.ts": "none", + "[html]": { + "editor.formatOnSave": true + }, + "[javascript]": { + "editor.formatOnSave": true + }, + "[vue]": { + "editor.formatOnSave": true + }, } ``` |