diff --git a/webui/.eslintignore b/webui/.eslintignore index 9b1c8b133..9f81cf845 100644 --- a/webui/.eslintignore +++ b/webui/.eslintignore @@ -1 +1,7 @@ /dist +/src-capacitor +/src-cordova +/.quasar +/node_modules +.eslintrc.cjs +/quasar.config.*.temporary.compiled* diff --git a/webui/.eslintrc.js b/webui/.eslintrc.cjs similarity index 62% rename from webui/.eslintrc.js rename to webui/.eslintrc.cjs index f8fee91f8..c08b11557 100644 --- a/webui/.eslintrc.js +++ b/webui/.eslintrc.cjs @@ -2,21 +2,24 @@ module.exports = { root: true, parserOptions: { - parser: 'babel-eslint', - sourceType: 'module' + parser: '@babel/eslint-parser', + ecmaVersion: 2021, // Allows for the parsing of modern ECMAScript features }, env: { + node: true, browser: true, - mocha: true + mocha: true, + 'vue/setup-compiler-macros': true }, extends: [ // https://github.com/vuejs/eslint-plugin-vue#priority-a-essential-error-prevention // consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules. - 'plugin:vue/essential', - '@vue/standard', - 'plugin:mocha/recommended' + 'plugin:vue/vue3-essential', + 'plugin:vue/vue3-recommended', + 'plugin:mocha/recommended', + 'standard' ], // required to lint *.vue files @@ -26,10 +29,16 @@ module.exports = { ], globals: { - 'ga': true, // Google Analytics - 'cordova': true, - '__statics': true, - 'process': true + ga: 'readonly', // Google Analytics + cordova: 'readonly', + __statics: 'readonly', + __QUASAR_SSR__: 'readonly', + __QUASAR_SSR_SERVER__: 'readonly', + __QUASAR_SSR_CLIENT__: 'readonly', + __QUASAR_SSR_PWA__: 'readonly', + process: 'readonly', + Capacitor: 'readonly', + chrome: 'readonly' }, // add your custom rules here @@ -39,6 +48,8 @@ module.exports = { // allow paren-less arrow functions 'arrow-parens': 'off', 'one-var': 'off', + 'no-void': 'off', + 'multiline-ternary': 'off', 'import/first': 'off', 'import/named': 'error', @@ -49,6 +60,7 @@ module.exports = { 'import/no-unresolved': 'off', 'import/no-extraneous-dependencies': 'off', 'prefer-promise-reject-errors': 'off', + 'vue/multi-word-component-names': 'off', // allow console.log during development only //'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off', @@ -56,3 +68,4 @@ module.exports = { //'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off' } } + diff --git a/webui/.postcssrc.js b/webui/.postcssrc.cjs similarity index 100% rename from webui/.postcssrc.js rename to webui/.postcssrc.cjs diff --git a/webui/babel.config.cjs b/webui/babel.config.cjs new file mode 100644 index 000000000..cd63d3933 --- /dev/null +++ b/webui/babel.config.cjs @@ -0,0 +1,16 @@ +/* eslint-disable */ + +module.exports = api => { + return { + presets: [ + [ + '@quasar/babel-preset-app', + api.caller(caller => caller && caller.target === 'node') + ? { targets: { node: 'current' } } + : {} + ] + ] + } +} + + diff --git a/webui/babel.config.js b/webui/babel.config.js deleted file mode 100644 index 9408c6cd4..000000000 --- a/webui/babel.config.js +++ /dev/null @@ -1,5 +0,0 @@ -module.exports = { - presets: [ - '@quasar/babel-preset-app' - ] -} diff --git a/webui/src/index.template.html b/webui/index.html similarity index 94% rename from webui/src/index.template.html rename to webui/index.html index 70fee7d64..6eb6d6091 100644 --- a/webui/src/index.template.html +++ b/webui/index.html @@ -20,7 +20,6 @@
- - +