use eslint autofix to start fixing violations

This commit is contained in:
spalger
2017-06-14 18:48:24 -07:00
parent da8e558817
commit 3d75c6ff0f
97 changed files with 1281 additions and 1280 deletions

View File

@ -3,9 +3,9 @@
* @type {Constuctor}
*/
var util = require('util');
var MockWritableStream; // defined simply for 0.10+, in detail for older versions
var Writable = require('stream').Writable;
const util = require('util');
let MockWritableStream; // defined simply for 0.10+, in detail for older versions
const Writable = require('stream').Writable;
if (Writable) {
@ -18,7 +18,7 @@ if (Writable) {
util.inherits(MockWritableStream, Writable);
} else {
// Node < 0.10 did not provide a usefull stream abstract
var Stream = require('stream').Stream;
const Stream = require('stream').Stream;
module.exports = MockWritableStream = function (opts) {
Stream.call(this);
this.writable = true;
@ -31,8 +31,8 @@ if (Writable) {
return false;
}
var cb;
if (typeof(arguments[arguments.length - 1]) === 'function') {
let cb;
if (typeof (arguments[arguments.length - 1]) === 'function') {
cb = arguments[arguments.length - 1];
}
@ -42,9 +42,9 @@ if (Writable) {
};
MockWritableStream.prototype.end = function (data, encoding, cb) {
if (typeof(data) === 'function') {
if (typeof (data) === 'function') {
cb = data;
} else if (typeof(encoding) === 'function') {
} else if (typeof (encoding) === 'function') {
cb = encoding;
this.write(data);
} else if (arguments.length > 0) {
@ -54,7 +54,7 @@ if (Writable) {
};
MockWritableStream.prototype.destroy = function (cb) {
var self = this;
const self = this;
if (!this.writable) {
if (cb) {