diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index 34af3774..00000000 --- a/.eslintignore +++ /dev/null @@ -1,2 +0,0 @@ -build/*.js -config/*.js diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 28d39d03..00000000 --- a/.eslintrc.js +++ /dev/null @@ -1,30 +0,0 @@ -module.exports = { - root: true, - parserOptions: { - parser: '@babel/eslint-parser', - sourceType: 'module' - }, - // https://github.com/feross/standard/blob/master/RULES.md#javascript-standard-style - extends: [ - 'plugin:vue/recommended' - ], - // required to lint *.vue files - plugins: [ - 'vue', - 'import' - ], - // add your custom rules here - rules: { - // allow paren-less arrow functions - 'arrow-parens': 0, - // allow async-await - 'generator-star-spacing': 0, - // allow debugger during development - 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0, - 'vue/require-prop-types': 0, - 'vue/no-unused-vars': 0, - 'no-tabs': 0, - 'vue/multi-word-component-names': 0, - 'vue/no-reserved-component-names': 0 - } -} diff --git a/.woodpecker.yml b/.woodpecker.yml index 3de19a01..4baa941b 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -10,7 +10,6 @@ steps: commands: - yarn - yarn lint - #- yarn stylelint test: when: diff --git a/build/dev-server.js b/build/dev-server.js index 5acd0fed..7fd95778 100644 --- a/build/dev-server.js +++ b/build/dev-server.js @@ -5,7 +5,7 @@ var path = require('path') var express = require('express') var webpack = require('webpack') var opn = require('opn') -var proxyMiddleware = require('http-proxy-middleware') +const { createProxyMiddleware } = require('http-proxy-middleware'); var webpackConfig = process.env.NODE_ENV === 'testing' ? require('./webpack.prod.conf') : require('./webpack.dev.conf') @@ -36,7 +36,13 @@ Object.keys(proxyTable).forEach(function (context) { if (typeof options === 'string') { options = { target: options } } - app.use(proxyMiddleware(context, options)) + const targetUrl = new URL(options.target); + // add path + targetUrl.pathname = context; + options.target = targetUrl.toString(); + + console.log("Proxying", context, "to", options.target); + app.use(context, createProxyMiddleware(options)) }) // handle fallback for HTML5 history API diff --git a/build/webpack.base.conf.js b/build/webpack.base.conf.js index 2a3db96e..bd4c722c 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -3,6 +3,7 @@ var config = require('../config') var utils = require('./utils') var projectRoot = path.resolve(__dirname, '../') var { VueLoaderPlugin } = require('vue-loader') +const ESLintPlugin = require('eslint-webpack-plugin'); var env = process.env.NODE_ENV // check env & config/index.js to decide weither to enable CSS Sourcemaps for the @@ -35,6 +36,7 @@ module.exports = { ], fallback: { "url": require.resolve("url/"), + querystring: require.resolve("querystring-es3") }, alias: { 'static': path.resolve(__dirname, '../static'), @@ -47,20 +49,6 @@ module.exports = { module: { noParse: /node_modules\/localforage\/dist\/localforage.js/, rules: [ - { - enforce: 'pre', - test: /\.(js|vue)$/, - include: projectRoot, - exclude: /node_modules/, - use: { - loader: 'eslint-loader', - options: { - formatter: require('eslint-friendly-formatter'), - sourceMap: config.build.productionSourceMap, - extract: true - } - } - }, { enforce: 'post', test: /\.(json5?|ya?ml)$/, // target json, json5, yaml and yml files @@ -118,6 +106,9 @@ module.exports = { ] }, plugins: [ - new VueLoaderPlugin() + new VueLoaderPlugin(), + new ESLintPlugin({ + configType: 'flat' + }) ] } diff --git a/config/test.env.js b/config/test.env.js index 646a6ef8..8643fbd6 100644 --- a/config/test.env.js +++ b/config/test.env.js @@ -2,5 +2,4 @@ var { merge } = require('webpack-merge') var devEnv = require('./dev.env') module.exports = merge(devEnv, { - NODE_ENV: '"testing"' }) diff --git a/eslint.config.js b/eslint.config.js new file mode 100644 index 00000000..13bac794 --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,31 @@ +const pluginVue = require('eslint-plugin-vue') +const pluginImport = require('eslint-plugin-import') + +module.exports = [ + ...pluginVue.configs['flat/recommended'], + { + languageOptions: { + parserOptions: { + parser: '@babel/eslint-parser', + sourceType: 'module' + } + }, + rules: { + // allow paren-less arrow functions + 'arrow-parens': 0, + // allow async-await + 'generator-star-spacing': 0, + // allow debugger during development + 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0, + 'vue/require-prop-types': 0, + 'vue/no-unused-vars': 0, + 'no-tabs': 0, + 'vue/multi-word-component-names': 0, + 'vue/no-reserved-component-names': 0 + }, + ignores: [ + 'build/*.js', + 'config/*.js' + ] + } +] diff --git a/package.json b/package.json index d0e2d7f9..9e26d8b6 100644 --- a/package.json +++ b/package.json @@ -12,120 +12,119 @@ "e2e": "node test/e2e/runner.js", "test": "npm run unit && npm run e2e", "stylelint": "stylelint src/**/*.scss", - "lint": "eslint --ext .js,.vue src test/unit/specs test/e2e/specs", - "lint-fix": "eslint --fix --ext .js,.vue src test/unit/specs test/e2e/specs" + "lint": "eslint src test/unit/specs test/e2e/specs", + "lint-fix": "eslint --fix src test/unit/specs test/e2e/specs" }, "dependencies": { "@babel/runtime": "7.17.8", - "@chenfengyuan/vue-qrcode": "2.0.0", + "@chenfengyuan/vue-qrcode": "^2.0.0", "@floatingghost/pinch-zoom-element": "^1.3.1", - "@fortawesome/fontawesome-svg-core": "1.3.0", - "@fortawesome/free-regular-svg-icons": "^6.1.2", - "@fortawesome/free-solid-svg-icons": "^6.2.0", - "@fortawesome/vue-fontawesome": "3.0.1", - "@vuelidate/core": "^2.0.0", - "@vuelidate/validators": "^2.0.0", - "blurhash": "^2.0.4", - "body-scroll-lock": "2.7.1", - "chromatism": "3.0.0", - "click-outside-vue3": "4.0.1", - "cropperjs": "1.5.12", - "diff": "3.5.0", - "escape-html": "1.0.3", + "@fortawesome/fontawesome-svg-core": "^6.5.2", + "@fortawesome/free-regular-svg-icons": "^6.5.2", + "@fortawesome/free-solid-svg-icons": "^6.5.2", + "@fortawesome/vue-fontawesome": "^3.0.8", + "@vuelidate/core": "^2.0.3", + "@vuelidate/validators": "^2.0.4", + "blurhash": "^2.0.5", + "body-scroll-lock": "^3.1.5", + "chromatism": "^3.0.0", + "click-outside-vue3": "^4.0.1", + "cropperjs": "^1.6.2", + "diff": "^5.2.0", + "escape-html": "^1.0.3", "iso-639-1": "^2.1.15", "js-cookie": "^3.0.1", - "localforage": "1.10.0", + "localforage": "^1.10.0", "parse-link-header": "^2.0.0", - "phoenix": "1.6.2", - "punycode.js": "2.1.0", - "qrcode": "1", - "url": "^0.11.0", + "phoenix": "^1.7.12", + "punycode.js": "^2.3.1", + "qrcode": "^1.5.3", + "querystring-es3": "^0.2.1", + "url": "^0.11.3", "vue": "^3.2.31", "vue-i18n": "^9.2.2", - "vue-router": "4.0.14", - "vue-template-compiler": "2.6.11", - "vuex": "4.0.2" + "vue-router": "^4.3.2", + "vue-template-compiler": "^2.7.16", + "vuex": "^4.1.0" }, "devDependencies": { - "@babel/core": "7.17.8", + "@babel/core": "^7.24.6", "@babel/eslint-parser": "^7.19.1", - "@babel/plugin-transform-runtime": "7.17.0", - "@babel/preset-env": "7.16.11", - "@babel/register": "7.17.7", + "@babel/plugin-transform-runtime": "^7.24.6", + "@babel/preset-env": "^7.24.6", + "@babel/register": "^7.24.6", "@intlify/vue-i18n-loader": "^5.0.0", - "@ungap/event-target": "0.2.3", - "@vue/babel-helper-vue-jsx-merge-props": "1.2.1", - "@vue/babel-plugin-jsx": "1.1.1", + "@ungap/event-target": "^0.2.4", + "@vue/babel-helper-vue-jsx-merge-props": "^1.4.0", + "@vue/babel-plugin-jsx": "^1.2.2", "@vue/compiler-sfc": "^3.1.0", "@vue/test-utils": "^2.0.2", - "autoprefixer": "6.7.7", + "autoprefixer": "^10.4.19", "babel-loader": "^9.1.0", - "babel-plugin-lodash": "3.3.4", + "babel-plugin-lodash": "^3.3.4", "chai": "^4.3.7", - "chalk": "1.1.3", - "chromedriver": "^107.0.3", + "chalk": "^1.1.3", + "chromedriver": "^119.0.1", "connect-history-api-fallback": "^2.0.0", "cross-spawn": "^7.0.3", - "css-loader": "^6.7.2", + "css-loader": "^7.1.2", "custom-event-polyfill": "^1.0.7", - "eslint": "^7.32.0", - "eslint-config-standard": "^17.0.0", + "eslint": "^9.3.0", + "eslint-config-standard": "^17.1.0", "eslint-friendly-formatter": "^4.0.1", - "eslint-loader": "^4.0.2", - "eslint-plugin-import": "^2.26.0", + "eslint-plugin-import": "^2.29.1", "eslint-plugin-node": "^11.1.0", - "eslint-plugin-promise": "^6.1.1", + "eslint-plugin-promise": "^6.2.0", "eslint-plugin-standard": "^5.0.0", - "eslint-plugin-vue": "^9.7.0", - "eventsource-polyfill": "0.9.6", - "express": "4.17.3", + "eslint-plugin-vue": "^9.26.0", + "eslint-webpack-plugin": "^4.2.0", + "eventsource-polyfill": "^0.9.6", + "express": "^4.19.2", "file-loader": "^6.2.0", - "function-bind": "1.1.1", + "function-bind": "^1.1.2", "html-webpack-plugin": "^5.5.0", - "http-proxy-middleware": "0.21.0", - "inject-loader": "2.0.1", - "isparta-loader": "2.0.0", - "json-loader": "0.5.7", - "karma": "6.3.17", - "karma-coverage": "1.1.2", - "karma-firefox-launcher": "1.3.0", - "karma-mocha": "2.0.1", - "karma-mocha-reporter": "2.2.5", - "karma-sinon-chai": "2.0.2", - "karma-sourcemap-loader": "0.3.8", - "karma-spec-reporter": "0.0.33", + "http-proxy-middleware": "^3.0.0", + "json-loader": "^0.5.7", + "karma": "^6.4.3", + "karma-coverage": "^2.2.1", + "karma-firefox-launcher": "^2.1.3", + "karma-mocha": "^2.0.1", + "karma-mocha-reporter": "^2.2.5", + "karma-sinon-chai": "^2.0.2", + "karma-sourcemap-loader": "^0.4.0", + "karma-spec-reporter": "^0.0.36", "karma-webpack": "^5.0.0", - "lodash": "4.17.21", - "lolex": "1.6.0", - "mini-css-extract-plugin": "0.12.0", - "mocha": "3.5.3", - "nightwatch": "0.9.21", - "opn": "4.0.2", - "ora": "0.4.1", + "lodash": "^4.17.21", + "lolex": "^6.0.0", + "mini-css-extract-plugin": "^2.9.0", + "mocha": "^10.4.0", + "nightwatch": "^3.6.3", + "opn": "^6.0.0", + "ora": "^8.0.1", "postcss-html": "^1.5.0", - "postcss-loader": "3.0.0", + "postcss-loader": "^8.1.1", "postcss-sass": "^0.5.0", - "raw-loader": "0.5.1", - "sass": "^1.56.0", - "sass-loader": "^13.2.0", - "selenium-server": "2.53.1", - "semver": "5.7.1", - "shelljs": "0.8.5", - "sinon": "2.4.1", - "sinon-chai": "2.14.0", + "raw-loader": "^4.0.2", + "sass": "^1.77.2", + "sass-loader": "^14.2.1", + "selenium-server": "^3.141.59", + "semver": "^7.6.2", + "shelljs": "^0.8.5", + "sinon": "^18.0.0", + "sinon-chai": "^3.7.0", "stylelint": "^14.15.0", "stylelint-config-recommended-vue": "^1.4.0", "stylelint-config-standard": "^29.0.0", "stylelint-config-standard-scss": "^6.1.0", "stylelint-rscss": "^0.4.0", "url-loader": "^4.1.1", - "vue-loader": "^17.0.0", - "vue-style-loader": "^4.1.2", - "webpack": "^5.75.0", - "webpack-dev-middleware": "^5.3.3", - "webpack-hot-middleware": "^2.25.1", - "webpack-merge": "^5.8.0", - "workbox-webpack-plugin": "^6.5.4" + "vue-loader": "^17.4.2", + "vue-style-loader": "^4.1.3", + "webpack": "^5.91.0", + "webpack-dev-middleware": "^7.2.1", + "webpack-hot-middleware": "^2.26.1", + "webpack-merge": "^5.10.0", + "workbox-webpack-plugin": "^7.1.0" }, "engines": { "node": ">= 16.0.0", diff --git a/src/components/about/about.vue b/src/components/about/about.vue index df9bb196..edf16b0b 100644 --- a/src/components/about/about.vue +++ b/src/components/about/about.vue @@ -9,7 +9,7 @@ - + diff --git a/src/components/account_actions/account_actions.vue b/src/components/account_actions/account_actions.vue index 126f6fa9..656fe802 100644 --- a/src/components/account_actions/account_actions.vue +++ b/src/components/account_actions/account_actions.vue @@ -6,7 +6,7 @@ :bound-to="{ x: 'container' }" remove-padding > -