diff --git a/.eslintrc.js b/.eslintrc.js index 3b70201..ce80cb4 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -17,6 +17,9 @@ module.exports = { // '@typescript-eslint/camelcase': 'off', 'import/extensions': 'off', + 'no-nested-ternary': 'off', + 'no-use-before-define': 'off', + 'no-unused-expressions': 'off', }, settings: { 'import/resolver': { diff --git a/package.json b/package.json index f59c538..3d9e901 100644 --- a/package.json +++ b/package.json @@ -6,8 +6,8 @@ "dev": "vite", "test": "vite build --mode test", "build": "vite build", - "preview": "vite preview", - "plop": "plop" + "lint": "eslint --ext .vue,.ts src/", + "lint:fix": "eslint --ext .vue,.ts src/ --fix" }, "dependencies": { "@element-plus/icons-vue": "^0.2.7", diff --git a/src/components/AliOss/upload.ts b/src/components/AliOss/upload.ts index d351774..8b3cdb1 100644 --- a/src/components/AliOss/upload.ts +++ b/src/components/AliOss/upload.ts @@ -17,7 +17,7 @@ export default { return new Promise(async (resolve, reject) => { try { // 上传到阿里云oss - const res = await client.multipartUpload(Date.now() + '.' + getFileExt(file.name), file); + const res = await client.multipartUpload(`${Date.now()}.${getFileExt(file.name)}`, file); resolve({ format: getFileExt(file.name), name: file.name, diff --git a/src/components/Back.vue b/src/components/Back.vue index 49631ad..396c005 100644 --- a/src/components/Back.vue +++ b/src/components/Back.vue @@ -1,10 +1,7 @@