Skip to content

Commit 0a04788

Browse files
authored
Merge pull request #1627 from Kobzol/type-check-vue
Type-check Vue components, not just TypeScript files
2 parents 5d611f7 + f5973ef commit 0a04788

File tree

7 files changed

+222
-10
lines changed

7 files changed

+222
-10
lines changed

site/frontend/package-lock.json

Lines changed: 211 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

site/frontend/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"watch": "parcel watch --no-hmr",
77
"build": "parcel build",
88
"fmt": "prettier --write src",
9-
"check": "tsc -p tsconfig.json --noEmit && prettier --check src"
9+
"check": "vue-tsc -p tsconfig.json --noEmit && prettier --check src"
1010
},
1111
"author": "",
1212
"license": "MIT",
@@ -16,7 +16,8 @@
1616
"@types/highcharts": "^7.0.0",
1717
"@types/msgpack-lite": "^0.1.8",
1818
"prettier": "2.8.8",
19-
"typescript": "^5.0.2"
19+
"typescript": "^5.0.2",
20+
"vue-tsc": "^1.8.3"
2021
},
2122
"dependencies": {
2223
"highcharts": "6.0.7",

site/frontend/src/pages/compare/compile/comparisons-table.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,14 +159,14 @@ function prettifyRawNumber(number: number): string {
159159
</td>
160160
<td v-if="showRawData" class="numeric">
161161
<a v-bind:href="detailedQueryRawDataLink(commitA, comparison)">
162-
<abbr :title="comparison.datumA">{{
162+
<abbr :title="comparison.datumA.toString()">{{
163163
prettifyRawNumber(comparison.datumA)
164164
}}</abbr>
165165
</a>
166166
</td>
167167
<td v-if="showRawData" class="numeric">
168168
<a v-bind:href="detailedQueryRawDataLink(commitB, comparison)">
169-
<abbr :title="comparison.datumB">{{
169+
<abbr :title="comparison.datumB.toString()">{{
170170
prettifyRawNumber(comparison.datumB)
171171
}}</abbr>
172172
</a>

site/frontend/src/pages/compare/runtime/comparisons-table.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,12 @@ function prettifyRawNumber(number: number): string {
9090
</div>
9191
</td>
9292
<td v-if="showRawData" class="numeric">
93-
<abbr :title="comparison.datumA">{{
93+
<abbr :title="comparison.datumA.toString()">{{
9494
prettifyRawNumber(comparison.datumA)
9595
}}</abbr>
9696
</td>
9797
<td v-if="showRawData" class="numeric">
98-
<abbr :title="comparison.datumB">{{
98+
<abbr :title="comparison.datumB.toString()">{{
9999
prettifyRawNumber(comparison.datumB)
100100
}}</abbr>
101101
</td>

site/frontend/src/pages/compare/summary/percent-value.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ const formattedValue = computed((): string => {
1515
});
1616
const padSpaces = computed((): string => {
1717
const value = formattedValue.value;
18-
if (value.length < this.padWidth) {
19-
return "&nbsp;".repeat(this.padWidth - value.length);
18+
if (value.length < props.padWidth) {
19+
return "&nbsp;".repeat(props.padWidth - value.length);
2020
}
2121
return "";
2222
});

site/frontend/src/pages/compare/tabs.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ function SummaryTable({summary}: {summary: SummaryGroup}) {
5151
</td>
5252
<td>
5353
<SummaryPercentValue
54-
className={percentClass(summary.all.average)}
54+
class={percentClass(summary.all.average)}
5555
value={summary.all.average}
5656
/>
5757
</td>

site/frontend/tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"compilerOptions": {
33
"lib": ["es2020", "dom"],
44
"target": "es2017",
5+
"module": "es2022",
56
"moduleResolution": "node",
67
"rootDir": "src",
78
"esModuleInterop": true,

0 commit comments

Comments
 (0)