This commit is contained in:
huzhushan 2021-04-19 19:58:01 +08:00
parent ffcb053b6e
commit 1bc8c22f15
3 changed files with 14 additions and 15 deletions

View File

@ -37,19 +37,5 @@ module.exports = {
'vue/require-default-prop': 'off', 'vue/require-default-prop': 'off',
'vue/no-unused-components': 'warn', 'vue/no-unused-components': 'warn',
'vue/no-setup-props-destructure': 'off', 'vue/no-setup-props-destructure': 'off',
"prettier/prettier": [
"warn",
{
'printWidth': 80, // 每行代码长度默认80
'tabWidth': 2, // 每个tab相当于多少个空格默认2
'useTabs': false, // 是否使用tab进行缩进默认false
'singleQuote': true, // 使用单引号默认false
'semi': false, // 声明结尾使用分号(默认true)
'trailingComma': 'es5', // 多行使用拖尾逗号默认none
'bracketSpacing': true, // 对象字面量的大括号间使用空格默认true
'jsxBracketSameLine': false, // 多行JSX中的>放置在最后一行的结尾而不是另起一行默认false
'arrowParens': 'avoid', // 只有一个参数的箭头函数的参数是否带括号默认avoid
}
]
}, },
}; };

11
.prettierrc.js Normal file
View File

@ -0,0 +1,11 @@
module.exports = {
"printWidth": 80, // 每行代码长度默认80
"tabWidth": 2, // 每个tab相当于多少个空格默认2
"useTabs": false, // 是否使用tab进行缩进默认false
"singleQuote": true, // 使用单引号默认false
"semi": false, // 声明结尾使用分号(默认true)
"trailingComma": "es5", // 多行使用拖尾逗号默认none
"bracketSpacing": true, // 对象字面量的大括号间使用空格默认true
"jsxBracketSameLine": false, // 多行JSX中的>放置在最后一行的结尾而不是另起一行默认false
"arrowParens": "avoid", // 只有一个参数的箭头函数的参数是否带括号默认avoid
}

View File

@ -29,7 +29,9 @@ Object.entries(Components).forEach(([key, component]) => {
}) })
app app
.use(ElementPlus, { locale }) .use(ElementPlus, {
locale,
})
.use(store) .use(store)
.use(router) .use(router)
.mount('#app') .mount('#app')