diff --git a/.eslintrc.js b/.eslintrc.js index 28215c9..c0bb4ab 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -37,19 +37,5 @@ module.exports = { 'vue/require-default-prop': 'off', 'vue/no-unused-components': 'warn', '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) - } - ] }, }; diff --git a/.prettierrc.js b/.prettierrc.js new file mode 100644 index 0000000..944d762 --- /dev/null +++ b/.prettierrc.js @@ -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) +} \ No newline at end of file diff --git a/src/main.js b/src/main.js index 984a0b6..2ddc7d9 100644 --- a/src/main.js +++ b/src/main.js @@ -29,7 +29,9 @@ Object.entries(Components).forEach(([key, component]) => { }) app - .use(ElementPlus, { locale }) + .use(ElementPlus, { + locale, + }) .use(store) .use(router) .mount('#app')