Skip to content

Commit 5c93155

Browse files
committed
feat!: align the default prettier style with create-vue instead of vue core
After all, `vuejs/core` is more of a TypeScript project than a Vue project. I feel that we really need `printWidth: 100` for templates. And `arrowParens` isn't that important. Let's use the default value. Moreover, as stated in [prettier's documentation](https://prettier.io/docs/en/options#arrow-function-parentheses), `arrowParens: "always"` is better for adding type annotations, extra arguments or default values as well as making other changes. I believe that `arrowParens: "avoid"` is set in `vuejs/core` only because it started using prettier in its 1.x era and want to avoid too drastic style changes. vuejs/core#3926 (comment)
1 parent d1fe363 commit 5c93155

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

templates/_prettierrc.json.ejs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@
2626
}
2727
<%_ } else { _%>
2828
<%#
29-
The default style follows the one used in the vuejs/core repository
30-
<https://github.com/vuejs/core/blob/main/.prettierrc>
29+
The default style follows the one used in the vuejs/create-vue repository
30+
<https://github.com/vuejs/create-vue/blob/main/.prettierrc>
3131
%>
3232
{
3333
"$schema": "https://json.schemastore.org/prettierrc",
3434
"semi": false,
3535
"singleQuote": true,
36-
"arrowParens": "avoid"
36+
"printWidth": 100
3737
}
3838
<%_ } _%>

0 commit comments

Comments
 (0)