Skip to content

Commit 16cd4a3

Browse files
committed
lint: no-var rule
1 parent 3cc3316 commit 16cd4a3

File tree

5 files changed

+7
-8
lines changed

5 files changed

+7
-8
lines changed

eslint.config.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ export default [
3030
"@typescript-eslint/no-unused-vars": "off",
3131
"no-empty-pattern": "off",
3232
"no-empty": "off",
33-
"no-var": "off",
3433
"no-unsafe-optional-chaining": "off",
3534
"no-useless-escape": "off",
3635
"prefer-const": "off",

src/app/App.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,8 @@ export const ExportStateButton: React.FC<{}> = ({}) => {
124124
return <Tooltip title="save session locally">
125125
<Button variant="text" onClick={()=>{
126126
function download(content: string, fileName: string, contentType: string) {
127-
var a = document.createElement("a");
128-
var file = new Blob([content], {type: contentType});
127+
let a = document.createElement("a");
128+
let file = new Blob([content], {type: contentType});
129129
a.href = URL.createObjectURL(file);
130130
a.download = fileName;
131131
a.click();

src/data/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ export function tupleEqual(a: any[], b: any[]) {
139139
if (a === b) return true;
140140
if (a == null || b == null) return false;
141141
if (a.length !== b.length) return false;
142-
for (var i = 0; i < a.length; ++i) {
142+
for (let i = 0; i < a.length; ++i) {
143143
if (a[i] !== b[i]) return false;
144144
}
145145
return true;

src/views/DataThread.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -381,11 +381,11 @@ export const DataThread: FC<{}> = function ({ }) {
381381
assembledChart = (({ data, ...o }) => o)(assembledChart);
382382

383383
let getRandom = (seed: number) => {
384-
var x = Math.sin(seed++) * 10000;
384+
let x = Math.sin(seed++) * 10000;
385385
return x - Math.floor(x);
386386
}
387387
let getRandomSubarray = (arr: any[], size: number) => {
388-
var shuffled = arr.slice(0), i = arr.length, temp, index;
388+
let shuffled = arr.slice(0), i = arr.length, temp, index;
389389
while (i--) {
390390
index = Math.floor((i + 1) * getRandom(233 * i + 888));
391391
temp = shuffled[index];

src/views/EncodingShelfThread.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,11 @@ export let ChartElementFC: FC<{chart: Chart, tableRows: any[], boxWidth?: number
9090
assembledChart = (({ data, ...o }) => o)(assembledChart);
9191

9292
let getRandom = (seed: number) => {
93-
var x = Math.sin(seed++) * 10000;
93+
let x = Math.sin(seed++) * 10000;
9494
return x - Math.floor(x);
9595
}
9696
let getRandomSubarray = (arr: any[], size: number) => {
97-
var shuffled = arr.slice(0), i = arr.length, temp, index;
97+
let shuffled = arr.slice(0), i = arr.length, temp, index;
9898
while (i--) {
9999
index = Math.floor((i + 1) * getRandom(233 * i + 888));
100100
temp = shuffled[index];

0 commit comments

Comments
 (0)