浏览代码

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.
tags/v1.10.0-rc1
silverwind 4 年前
父节点
当前提交
f34726a4b9
共有 3 个文件被更改,包括 274 次插入273 次删除
  1. 2
    0
      .eslintrc
  2. 1
    1
      public/js/draw.js
  3. 271
    272
      public/js/index.js

+ 2
- 0
.eslintrc 查看文件

@@ -23,3 +23,5 @@ globals:

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

+ 1
- 1
public/js/draw.js 查看文件

@@ -1,7 +1,7 @@
/* globals gitGraph */

$(document).ready(function () {
var graphList = [];
const graphList = [];

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

+ 271
- 272
public/js/index.js
文件差异内容过多而无法显示
查看文件


正在加载...
取消
保存