ESLint one-var, no-var rules (#3239)

* fixed issues for eslint one-var and no-var rules

Co-authored-by: Joshi <simplyrender@gmail.com>
Co-authored-by: Andrew Henry <akhenry@gmail.com>
This commit is contained in:
Joel McKinnon
2020-08-10 12:13:23 -07:00
committed by GitHub
parent 4d560086dd
commit c6ca912f2b
193 changed files with 1601 additions and 1541 deletions

View File

@@ -67,7 +67,7 @@ define(['EventEmitter'], function (EventEmitter) {
* @private
*/
LocalClock.prototype.tick = function () {
var now = Date.now();
const now = Date.now();
this.emit("tick", now);
this.lastTick = now;
this.timeoutHandle = setTimeout(this.tick.bind(this), this.period);
@@ -81,7 +81,7 @@ define(['EventEmitter'], function (EventEmitter) {
* @returns {function} a function for deregistering the provided listener
*/
LocalClock.prototype.on = function (event) {
var result = EventEmitter.prototype.on.apply(this, arguments);
const result = EventEmitter.prototype.on.apply(this, arguments);
if (this.listeners(event).length === 1) {
this.start();
@@ -98,7 +98,7 @@ define(['EventEmitter'], function (EventEmitter) {
* @returns {function} a function for deregistering the provided listener
*/
LocalClock.prototype.off = function (event) {
var result = EventEmitter.prototype.off.apply(this, arguments);
const result = EventEmitter.prototype.off.apply(this, arguments);
if (this.listeners(event).length === 0) {
this.stop();