mirror of
https://github.com/un-pany/v3-admin-vite.git
synced 2025-04-20 10:59:21 +08:00
chore: prettier 继承 .editorconfig 的缩进风格
This commit is contained in:
parent
bf9d6eb7b6
commit
34276b5855
@ -1,3 +1,4 @@
|
||||
# 修改配置后重启编辑器
|
||||
# 配置项文档:https://editorconfig.org/
|
||||
|
||||
# 告知 EditorConfig 插件,当前即是根文件
|
||||
@ -7,9 +8,9 @@ root = true
|
||||
[*]
|
||||
## 设置字符集
|
||||
charset = utf-8
|
||||
## 缩进风格 space | tab,建议 space
|
||||
## 缩进风格 space | tab,建议 space(会自动继承给 Prettier)
|
||||
indent_style = space
|
||||
## 缩进的空格数(修改这里的话需要将 prettier.config.js 和 .vscode -> settings.json 也同步修改)
|
||||
## 缩进的空格数(会自动继承给 Prettier)
|
||||
indent_size = 2
|
||||
## 换行符类型 lf | cr | crlf,一般都是设置为 lf
|
||||
end_of_line = lf
|
||||
|
1
.vscode/settings.json
vendored
1
.vscode/settings.json
vendored
@ -1,5 +1,4 @@
|
||||
{
|
||||
"editor.tabSize": 2,
|
||||
"editor.codeActionsOnSave": {
|
||||
"source.fixAll.eslint": "explicit"
|
||||
},
|
||||
|
@ -1,4 +1,5 @@
|
||||
/**
|
||||
* 修改配置后重启编辑器
|
||||
* 配置项文档:https://prettier.io/docs/en/configuration.html
|
||||
* @type {import("prettier").Config}
|
||||
*/
|
||||
@ -6,8 +7,6 @@
|
||||
export default {
|
||||
/** 每一行的宽度 */
|
||||
printWidth: 120,
|
||||
/** Tab 键的空格数 */
|
||||
tabWidth: 2,
|
||||
/** 在对象中的括号之间是否用空格来间隔 */
|
||||
bracketSpacing: true,
|
||||
/** 箭头函数的参数无论有几个,都要括号包裹 */
|
||||
@ -19,7 +18,5 @@ export default {
|
||||
/** 对象或者数组的最后一个元素后面不要加逗号 */
|
||||
trailingComma: "none",
|
||||
/** 是否加分号 */
|
||||
semi: false,
|
||||
/** 是否使用 Tab 格式化 */
|
||||
useTabs: false
|
||||
semi: false
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user