From 5e11e80c25d39b0965f17f73961d929c5f8ce708 Mon Sep 17 00:00:00 2001 From: bludnic Date: Mon, 27 Nov 2023 13:08:33 +0000 Subject: [PATCH 01/55] chore(ESLint): disable `vue/multi-word-component-names` rule --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 9596c86d3..f6b004b18 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,8 @@ "wallets:data:generate": "node scripts/wallets.mjs", "wallets:types:generate": "swagger-typescript-api -p ./adamant-wallets/specification/openapi.json -o ./src/types/wallets -n index.ts --no-client", "build": "vue-tsc && vite build --config vite-pwa.config.ts", - "lint": "eslint --ext .js,.vue --ignore-path .gitignore --fix src", + "lint": "eslint --ext .ts,.js,.vue ./src", + "lint:fix": "eslint --ext .js,.vue --ignore-path .gitignore --fix src", "prettify": "prettier --write src/", "schema:generate": "node scripts/adamant-schema/generate.mjs", "electron:build": "vue-tsc && vite build --config electron-vite.config.ts && electron-builder", From 82edf0c729e0aad2a7b468a2f71cb7e71d64dcf1 Mon Sep 17 00:00:00 2001 From: bludnic Date: Mon, 27 Nov 2023 13:22:59 +0000 Subject: [PATCH 02/55] chore(ESLint): allow ignore unused args rule with underscore --- .eslintrc.cjs | 3 ++- src/components/ChatStartDialog.vue | 6 +----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/.eslintrc.cjs b/.eslintrc.cjs index a6445e841..7f33488aa 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -31,6 +31,7 @@ module.exports = { }, plugins: ['vue', '@typescript-eslint'], rules: { - '@typescript-eslint/no-explicit-any': 'off' + '@typescript-eslint/no-explicit-any': 'off', + '@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '_' }] } } diff --git a/src/components/ChatStartDialog.vue b/src/components/ChatStartDialog.vue index cf4671d91..130d1f1cf 100644 --- a/src/components/ChatStartDialog.vue +++ b/src/components/ChatStartDialog.vue @@ -112,8 +112,6 @@ import validateAddress from '@/lib/validateAddress' import QrcodeCapture from '@/components/QrcodeCapture' import QrcodeScannerDialog from '@/components/QrcodeScannerDialog' import QrcodeRendererDialog from '@/components/QrcodeRendererDialog' -import Icon from '@/components/icons/BaseIcon' -import QrCodeScanIcon from '@/components/icons/common/QrCodeScan' import partnerName from '@/mixins/partnerName' export default { @@ -121,8 +119,6 @@ export default { QrcodeCapture, QrcodeScannerDialog, QrcodeRendererDialog, - Icon, - QrCodeScanIcon }, mixins: [partnerName], props: { @@ -179,7 +175,7 @@ export default { partnerId: this.recipientAddress, partnerName: this.recipientName }) - .then((key) => { + .then((_publicKey) => { this.$emit('start-chat', this.recipientAddress, this.uriMessage) this.show = false }) From 6410decea42949e0b70559255226b0153c5f3489 Mon Sep 17 00:00:00 2001 From: bludnic Date: Mon, 27 Nov 2023 13:23:12 +0000 Subject: [PATCH 03/55] chore(ESLint): enable es2020 globals (fixes "BigInt is not defined" error) --- .eslintrc.cjs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 7f33488aa..d6ec443a5 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -5,7 +5,8 @@ module.exports = { root: true, env: { browser: true, - node: true + node: true, + es2020: true }, extends: [ 'plugin:vue/vue3-essential', From 34bebf2b1a4658e05eeff7f10ec9baba8936e607 Mon Sep 17 00:00:00 2001 From: bludnic Date: Mon, 27 Nov 2023 13:24:55 +0000 Subject: [PATCH 04/55] chore(ESLint): disable "vue/multi-word-component-names" rule --- .eslintrc.cjs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.eslintrc.cjs b/.eslintrc.cjs index d6ec443a5..d41665abc 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -33,6 +33,7 @@ module.exports = { plugins: ['vue', '@typescript-eslint'], rules: { '@typescript-eslint/no-explicit-any': 'off', - '@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '_' }] + '@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '_' }], + 'vue/multi-word-component-names': 'off' } } From 785288c57ca304ea39878097db0d9c54007af8d4 Mon Sep 17 00:00:00 2001 From: bludnic Date: Mon, 27 Nov 2023 13:31:23 +0000 Subject: [PATCH 05/55] chore(ESLint): fix `v-text` and `v-html` errors --- src/components/ChatPreview.vue | 4 ++-- src/components/PartnerInfo.vue | 10 ++++++---- src/components/SendFundsForm.vue | 3 +-- src/components/ShareURIDialog.vue | 15 +++++++++------ 4 files changed, 18 insertions(+), 14 deletions(-) diff --git a/src/components/ChatPreview.vue b/src/components/ChatPreview.vue index 6097cfc71..c0e67b411 100644 --- a/src/components/ChatPreview.vue +++ b/src/components/ChatPreview.vue @@ -33,8 +33,8 @@ 'a-text-regular-enlarged-bold': true, [`${className}__title`]: true }" - v-text="isAdamantChat(contactId) ? $t(contactName) : contactName" - /> + >{{ isAdamantChat(contactId) ? $t(contactName) : contactName }}
{{ formatDate(createdAt) }}
diff --git a/src/components/PartnerInfo.vue b/src/components/PartnerInfo.vue index 9a6afe290..c06a6047e 100644 --- a/src/components/PartnerInfo.vue +++ b/src/components/PartnerInfo.vue @@ -36,12 +36,14 @@ + > + {{ address }} + + > + {{ isMe ? $t('chats.me') : name }} + - + - diff --git a/src/components/ShareURIDialog.vue b/src/components/ShareURIDialog.vue index f7b0d12e6..75fed7715 100644 --- a/src/components/ShareURIDialog.vue +++ b/src/components/ShareURIDialog.vue @@ -18,8 +18,9 @@ + > + {{ $t('home.copy_address') }} + + > + {{ $t('home.copy_uri') }} + + > + {{ $t('home.show_qr_code') }} + From f36e59ce38033adb9be5100c99d18b8070cf09b2 Mon Sep 17 00:00:00 2001 From: bludnic Date: Mon, 27 Nov 2023 14:00:18 +0000 Subject: [PATCH 06/55] chore(ESLint): fix `no-unused-vars` errors --- src/components/Chat/ChatMenu.vue | 2 -- src/components/Chat/ChatToolbar.vue | 4 ---- src/components/ChatSpinner.vue | 2 +- src/components/PasswordSetDialog.vue | 2 +- src/components/SendFundsForm.vue | 4 ++-- src/directives/longPress.ts | 2 +- src/lib/bitcoin/btc-base-api.js | 8 ++++---- src/lib/idb/db.js | 2 +- src/lib/lisk/lsk-base-api.js | 12 ++++++------ src/lib/markdown.js | 2 +- src/lib/txVerify.js | 2 +- src/router/navigationGuard.js | 2 +- src/store/index.js | 2 +- src/store/modules/adm/adm-getters.js | 2 +- src/store/modules/dash/dash-getters.js | 2 +- src/store/modules/doge/doge-getters.js | 2 +- src/store/modules/erc20/erc20-actions.js | 1 - src/store/modules/erc20/erc20-getters.js | 2 +- src/store/modules/eth-base/eth-base-actions.js | 3 ++- src/store/modules/eth/getters.js | 2 +- src/store/modules/lsk-base/lsk-base-actions.js | 2 +- 21 files changed, 28 insertions(+), 34 deletions(-) diff --git a/src/components/Chat/ChatMenu.vue b/src/components/Chat/ChatMenu.vue index 77c492dba..27589edad 100644 --- a/src/components/Chat/ChatMenu.vue +++ b/src/components/Chat/ChatMenu.vue @@ -35,7 +35,6 @@ diff --git a/src/components/WalletCard.vue b/src/components/WalletCard.vue index db7e12ae1..55fc5ca22 100644 --- a/src/components/WalletCard.vue +++ b/src/components/WalletCard.vue @@ -1,16 +1,7 @@