diff --git a/eslint.config.js b/eslint.config.js index 1c426638272..18ada57bd95 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -1,30 +1,15 @@ import cypress from 'eslint-plugin-cypress'; import eslint from 'eslint-plugin-import'; -// Import eslint from '@eslint/eslintrc'; import globals from 'globals'; -// Import path from 'node:path'; -// Import { fileURLToPath } from 'node:url'; import js from '@eslint/js'; import vue from 'eslint-plugin-vue'; -// Import { FlatCompat } from ''; -// Const compat = new FlatCompat({ -// BaseDirectory: import.meta.url, -// RecommendedConfig: js.configs.recommended, -// AllConfig: js.configs.all, -// Cypress: cypress.configs.recommended, -// }); - export default { - // https://eslint.org/docs/user-guide/configuring#configuration-cascading-and-hierarchy - // This option interrupts the configuration hierarchy at this file - // Remove this if you have an higher level ESLint config file (it usually happens into a monorepos) - plugins: { vue, eslint, cypress }, languageOptions: { globals: { ...globals.node, ...globals.browser, - ...vue.environments['setup-compiler-macros']['setup-compiler-macros'], + ...vue.configs['vue3-strongly-recommended'].globals, ...cypress.environments.globals.globals, ga: 'readonly', cordova: 'readonly', @@ -45,13 +30,6 @@ export default { parser: '@babel/eslint-parser', }, }, - // Files: ['test/cypress/**/*.*'], - // Rules: { - // Semi: 'error', - // 'space-before-function-paren': 0, - // 'prefer-promise-reject-errors': 0, - // 'vue/no-multiple-template-root': 0, - // }, rules: { ...js.configs.recommended.rules, 'generator-star-spacing': 'off', @@ -100,14 +78,7 @@ export default { 'vue/no-parsing-error': 'error', 'vue/no-deprecated-slot-attribute': 'error', 'prefer-promise-reject-errors': 'error', - // }, - // { - - // }, }, - // LinterOptions: { - // ReportUnusedInlineConfigs: 'error', - // }, ignores: [ '/dist', '/src-capacitor', @@ -116,95 +87,4 @@ export default { '/node_modules', '.eslintrc.js', ], - // Rules order is important, please avoid shuffling them - // Extends: [ - // 'standard', - // // Base ESLint recommended rules - // 'eslint:recommended', - - // // Uncomment any of the lines below to choose desired strictness, - // // but leave only one uncommented! - // // See https://eslint.vuejs.org/rules/#available-rules - // // 'plugin:vue/vue3-essential', // Priority A: Essential (Error Prevention) - // 'plugin:vue/vue3-strongly-recommended', // Priority B: Strongly Recommended (Improving Readability) - // // 'plugin:vue/vue3-recommended', // Priority C: Recommended (Minimizing Arbitrary Choices and Cognitive Overhead) - - // // https://github.com/prettier/eslint-config-prettier#installation - // // usage with Prettier, provided by 'eslint-config-prettier'. - // 'prettier', - // ], - - // Plugins: [ - // // https://eslint.vuejs.org/user-guide/#why-doesn-t-it-work-on-vue-files - // // required to lint *.vue files - // 'vue', - - // // https://github.com/typescript-eslint/typescript-eslint/issues/389#issuecomment-509292674 - // // Prettier has not been included as plugin to avoid performance impact - // // add it as an extension for your IDE - // ], - - // Globals: {}, - - // Add your custom rules here - // Rules: { - // // allow async-await - // 'generator-star-spacing': 'error', - // // allow paren-less arrow functions - // 'arrow-parens': 'error', - // 'one-var': 'error', - // 'no-void': 'error', - // 'multiline-ternary': 'error', - - // 'import/first': 'error', - // 'import/named': 'error', - // 'import/namespace': 'error', - // 'import/default': 'error', - // 'import/export': 'error', - // 'import/extensions': 'error', - // 'import/no-unresolved': 'error', - // 'import/no-extraneous-dependencies': 'error', - // Semi: 'error', - // 'space-before-function-paren': 'error', - // 'no-undef': 'error', - // 'no-unused-vars': 'warn', - // 'no-console': 'error', - // 'no-debugger': 'error', - // 'no-useless-escape': 'error', - // 'no-prototype-builtins': 'error', - // 'no-async-promise-executor': 'error', - // 'no-irregular-whitespace': 'error', - // 'no-constant-condition': 'error', - // 'no-unsafe-finally': 'error', - // 'no-extend-native': 'error', - - // 'vue/no-unused-components': 'error', - // 'vue/no-unused-properties': 'error', - // 'vue/no-multiple-template-root': 'error', - // 'vue/no-v-html': 'error', - // 'vue/no-v-model-argument': 'error', - // 'vue/no-parsing-error': 'error', - // 'vue/no-deprecated-slot-attribute': 'error', - - // 'prefer-promise-reject-errors': 'error', - - // // allow debugger during development only - // 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'error', - // }, - // Overrides: [ - // { - // Files: ['test/cypress/**/*.*'], - // Extends: [ - // // Add Cypress-specific lint rules, globals and Cypress plugin - // // See https://github.com/cypress-io/eslint-plugin-cypress#rules - // 'plugin:cypress/recommended', - // ], - // Rules: { - // Semi: 'error', - // 'space-before-function-paren': 'error', - // 'prefer-promise-reject-errors': 'error', - // 'vue/no-multiple-template-root': 'error', - // }, - // }, - // ], }; diff --git a/vitest.config.js b/vitest.config.js index 4f19c2340c1..bfdd6a4c107 100644 --- a/vitest.config.js +++ b/vitest.config.js @@ -1,5 +1,5 @@ import { defineConfig } from 'vitest/config'; -import vue from '@vitejs/'; +import vue from '@vitejs/plugin-vue'; import { quasar, transformAssetUrls } from '@quasar/vite-plugin'; import jsconfigPaths from 'vite-jsconfig-paths'; import VueI18nPlugin from '@intlify/unplugin-vue-i18n/vite';