Skip to content

Deny unused variables and parameters in TypeScript/Vue #1764

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 7, 2023
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
10 changes: 5 additions & 5 deletions site/frontend/src/graph/render.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ function wheelZoomPlugin(opts) {
});
}

function onup(e) {
function onup(_e) {
document.removeEventListener("mousemove", onmove);
document.removeEventListener("mouseup", onup);
}
Expand Down Expand Up @@ -294,7 +294,7 @@ function genPlotOpts({
},
scales: {
y: {
range: (self, dataMin, dataMax) =>
range: (_self, dataMin, dataMax) =>
uPlot.rangeNum(absoluteMode ? 0 : dataMin, dataMax, 0.2, true),
},
},
Expand All @@ -307,7 +307,7 @@ function genPlotOpts({
{
label: yAxisLabel,
space: 24,
values: (self, splits) => {
values: (_self, splits) => {
return splits.map((v) => {
return v >= 1e12
? v / 1e12 + "T"
Expand All @@ -328,7 +328,7 @@ function genPlotOpts({
drawAxes: [
(u) => {
let {ctx} = u;
let {left, top, width, height} = u.bbox;
let {top, height} = u.bbox;

const interpolatedColorWithAlpha = "#fcb0f15f";

Expand All @@ -355,7 +355,7 @@ function genPlotOpts({
},
},
tooltipPlugin({
onclick(u, seriesIdx, dataIdx) {
onclick(_u, _seriesIdx, dataIdx) {
let thisCommit = commits[dataIdx][1];
let prevCommit = (commits[dataIdx - 1] || [null, null])[1];
window.open(
Expand Down
4 changes: 2 additions & 2 deletions site/frontend/src/pages/bootstrap/plots.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,14 +140,14 @@ function genPlotOpts({
{
label: yAxisLabel,
space: 24,
values: (self, splits) => {
values: (_self, splits) => {
return splits.map((v) => v / 1e9 + " sec");
},
},
],
plugins: [
tooltipPlugin({
onclick(u, seriesIdx, dataIdx) {
onclick(_u, _seriesIdx, dataIdx) {
let thisCommit = commits[dataIdx][1];
let prevCommit = (commits[dataIdx - 1] || [null, null])[1];
window.open(`/compare.html?start=${prevCommit}&end=${thisCommit}`);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import {CompileBenchmarkMap, CompileTestCase} from "../common";
import {computed} from "vue";
import {useExpandedStore} from "./expansion";
import BenchmarkDetail from "./benchmark-detail.vue";
import {getPastDate} from "./utils";
const props = defineProps<{
id: string;
Expand Down
1 change: 0 additions & 1 deletion site/frontend/src/pages/compare/metric-selector.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import {
createUrlWithAppendedParams,
navigateToUrlParams,
} from "../../utils/navigation";
import {BenchmarkInfo} from "../../api";
import {MetricDescription} from "./metrics";
const props = defineProps<{
Expand Down
2 changes: 1 addition & 1 deletion site/frontend/src/pages/compare/summary/count.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ const props = defineProps<{

<template>
<span :title="cases + ' test case(s), ' + benchmarks + ' unique benchmark(s)'"
>{{ cases }} ({{ benchmarks }})</span
>{{ props.cases }} ({{ props.benchmarks }})</span
>
</template>
2 changes: 1 addition & 1 deletion site/frontend/src/pages/compare/tabs.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script setup lang="tsx">
import {computed, h, ref, Ref} from "vue";
import {h, ref, Ref} from "vue";
import {CompareResponse, Tab} from "./types";
import {
diffClass,
Expand Down
4 changes: 1 addition & 3 deletions site/frontend/src/pages/status/page.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import {getJson} from "../../utils/requests";
import {STATUS_DATA_URL} from "../../urls";
import {withLoading} from "../../utils/loading";
import {computed, ref, Ref, watch} from "vue";
import {computed, ref, Ref} from "vue";
import {
Artifact,
BenchmarkError,
Expand All @@ -16,10 +16,8 @@ import {
differenceInSeconds,
format,
fromUnixTime,
sub,
subSeconds,
} from "date-fns";
import {CompileTestCase} from "../compare/compile/common";
import {useExpandedStore} from "./expansion";
async function loadStatus(loading: Ref<boolean>) {
Expand Down
4 changes: 3 additions & 1 deletion site/frontend/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
"rootDir": "src",
"esModuleInterop": true,
"jsx": "preserve",
"jsxFactory": "h"
"jsxFactory": "h",
"noUnusedLocals": true,
"noUnusedParameters": true
}
}