diff --git a/admin/.eslintrc.js b/admin/.eslintrc.js index e4acd0367..f0998df3a 100644 --- a/admin/.eslintrc.js +++ b/admin/.eslintrc.js @@ -4,15 +4,17 @@ module.exports = { browser: true, node: true, jest: true, + 'vue/setup-compiler-macros': true, }, parserOptions: { - parser: 'babel-eslint', + ecmaVersion: 2020, }, extends: [ 'standard', - 'plugin:vue/essential', + 'plugin:vue/vue3-recommended', 'plugin:prettier/recommended', 'plugin:@intlify/vue-i18n/recommended', + 'prettier', ], // required to lint *.vue files plugins: ['vue', 'prettier', 'jest'], @@ -25,7 +27,7 @@ module.exports = { // add your custom rules here rules: { 'no-console': ['error'], - 'no-debugger': import.meta.env.NODE_ENV === 'production' ? 'error' : 'off', + 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off', 'vue/component-name-in-template-casing': ['error', 'kebab-case'], 'vue/no-static-inline-styles': [ 'error', @@ -33,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/components.d.ts b/admin/components.d.ts index 2ab5281fb..9f36a4c74 100644 --- a/admin/components.d.ts +++ b/admin/components.d.ts @@ -26,14 +26,12 @@ declare module 'vue' { EditCreationFormular: typeof import('./src/components/EditCreationFormular.vue')['default'] FederationVisualizeItem: typeof import('./src/components/Federation/FederationVisualizeItem.vue')['default'] FigureQrCode: typeof import('./src/components/FigureQrCode.vue')['default'] - IBi0Circle: typeof import('~icons/bi/0-circle')['default'] IIcBaselineClose: typeof import('~icons/ic/baseline-close')['default'] IOcticonCircleSlash24: typeof import('~icons/octicon/circle-slash24')['default'] IOcticonPerson24: typeof import('~icons/octicon/person24')['default'] IPhCaretDown: typeof import('~icons/ph/caret-down')['default'] IPhCaretUpFill: typeof import('~icons/ph/caret-up-fill')['default'] IPhEnvelope: typeof import('~icons/ph/envelope')['default'] - IPhEvelope: typeof import('~icons/ph/evelope')['default'] IPhXCircle: typeof import('~icons/ph/x-circle')['default'] NavBar: typeof import('./src/components/NavBar.vue')['default'] NotFoundPage: typeof import('./src/components/NotFoundPage.vue')['default'] diff --git a/admin/package.json b/admin/package.json index f79da6375..fac7af929 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,28 +64,29 @@ }, "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", "cross-env": "^7.0.3", - "eslint": "7.25.0", - "eslint-config-prettier": "^8.3.0", + "eslint": "8.57.0", + "eslint-config-prettier": "8.10.0", "eslint-config-standard": "^16.0.3", "eslint-loader": "^4.0.2", "eslint-plugin-import": "^2.25.2", "eslint-plugin-jest": "^25.2.2", "eslint-plugin-node": "^11.1.0", - "eslint-plugin-prettier": "3.3.1", + "eslint-plugin-prettier": "5.2.1", "eslint-plugin-promise": "^5.1.1", - "eslint-plugin-vue": "^7.20.0", + "eslint-plugin-vue": "8.7.1", "jest": "29.7.0", "mock-apollo-client": "^1.2.1", "postcss": "^8.4.8", "postcss-html": "^1.3.0", "postcss-scss": "^4.0.3", - "stylelint": "^14.5.3", - "stylelint-config-recommended-vue": "^1.3.0", + "prettier": "^3.3.3", + "stylelint": "14.16.1", + "stylelint-config-recommended": "13.0.0", + "stylelint-config-recommended-vue": "1.3.0", "stylelint-config-standard-scss": "^3.0.0", "unplugin-icons": "^0.19.0", "unplugin-vue-components": "^0.27.3" 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 @@