vue-tsc 不支持 TypeScript 7,前端单独用 TS 5.9 + vue-tsc(服务端仍是 TS 7), 根目录 bun run typecheck 同时检查两边。修掉前端原有的 8 个类型错误(未使用的变量、类型标注)。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
03878f6cc2
commit
bd84e3f8d1
8 files changed
+35
-26
No files matched your search
+5
-3
@@ -7,7 +7,8 @@
|
||||
"dev": "bun --bun vite",
|
||||
"build": "bun --bun vite build",
|
||||
"build:staging": "bun --bun vite build --mode staging",
|
||||
"fmt": "bun fmt src/"
|
||||
"fmt": "bun fmt src/",
|
||||
"typecheck": "vue-tsc --noEmit -p tsconfig.app.json"
|
||||
},
|
||||
"dependencies": {
|
||||
"@codemirror/lang-css": "^6.3.1",
|
||||
@@ -36,8 +37,9 @@
|
||||
"@vitejs/plugin-vue": "^6.0.10",
|
||||
"@vue/tsconfig": "^0.9.1",
|
||||
"prettier": "^3.9.10",
|
||||
"typescript": "^7.0.2",
|
||||
"typescript": "~5.9.3",
|
||||
"unplugin-vue-components": "^32.1.0",
|
||||
"vite": "^8.3.5"
|
||||
"vite": "^8.3.5",
|
||||
"vue-tsc": "^3.3.13"
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="prompt-panel">
|
||||
<div class="messages" ref="messagesRef">
|
||||
<div
|
||||
v-for="(pair, pi) in pairs"
|
||||
v-for="pair in pairs"
|
||||
:key="pair.assistantMsg?.id ?? 'user-' + pair.index"
|
||||
class="message-pair"
|
||||
:class="{ 'has-delete': pair.assistantMsg?.id && !streaming }"
|
||||
|
||||
@@ -486,21 +486,6 @@ const countBuckets = computed(() => {
|
||||
]
|
||||
})
|
||||
|
||||
const scoreBars = computed(() => {
|
||||
if (!stats.value) return []
|
||||
const d = stats.value.score_distribution
|
||||
const vals = [d.range_1_2, d.range_2_3, d.range_3_4, d.range_4_5, d.range_5]
|
||||
const max = Math.max(...vals, 1)
|
||||
const colors = ["#d03050", "#f0a020", "#2080f0", "#18a058", "#18a058"]
|
||||
const labels = ["★", "★★", "★★★", "★★★★", "★★★★★"]
|
||||
return vals.map((v, i) => ({
|
||||
value: v,
|
||||
label: labels[i],
|
||||
color: colors[i],
|
||||
height: Math.max(Math.round((v / max) * 68), 3) + "px",
|
||||
}))
|
||||
})
|
||||
|
||||
const flagBadges = computed(() => {
|
||||
if (!stats.value) return []
|
||||
const f = stats.value.flag_stats
|
||||
|
||||
@@ -115,10 +115,8 @@ import FlagCell from "../components/submissions/FlagCell.vue"
|
||||
import ExpandedSubTable from "../components/submissions/ExpandedSubTable.vue"
|
||||
|
||||
import { submission } from "../store/submission"
|
||||
import { taskTab, challengeDisplay } from "../store/task"
|
||||
import { step } from "../store/tutorial"
|
||||
import { html as eHtml, css as eCss, js as eJs } from "../store/editors"
|
||||
import { roleAdmin, roleSuper, user } from "../store/user"
|
||||
import { roleAdmin, roleSuper } from "../store/user"
|
||||
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
|
||||
@@ -12,6 +12,8 @@ export const submission = ref<SubmissionAll>({
|
||||
task_type: TASK_TYPE.Tutorial,
|
||||
score: 0.0,
|
||||
my_score: 0,
|
||||
submit_count: 0,
|
||||
view_count: 0,
|
||||
html: "",
|
||||
css: "",
|
||||
js: "",
|
||||
|
||||
Reference in new issue
Block a user