Skip to content

Commit

Permalink
convert all js var to let/const (go-gitea#7464)
Browse files Browse the repository at this point in the history
Most of the work was done by `eslint --fix`, I fixed around 10 cases
where it could not auto-convert.
  • Loading branch information
silverwind authored and jeffliu27 committed Jul 18, 2019
1 parent d3dc654 commit 3ba6e2a
Show file tree
Hide file tree
Showing 3 changed files with 274 additions and 273 deletions.
2 changes: 2 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,5 @@ globals:

rules:
no-unused-vars: [error, {args: all, argsIgnorePattern: ^_, varsIgnorePattern: ^_, ignoreRestSiblings: true}]
prefer-const: [2, {destructuring: all}]
no-var: [2]
2 changes: 1 addition & 1 deletion public/js/draw.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* globals gitGraph */

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

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

0 comments on commit 3ba6e2a

Please sign in to comment.