Skip to content
Snippets Groups Projects
Select Git revision
  • v1.18.1
  • main default protected
  • Issue/3242-UserDeletionOnProfile
  • Issue/3212-AddEmailforexpiredToken
  • Test/xxxx-shaclForm
  • Hotfix/xxxx-podmanComposeFix
  • Issue/3245-maintenanceAPIUpdate
  • dev protected
  • Issue/3135-newUiUnitTests
  • Issue/3187-VersionStorage
  • Issue/3179-sortDataPublicationServiceList
  • Issue/3193-processingOfPersonalDataConsent
  • Hotfix/2486-ImprovedGitLabTokenHandling
  • Issue/2486-ImprovedGitLabTokenHandling
  • Issue/2511-moveResourceInfoToModalView
  • Issue/2450-AdminPage
  • Issue/3222-FairDOFeedbackChanges
  • Issue/1560-VisibilityAndOrder
  • Issue/3082-visualizeFDOs
  • Issue/3203-brokenCoscineSurfacePage
  • Issue/3192-gitlabTokenUpdateNotPossible
  • v3.26.1
  • v3.26.0
  • v3.25.0
  • v3.24.0
  • v3.23.0
  • v3.22.0
  • v3.21.0
  • v3.20.0
  • v3.19.2
  • v3.19.1
  • v3.19.0
  • v3.18.0
  • v3.17.2
  • v3.17.1
  • v3.17.0
  • v3.16.1
  • v3.16.0
  • v3.15.6
  • v3.15.5
  • v3.15.4
41 results

.eslintrc.js

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    vite.config.mts 2.63 KiB
    /// <reference types="vitest/config" />
    import { defineConfig, type UserConfig } from "vite";
    import vue from "@vitejs/plugin-vue";
    import path from "node:path";
    
    import { nodePolyfills } from "vite-plugin-node-polyfills";
    import WindiCSS from "vite-plugin-windicss";
    import Components from "unplugin-vue-components/vite";
    import AutoImport from "unplugin-auto-import/vite";
    import Icons from "unplugin-icons/vite";
    import IconsResolver from "unplugin-icons/resolver";
    import { BootstrapVueNextResolver } from "bootstrap-vue-next";
    
    // Define the configuration with proper typing
    const config: UserConfig = defineConfig({
      resolve: {
        alias: {
          "@": path.resolve(__dirname, "src"),
        },
        dedupe: ["vue"],
      },
    
      define: {
        "process.env.MOCKUP": process.env.MOCKUP,
      },
    
      build: {
        commonjsOptions: {
          strictRequires: true,
        },
        target: "esnext",
        rollupOptions: {
          output: {
            manualChunks: {
              "@coscine/api-client": ["@coscine/api-client"],
              "@coscine/form-generator": ["@coscine/form-generator"],
              "bootstrap-vue-next": ["bootstrap-vue-next"],
              "rdf-parse": ["rdf-parse"],
            },
          },
        },
      },
    
      plugins: [
        nodePolyfills(),
        vue(),
        WindiCSS(),
        Components({
          dts: "src/components.d.ts",
          include: [/\.vue$/, /\.vue\?vue/],
          exclude: [
            /[\\/]node_modules[\\/]/,
            /[\\/]\.git[\\/]/,
            /[\\/]\.nuxt[\\/]/,
          ],
          resolvers: [
            BootstrapVueNextResolver(),
            IconsResolver(),
            (componentName) => {
              if (componentName == "FormGenerator") {
                return { name: "default", from: "@coscine/form-generator" };
              }
            },
          ],
        }),
        AutoImport({
          imports: ["pinia", "vue", "vue-i18n", "vue-router", "@vueuse/core"],
          dts: "src/auto-imports.d.ts",
          eslintrc: {
            enabled: true, // <-- this
          },
          resolvers: [IconsResolver()],
          dirs: ["./src"],
        }),
        Icons({
          compiler: "vue3",
          autoInstall: true,
          scale: 1,
          defaultClass: "unplugin-icon unplugin-icon-coscine",
        }),
      ],
    
      appType: "spa",
    
      server: {
        host: true,
        port: 9234,
        watch: {
          // Use polling to avoid "too many open files" (EMFILE) errors caused by hitting system file watcher limits.
          // Ignoring node_modules and .git to reduce the load and improve stability.
          usePolling: true,
          interval: 300,
          ignored: ["**/node_modules/**", "**/.git/**"],
        },
      },
    
      test: {
        globals: true,
        environment: "happy-dom",
        setupFiles: [path.resolve(__dirname, "test/setup.ts")],
        reporters: "dot",
      },
    });
    
    export default config;