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

@ -1,23 +1,23 @@
/* global angular */
var _ = require('lodash');
var expect = require('expect.js');
var Promise = require('bluebird');
var sinon = require('sinon');
const _ = require('lodash');
const expect = require('expect.js');
const Promise = require('bluebird');
const sinon = require('sinon');
describe('Angular esFactory', function () {
before(function () {
require('../../../src/elasticsearch.angular.js');
});
var uuid = (function () { var i = 0; return function () { return ++i; }; }());
var esFactory;
var $http;
var $rootScope;
var $httpBackend;
const uuid = (function () { let i = 0; return function () { return ++i; }; }());
let esFactory;
let $http;
let $rootScope;
let $httpBackend;
function bootstrap(env) {
beforeEach(function () {
var promiseProvider = _.noop;
let promiseProvider = _.noop;
if (env.bluebirdPromises) {
promiseProvider = function ($provide) {
$provide.service('$q', function () {
@ -59,7 +59,7 @@ describe('Angular esFactory', function () {
});
it('returns a new client when it is called', function () {
var client = esFactory({
const client = esFactory({
hosts: null
});
@ -69,10 +69,10 @@ describe('Angular esFactory', function () {
});
it('returns an error created by calling a method incorrectly', function () {
var client = esFactory({ hosts: null });
var err;
const client = esFactory({ hosts: null });
let err;
var prom = client.get().then(function () {
const prom = client.get().then(function () {
throw new Error('expected request to fail');
}, function (err) {
expect(err).to.have.property('message');

View File

@ -1,8 +1,8 @@
var expect = require('expect.js');
var Transport = require('../../../src/lib/transport');
const expect = require('expect.js');
const Transport = require('../../../src/lib/transport');
describe('elasticsearch namespace', function () {
var es = window.elasticsearch;
const es = window.elasticsearch;
it('is defined on the window', function () {
expect(es).to.be.ok();
});
@ -12,7 +12,7 @@ describe('elasticsearch namespace', function () {
});
it('can create a client', function () {
var client = new es.Client({ hosts: null });
const client = new es.Client({ hosts: null });
expect(client).to.have.keys('transport');
expect(client.transport).to.be.a(es.Transport);
client.close();

View File

@ -1,6 +1,6 @@
/* global $ */
var expect = require('expect.js');
var Transport = require('../../../src/lib/transport');
const expect = require('expect.js');
const Transport = require('../../../src/lib/transport');
describe('jQuery.es namespace', function () {
it('is defined on the global jQuery', function () {
@ -12,7 +12,7 @@ describe('jQuery.es namespace', function () {
});
it('can create a client', function () {
var client = new $.es.Client({ hosts: null });
const client = new $.es.Client({ hosts: null });
expect(client).to.have.keys('transport');
expect(client.transport).to.be.a($.es.Transport);
client.close();