Skip to content

Commit f34726a

Browse files
silverwindlunny
authored andcommitted
convert all js var to let/const (#7464)
Most of the work was done by `eslint --fix`, I fixed around 10 cases where it could not auto-convert.
1 parent d2958d9 commit f34726a

File tree

3 files changed

+274
-273
lines changed

3 files changed

+274
-273
lines changed

.eslintrc

+2
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,5 @@ globals:
2323

2424
rules:
2525
no-unused-vars: [error, {args: all, argsIgnorePattern: ^_, varsIgnorePattern: ^_, ignoreRestSiblings: true}]
26+
prefer-const: [2, {destructuring: all}]
27+
no-var: [2]

public/js/draw.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* globals gitGraph */
22

33
$(document).ready(function () {
4-
var graphList = [];
4+
const graphList = [];
55

66
if (!document.getElementById('graph-canvas')) {
77
return;

0 commit comments

Comments
 (0)