diff --git a/vue-vite/base/.editorconfig b/vue-vite/base/.editorconfig new file mode 100644 index 000000000..59d9a3a3e --- /dev/null +++ b/vue-vite/base/.editorconfig @@ -0,0 +1,16 @@ +# Editor configuration, see https://editorconfig.org +root = true + +[*] +charset = utf-8 +indent_style = space +indent_size = 2 +insert_final_newline = true +trim_trailing_whitespace = true + +[*.ts] +quote_type = single + +[*.md] +max_line_length = off +trim_trailing_whitespace = false diff --git a/vue-vite/base/.eslintignore b/vue-vite/base/.eslintignore deleted file mode 100644 index 7462f77ad..000000000 --- a/vue-vite/base/.eslintignore +++ /dev/null @@ -1,27 +0,0 @@ -.DS_Store -node_modules -/coverage -/dist -/ios -/android - - -# local env files -.env.local -.env.*.local - -# Log files -npm-debug.log* -yarn-debug.log* -yarn-error.log* -pnpm-debug.log* - -# Editor directories and files -.idea -.vscode -*.suo -*.ntvs* -*.njsproj -*.sln -*.sw? - diff --git a/vue-vite/base/.eslintrc.cjs b/vue-vite/base/.eslintrc.cjs deleted file mode 100644 index 8f715012c..000000000 --- a/vue-vite/base/.eslintrc.cjs +++ /dev/null @@ -1,20 +0,0 @@ -module.exports = { - root: true, - env: { - node: true - }, - 'extends': [ - 'plugin:vue/vue3-essential', - 'eslint:recommended', - '@vue/typescript/recommended' - ], - parserOptions: { - ecmaVersion: 2020 - }, - rules: { - 'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off', - 'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off', - 'vue/no-deprecated-slot-attribute': 'off', - '@typescript-eslint/no-explicit-any': 'off', - } -} diff --git a/vue-vite/base/.gitignore b/vue-vite/base/.gitignore index 2fc2afd6b..ae5b0207e 100644 --- a/vue-vite/base/.gitignore +++ b/vue-vite/base/.gitignore @@ -30,3 +30,9 @@ npm-debug.log* /platforms /plugins /www + +# Playwright +/test-results/ +/playwright-report/ +/blob-report/ +/playwright/.cache/ diff --git a/vue-vite/base/.prettierignore b/vue-vite/base/.prettierignore new file mode 100644 index 000000000..08d41d635 --- /dev/null +++ b/vue-vite/base/.prettierignore @@ -0,0 +1,5 @@ +# Prettier only reads the root .gitignore, not the ones inside the native +# projects, so ignore them here to skip Capacitor's copied web build and +# Gradle's build output. +android/ +ios/ diff --git a/vue-vite/base/.vscode/extensions.json b/vue-vite/base/.vscode/extensions.json index af3c0b294..5db56601c 100644 --- a/vue-vite/base/.vscode/extensions.json +++ b/vue-vite/base/.vscode/extensions.json @@ -1,5 +1,8 @@ { - "recommendations": [ - "Webnative.webnative" - ] + "recommendations": [ + "dbaeumer.vscode-eslint", + "esbenp.prettier-vscode", + "Vue.volar", + "Webnative.webnative" + ] } diff --git a/vue-vite/base/cypress.config.ts b/vue-vite/base/cypress.config.ts deleted file mode 100644 index 809c0b434..000000000 --- a/vue-vite/base/cypress.config.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { defineConfig } from 'cypress'; - -export default defineConfig({ - e2e: { - supportFile: 'tests/e2e/support/e2e.{js,jsx,ts,tsx}', - specPattern: 'tests/e2e/specs/**/*.cy.{js,jsx,ts,tsx}', - videosFolder: 'tests/e2e/videos', - screenshotsFolder: 'tests/e2e/screenshots', - baseUrl: 'http://localhost:5173', - // eslint-disable-next-line @typescript-eslint/no-unused-vars - setupNodeEvents(on, config) { - // implement node event listeners here - }, - }, -}); diff --git a/vue-vite/base/eslint.config.js b/vue-vite/base/eslint.config.js new file mode 100644 index 000000000..2b938358c --- /dev/null +++ b/vue-vite/base/eslint.config.js @@ -0,0 +1,41 @@ +import js from '@eslint/js'; +import ionic from '@ionic/eslint-config/recommended.js'; +import { defineConfigWithVueTs, vueTsConfigs } from '@vue/eslint-config-typescript'; +import pluginVue from 'eslint-plugin-vue'; +import globals from 'globals'; + +export default [ + ...defineConfigWithVueTs( + { + ignores: ['dist/**', 'android/**', 'ios/**', 'playwright-report/**', 'test-results/**', 'blob-report/**'], + }, + js.configs.recommended, + pluginVue.configs['flat/essential'], + vueTsConfigs.recommended, + ), + // Kept outside defineConfigWithVueTs: it treats `consistent-type-imports` as + // type-aware and would turn on project-based parsing for every .ts file. + // Note: @ionic/eslint-config only targets .ts/.tsx files, so