From a5cc5d3874aece5cabcc3dd4dc17c68ea2ad2312 Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Tue, 14 May 2024 16:51:09 +0800 Subject: [PATCH] =?UTF-8?q?eslint=E9=85=8D=E7=BD=AE=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E5=B9=B6=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .eslintrc.js | 3 + package.json | 4 +- src/components/AliOss/upload.ts | 2 +- src/components/Back.vue | 7 +- src/components/Panel/index.vue | 189 ++--- src/components/Search.vue | 9 +- src/components/StrategyConfirm.vue | 9 +- src/components/Tinymce/index.vue | 5 +- src/layout/components/AppHeader.vue | 21 +- src/layout/components/AppMain.vue | 3 +- src/layout/components/AppSidebar/Menu.vue | 110 +-- src/layout/components/AppSidebar/index.vue | 31 +- src/layout/components/Logo.vue | 3 +- src/layout/index.vue | 12 +- src/views/403.vue | 4 +- src/views/404.vue | 17 +- src/views/Home.vue | 58 +- src/views/Role.vue | 90 +-- src/views/bankProduct/index.vue | 55 +- src/views/config/level/Index.vue | 139 +--- src/views/config/param/Buyer.vue | 110 +-- src/views/config/param/Financial.vue | 40 +- src/views/config/param/Index.vue | 15 +- src/views/finance/Account.vue | 27 +- src/views/finance/Bank.vue | 87 +-- src/views/finance/BankDetail.vue | 110 ++- src/views/finance/Fund.vue | 96 +-- src/views/finance/Insurance.vue | 80 +-- src/views/finance/Order.vue | 68 +- src/views/finance/Publish.vue | 92 +-- src/views/product/afterLoan/1029/Detail.vue | 130 +--- src/views/product/afterLoan/1029/Index.vue | 95 +-- src/views/product/afterLoan/1030/Detail.vue | 98 +-- src/views/product/afterLoan/1030/Index.vue | 95 +-- src/views/product/afterLoan/1031/Detail.vue | 222 ++---- src/views/product/afterLoan/1031/Index.vue | 95 +-- src/views/product/afterLoan/1032/Detail.vue | 70 +- src/views/product/afterLoan/1032/Index.vue | 96 +-- src/views/product/afterLoan/1033/Detail.vue | 84 +-- src/views/product/afterLoan/1033/Index.vue | 96 +-- src/views/product/afterLoan/CardList.vue | 11 +- src/views/product/bank/Add.vue | 345 ++++----- src/views/product/bank/Approve.vue | 45 +- src/views/product/bank/CardList.vue | 54 +- src/views/product/bank/Config.vue | 664 +++++++----------- src/views/product/bank/Detail.vue | 3 +- src/views/product/bank/Info.vue | 154 ++-- src/views/product/bank/List.vue | 146 ++-- src/views/product/fund/Add.vue | 256 ++----- src/views/product/fund/CardList.vue | 36 +- src/views/product/fund/Detail.vue | 3 +- src/views/product/fund/Info.vue | 15 +- src/views/product/fund/List.vue | 93 +-- src/views/product/insurance/Add.vue | 105 +-- src/views/product/insurance/CardList.vue | 42 +- src/views/product/insurance/Detail.vue | 3 +- src/views/product/insurance/Info.vue | 30 +- src/views/product/insurance/List.vue | 104 +-- src/views/product/interestRate/772/Detail.vue | 119 ++-- src/views/product/interestRate/772/Index.vue | 93 +-- src/views/product/interestRate/773.vue | 69 +- src/views/product/interestRate/935/Detail.vue | 109 +-- src/views/product/interestRate/935/Index.vue | 94 +-- src/views/product/interestRate/936/Detail.vue | 121 +--- src/views/product/interestRate/936/Index.vue | 94 +-- src/views/product/interestRate/CardList.vue | 15 +- src/views/product/strategy/150/Detail.vue | 145 ++-- src/views/product/strategy/150/Index.vue | 93 +-- src/views/product/strategy/151/Detail.vue | 164 ++--- src/views/product/strategy/151/Index.vue | 93 +-- src/views/product/strategy/152/Detail.vue | 255 +++---- src/views/product/strategy/152/Index.vue | 93 +-- src/views/product/strategy/153/Detail.vue | 162 ++--- src/views/product/strategy/153/Index.vue | 93 +-- src/views/product/strategy/154/Detail.vue | 249 ++----- src/views/product/strategy/154/Index.vue | 93 +-- src/views/product/strategy/155/Detail.vue | 210 ++---- src/views/product/strategy/155/Index.vue | 93 +-- src/views/product/strategy/156/Detail.vue | 88 +-- src/views/product/strategy/156/Index.vue | 93 +-- src/views/product/strategy/512/Detail.vue | 99 +-- src/views/product/strategy/512/Index.vue | 93 +-- src/views/product/strategy/513/Detail.vue | 176 ++--- src/views/product/strategy/513/Index.vue | 93 +-- src/views/product/strategy/CardList.vue | 15 +- src/views/product/strategy/Risk1.vue | 37 +- src/views/product/strategy/Risk2.vue | 20 +- src/views/product/strategy/Risk3.vue | 19 +- src/views/report/Index.vue | 158 ++--- 89 files changed, 2595 insertions(+), 5439 deletions(-) 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 @@