From d2497b458c7eb480fb3d7d3094575711d60fa0e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Micha=C5=82owski?= Date: Tue, 23 Jul 2024 18:58:56 +0200 Subject: [PATCH] feat(admin) - update eslint babel --- admin/.eslintrc.js | 9 +- admin/package.json | 2 +- admin/src/App.vue | 2 +- .../src/components/ChangeUserRoleFormular.vue | 11 +- admin/src/components/ContentFooter.vue | 9 +- .../ContributionLink/ContributionLink.vue | 15 +- .../ContributionLink/ContributionLinkForm.vue | 29 +-- .../ContributionLink/ContributionLinkList.vue | 10 +- .../ContributionMessagesFormular.vue | 45 ++-- .../ContributionMessagesList.vue | 13 +- .../ContributionMessages/ParseMessage.vue | 6 +- admin/src/components/CreationFormular.vue | 24 +- .../components/CreationTransactionList.vue | 2 +- admin/src/components/DeletedUserFormular.vue | 9 +- admin/src/components/EditCreationFormular.vue | 47 ++-- .../Federation/CommunityVisualizeItem.vue | 4 +- admin/src/components/NavBar.vue | 2 +- admin/src/components/NotFoundPage.vue | 2 +- admin/src/components/Overlay.vue | 3 +- admin/src/components/RowDetails.vue | 7 +- .../components/Tables/OpenCreationsTable.vue | 27 +-- .../src/components/Tables/SearchUserTable.vue | 20 +- admin/src/components/TransactionLinkList.vue | 48 ++-- admin/src/components/UserQuery.vue | 2 +- admin/src/components/input/Coordinates.vue | 13 +- admin/src/components/input/EditableGroup.vue | 11 +- .../input/EditableGroupableLabel.vue | 1 + admin/src/components/input/TimePicker.vue | 5 +- admin/src/composables/useCreationMonths.js | 1 + admin/src/config/index.js | 3 +- admin/src/i18n.js | 4 +- admin/src/layouts/defaultLayout.vue | 2 +- admin/src/pages/ContributionLinks.vue | 6 +- admin/src/pages/CreationConfirm.vue | 209 +++++++++--------- admin/src/pages/FederationVisualize.vue | 2 +- admin/src/pages/UserSearch.vue | 14 +- admin/vite.config.js | 1 + admin/yarn.lock | 2 +- 38 files changed, 325 insertions(+), 297 deletions(-) diff --git a/admin/.eslintrc.js b/admin/.eslintrc.js index 2aee1f13a..f0998df3a 100644 --- a/admin/.eslintrc.js +++ b/admin/.eslintrc.js @@ -4,10 +4,11 @@ module.exports = { browser: true, node: true, jest: true, + 'vue/setup-compiler-macros': true, + }, + parserOptions: { + ecmaVersion: 2020, }, - // parserOptions: { - // parser: 'babel-eslint', - // }, extends: [ 'standard', 'plugin:vue/vue3-recommended', @@ -34,6 +35,8 @@ module.exports = { allowBinding: false, }, ], + 'vue/multi-word-component-names': 0, + 'vue/no-v-html': 0, '@intlify/vue-i18n/no-dynamic-keys': 'error', '@intlify/vue-i18n/no-unused-keys': [ 'error', diff --git a/admin/package.json b/admin/package.json index 0170a909a..8b65a9ec7 100644 --- a/admin/package.json +++ b/admin/package.json @@ -20,6 +20,7 @@ }, "dependencies": { "@babel/core": "^7.15.8", + "@babel/eslint-parser": "^7.24.8", "@babel/node": "^7.15.8", "@babel/preset-env": "^7.15.8", "@iconify/json": "^2.2.228", @@ -63,7 +64,6 @@ }, "devDependencies": { "@apollo/client": "^3.10.8", - "@babel/eslint-parser": "^7.15.8", "@intlify/eslint-plugin-vue-i18n": "^1.4.0", "@vue/compiler-sfc": "^3.4.32", "babel-plugin-transform-require-context": "^0.1.1", diff --git a/admin/src/App.vue b/admin/src/App.vue index 2094e06b1..e5ee5c389 100644 --- a/admin/src/App.vue +++ b/admin/src/App.vue @@ -9,7 +9,7 @@ import defaultLayout from '@/layouts/defaultLayout' export default { - name: 'app', + name: 'App', components: { defaultLayout }, } diff --git a/admin/src/components/ChangeUserRoleFormular.vue b/admin/src/components/ChangeUserRoleFormular.vue index 7f048d0e2..a66ad13a3 100644 --- a/admin/src/components/ChangeUserRoleFormular.vue +++ b/admin/src/components/ChangeUserRoleFormular.vue @@ -9,11 +9,11 @@
- +
@@ -41,6 +41,7 @@ export default { required: true, }, }, + emits: ['update-roles'], data() { return { currentRole: this.getCurrentRole(), @@ -66,8 +67,8 @@ export default { this.roleSelected === rolesValues.ADMIN ? this.$t('userRole.selectRoles.admin') : this.roleSelected === rolesValues.MODERATOR - ? this.$t('userRole.selectRoles.moderator') - : this.$t('userRole.selectRoles.user'), + ? this.$t('userRole.selectRoles.moderator') + : this.$t('userRole.selectRoles.user'), }), { cancelTitle: this.$t('overlay.cancel'), @@ -102,7 +103,7 @@ export default { }, }) .then((result) => { - this.$emit('updateRoles', { + this.$emit('update-roles', { userId: this.item.userId, roles: roleValue === 'USER' ? [] : [roleValue], }) diff --git a/admin/src/components/ContentFooter.vue b/admin/src/components/ContentFooter.vue index d1591e242..761d68c9c 100644 --- a/admin/src/components/ContentFooter.vue +++ b/admin/src/components/ContentFooter.vue @@ -2,7 +2,7 @@
@@ -37,11 +37,10 @@ const version = CONFIG.APP_VERSION const hash = CONFIG.BUILD_COMMIT const shortHash = CONFIG.BUILD_COMMIT_SHORT - diff --git a/admin/src/components/ContributionLink/ContributionLink.vue b/admin/src/components/ContributionLink/ContributionLink.vue index 027eb35d7..3b8f5f74f 100644 --- a/admin/src/components/ContributionLink/ContributionLink.vue +++ b/admin/src/components/ContributionLink/ContributionLink.vue @@ -10,21 +10,21 @@ > {{ $t('math.plus') }} {{ $t('contributionLink.newContributionLink') }} - +

{{ $t('contributionLink.contributionLinks') }}

@@ -33,9 +33,9 @@
{{ $t('contributionLink.noContributionLinks') }}
@@ -62,6 +62,7 @@ export default { required: true, }, }, + emits: ['get-contribution-links'], data: function () { return { visible: false, diff --git a/admin/src/components/ContributionLink/ContributionLinkForm.vue b/admin/src/components/ContributionLink/ContributionLinkForm.vue index f8e3d0f1f..239d77c83 100644 --- a/admin/src/components/ContributionLink/ContributionLinkForm.vue +++ b/admin/src/components/ContributionLink/ContributionLinkForm.vue @@ -1,13 +1,13 @@