Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/frontend-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,4 @@ jobs:
run: pnpm install --frozen-lockfile --filter "frontend..."

- name: Type check
run: pnpm --filter frontend run typecheck:ci
run: pnpm --filter frontend run typecheck
1 change: 0 additions & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
"lint:cycles": "node scripts/check-cycles.mjs",
"lint:cycles:update": "node scripts/check-cycles.mjs --update",
"typecheck": "vue-tsc --noEmit -p tsconfig.json",
"typecheck:ci": "node scripts/typecheck-ratchet.mjs",
"build": "vite build",
"build:localhost": "vite build --mode localhost",
"build:production": "vite build --mode prod",
Expand Down
59 changes: 0 additions & 59 deletions frontend/scripts/typecheck-ratchet.mjs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
class="!border-t-0 !shadow-none"
@reload="emit('reload')"
>
<!-- @vue-expect-error shortcut: the child is untyped JS, so its slot is unknown. revisit: when CM-1600/1601 convert it to TypeScript -->
<template #actions>
<lf-button
type="secondary-ghost-light"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
:organization="props.modelValue"
is-primary
>
<!-- @vue-expect-error shortcut: the child is untyped JS, so its slot is unknown. revisit: when CM-1600/1601 convert it to TypeScript -->
<template #header>
<div class="h-13 flex justify-between items-start">
<div
Expand All @@ -91,6 +92,7 @@
is-primary
is-preview
>
<!-- @vue-expect-error shortcut: the child is untyped JS, so its slot is unknown. revisit: when CM-1600/1601 convert it to TypeScript -->
<template #header>
<div class="h-13 flex justify-between items-start">
<div
Expand All @@ -117,6 +119,7 @@
:compare-organization="preview.primary"
is-preview
>
<!-- @vue-expect-error shortcut: the child is untyped JS, so its slot is unknown. revisit: when CM-1600/1601 convert it to TypeScript -->
<template #header>
<div class="h-13">
<div class="flex justify-between items-start">
Expand Down
1 change: 0 additions & 1 deletion frontend/typecheck-baseline.json

This file was deleted.

9 changes: 5 additions & 4 deletions frontend/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { fileURLToPath, URL } from 'node:url';
import dns from 'node:dns';

import { defineConfig } from 'vite';
import { defineConfig, type PluginOption } from 'vite';
import vue from '@vitejs/plugin-vue';

import Components from 'unplugin-vue-components/vite';
Expand All @@ -10,18 +10,19 @@ import { ElementPlusResolver } from 'unplugin-vue-components/resolvers';
// https://vite.dev/config/server-options#server-host
dns.setDefaultResultOrder('verbatim');

const analyzerPlugins = async () => {
const analyzerPlugins = async (): Promise<PluginOption[]> => {
if (!process.env.ANALYZE) return [];
// rollup-plugin-visualizer is ESM-only, so a static import breaks this CJS-loaded config
const { visualizer } = await import('rollup-plugin-visualizer');
return [
// shortcut: the visualizer is typed with rollup's Plugin, not vite's. revisit: when the plugin ships vite-compatible types
visualizer({
template: 'treemap',
open: false,
gzipSize: true,
brotliSize: true,
filename: 'analyse.html',
}),
}) as PluginOption,
];
};

Expand All @@ -38,7 +39,7 @@ export default defineConfig(async () => ({
}),
],
dts: 'components.d.ts',
}),
}) as PluginOption,
...(await analyzerPlugins()),
],
resolve: {
Expand Down
Loading