Skip to content

Commit

Permalink
Fix #2291
Browse files Browse the repository at this point in the history
  • Loading branch information
octref committed Sep 21, 2020
1 parent bd77a6e commit 601f8b0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

### 0.28.0

- Make `prettier` default formatter for HTML as prettyhtml is no longer actively maintained. #2291.
- Load prettier plugin from VLS if not present in workspace folder. #2014.
- Cross file template type checking - check that components are passed props with the correct types. #1596 and #2294.

Expand Down
10 changes: 5 additions & 5 deletions docs/formatting.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ These formatters are available:
- [`prettier`](https://github.com/prettier/prettier): For css/scss/less/js/ts.
- [`prettier`](https://github.com/prettier/prettier) with [@prettier/plugin-pug](https://github.com/prettier/plugin-pug): For pug.
- [`prettier-eslint`](https://github.com/prettier/prettier-eslint): For js. Run `prettier` and `eslint --fix`.
- [`prettyhtml`](https://github.com/Prettyhtml/prettyhtml): For html.
- [`stylus-supremacy`](https://github.com/ThisIsManta/stylus-supremacy): For stylus.
- [`vscode-typescript`](https://github.com/Microsoft/TypeScript): For js/ts. The same js/ts formatter for VS Code.
- [`sass-formatter`](https://github.com/TheRealSyler/sass-formatter): For the .sass section of the files.
- ~~[`prettyhtml`](https://github.com/Prettyhtml/prettyhtml): 🚧 [DEPREACATED] For html.~~

Vetur bundles all the above formatters. When Vetur observes a local install of the formatter, it'll prefer to use the local version.

Expand All @@ -27,7 +27,7 @@ Current default:

```json
{
"vetur.format.defaultFormatter.html": "prettyhtml",
"vetur.format.defaultFormatter.html": "prettier",
"vetur.format.defaultFormatter.pug": "prettier",
"vetur.format.defaultFormatter.css": "prettier",
"vetur.format.defaultFormatter.postcss": "prettier",
Expand Down Expand Up @@ -89,11 +89,11 @@ Prettier + `eslint --fix`. Settings are read from `.prettierrc` and `.eslintrc`

Global config: Same as `prettier` global config.

#### [prettyhtml](https://github.com/Prettyhtml/prettyhtml)
#### ~~[prettyhtml](https://github.com/Prettyhtml/prettyhtml)~~

The default formatter for Vue templates.
**🚧 DEPREACATED as [no longer in active development](https://github.com/Prettyhtml/prettyhtml).**

Other settings include:
Settings include:

```json
"vetur.format.defaultFormatterOptions": {
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@
},
"vetur.format.defaultFormatter.html": {
"type": "string",
"default": "prettyhtml",
"default": "prettier",
"enum": [
"none",
"prettyhtml",
Expand All @@ -292,7 +292,7 @@
],
"enumDescriptions": [
"disable formatting",
"prettyhtml",
"🚧 [DEPRECATED] prettyhtml",
"html formatter of js-beautify",
"prettier"
],
Expand Down

0 comments on commit 601f8b0

Please sign in to comment.