Files
crewli/apps/app/vitest.config.ts
bert.hausmans dcb8d53b61 style(app): apply eslint --fix to Tier 3 config files
WS-3 session 1b-ii Task 2 (audit Bucket X — 134 items).

Hand-reviewed quote-style/semi/arrow-parens autofixes on the three
config files explicitly excluded from session 1b-i:

- vite.config.ts (91 items, @typescript-eslint/quotes / semi /
  arrow-parens / curly). Plugin order verified unchanged by diff
  inspection (VueRouter → vue → vueJsx → vuetify → MetaLayouts →
  Components → AutoImport → svgLoader). One curly-add at the
  apexcharts resolver: \`if (componentName === 'VueApexCharts') { return {...} }\`
  — behaviorally identical to the prior braces-omitted form.
  Build smoke: pnpm build succeeded in 12.13s, zero warnings.

- themeConfig.ts (42 items, quotes / semi). Theme token values
  byte-identical, only surrounding quotes flipped from double to
  single. App title 'Crewli', logo span style, language labels and
  i18n codes all preserved.

- vitest.config.ts (1 item, lines-around-comment). Trivial: blank
  line added before the dts:false comment block.

No semantic changes. apps/app vitest 49 passed, vue-tsc clean,
pnpm build succeeded.

Lint baseline: 231 → 97 (Bucket X resolved).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-29 14:07:13 +02:00

39 lines
1.5 KiB
TypeScript

import { fileURLToPath } from 'node:url'
import vue from '@vitejs/plugin-vue'
import AutoImport from 'unplugin-auto-import/vite'
import { defineConfig } from 'vitest/config'
// Dedicated Vitest config — intentionally trimmed down from vite.config.ts.
// Skip Vuetify / MetaLayouts / VueRouter plugins so unit tests run fast in
// happy-dom without loading the full Vuexy bundle. Mirrors apps/portal/vitest.config.ts.
export default defineConfig({
plugins: [
vue(),
AutoImport({
imports: ['vue', '@vueuse/core'],
dirs: ['./src/@core/utils', './src/@core/composable/', './src/composables/', './src/utils/'],
vueTemplate: true,
// Don't write to auto-imports.d.ts — vite.config.ts owns that file
// with the full app's auto-import set. Trimmed test-only set must
// not clobber the IDE typings for the running dev server.
dts: false,
}),
],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url)),
'@core': fileURLToPath(new URL('./src/@core', import.meta.url)),
'@layouts': fileURLToPath(new URL('./src/@layouts', import.meta.url)),
'@images': fileURLToPath(new URL('./src/assets/images/', import.meta.url)),
'@styles': fileURLToPath(new URL('./src/assets/styles/', import.meta.url)),
},
},
test: {
environment: 'happy-dom',
globals: true,
include: ['tests/**/*.{test,spec}.ts', 'src/**/__tests__/**/*.{test,spec}.ts'],
setupFiles: ['./tests/setup.ts'],
},
})