Fix space lint

This commit is contained in:
Nathan Shively-Sanders
2019-02-27 16:27:11 -08:00
parent 9a9d2abc1f
commit af8034fe41
12 changed files with 94 additions and 94 deletions
@@ -213,7 +213,7 @@ $('ul').undelegate('click', 'li', () => {
$('li').on('click', () => {
$.noop;
});
$('ul').on('click', 'li', function () {
$('ul').on('click', 'li', function() {
console.log($(this).text());
});
$('li').off('click');
+2 -2
View File
@@ -578,7 +578,7 @@ $('#example tbody').on('click', 'td', () => {
const cell_invalidate_1 = cell.invalidate();
const cell_invalidate_2 = cell.invalidate("data");
$('#example tbody').on('click', 'td', function () {
$('#example tbody').on('click', 'td', function() {
this.innerHTML = (parseInt(this.innerHTML, 10) + 1).toString();
dt.cell(this).invalidate().draw();
});
@@ -773,7 +773,7 @@ let column_search_set = column.search("string");
column_search_set = column.search("string", true);
column_search_set = column.search("string", true, false);
column_search_set = column.search("string", true, false, true);
$('#column3_search').on('keyup', function () {
$('#column3_search').on('keyup', function() {
dt
.columns(3)
.search((this as HTMLInputElement).value)
+1 -1
View File
@@ -772,7 +772,7 @@ describe("Jasmine Mock Ajax (for toplevel)", () => {
error = jasmine.createSpy("onFailure");
complete = jasmine.createSpy("onComplete");
onreadystatechange = function () {
onreadystatechange = function() {
if (this.readyState === (this.DONE || 4)) { // IE 8 doesn't support DONE
if (this.status === 200) {
success(this.responseText, this.textStatus, this);
+1 -1
View File
@@ -16,7 +16,7 @@ klaw('/some/dir')
// README.md: Streams 2 & 3 (pull) with error handling
klaw('/some/dir')
.on('readable', function () {
.on('readable', function() {
while (true) {
const item = this.read();
if (!item) break;
+80 -80
View File
@@ -173,7 +173,7 @@ knex.select('title', 'author', 'year').from('books');
knex.select({ name: 'title', writer: 'author' }).from(knex.raw('books'));
knex.select().table('books');
knex.avg('sum_column1').from(function () {
knex.avg('sum_column1').from(function() {
this.sum('column1 as sum_column1').from('t1').groupBy('column1').as('t1');
}).as('ignored_alias');
@@ -190,7 +190,7 @@ knex('users').where({
knex('users').where('id', 1);
knex('users').where(function () {
knex('users').where(function() {
this.where('id', 1).orWhere('id', '>', 10);
}).orWhere({name: 'Tester'});
@@ -218,7 +218,7 @@ knex.select('name').from('users')
knex('users')
.where('name', '=', 'John')
.orWhere(function () {
.orWhere(function() {
this.where('votes', '>', 100).andWhere('title', '<>', 'Admin');
});
@@ -230,13 +230,13 @@ knex('users').whereNull('updated_at');
knex('users').whereNotNull('created_at');
knex('users').whereExists(function () {
knex('users').whereExists(function() {
this.select('*').from('accounts').whereRaw('users.account_id = accounts.id');
});
knex('users').whereExists(knex.select('*').from('accounts').whereRaw('users.account_id = accounts.id'));
knex('users').whereNotExists(function () {
knex('users').whereNotExists(function() {
this.select('*').from('accounts').whereRaw('users.account_id = accounts.id');
});
@@ -321,15 +321,15 @@ knex('users')
.join(knex('contacts').select('user_id', 'phone').as('contacts'), { 'users.id': 'contacts.user_id' })
.select('users.id', 'contacts.phone');
knex.select('*').from('users').join(knex('accounts').select('id', 'owner_id').as('accounts'), function () {
knex.select('*').from('users').join(knex('accounts').select('id', 'owner_id').as('accounts'), function() {
this.on('accounts.id', '=', 'users.account_id').orOn('accounts.owner_id', '=', 'users.id');
});
knex.select('*').from('users').join('accounts', function () {
knex.select('*').from('users').join('accounts', function() {
this.on('accounts.id', '=', 'users.account_id').orOn('accounts.owner_id', '=', 'users.id');
});
knex.select('*').from('users').join('accounts', function (join: Knex.JoinClause) {
knex.select('*').from('users').join('accounts', function(join: Knex.JoinClause) {
if (this !== join) {
throw new Error("join() callback call semantics wrong");
}
@@ -337,120 +337,120 @@ knex.select('*').from('users').join('accounts', function (join: Knex.JoinClause)
join.on('accounts.id', '=', 'users.account_id').orOn('accounts.owner_id', '=', 'users.id');
});
knex.select('*').from('user').join('contacts', function () {
knex.select('*').from('user').join('contacts', function() {
this.on('users.id', '=', knex.raw(7));
});
knex.select('*').from('users').join('contacts', function () {
knex.select('*').from('users').join('contacts', function() {
this.on('users.id', '=', 'contacts.id').onIn('contacts.id', [7, 15, 23, 41]);
});
knex.select('*').from('users').join('contacts', function () {
knex.select('*').from('users').join('contacts', function() {
this.on('users.id', '=', 'contacts.id').andOnIn('contacts.id', [7, 15, 23, 41]);
});
knex.select('*').from('users').join('contacts', function () {
knex.select('*').from('users').join('contacts', function() {
this.on('users.id', '=', 'contacts.id').orOnIn('contacts.id', [7, 15, 23, 41]);
});
knex.select('*').from('users').join('contacts', function () {
knex.select('*').from('users').join('contacts', function() {
this.on('users.id', '=', 'contacts.id').onNotIn('contacts.id', [7, 15, 23, 41]);
});
knex.select('*').from('users').join('contacts', function () {
knex.select('*').from('users').join('contacts', function() {
this.on('users.id', '=', 'contacts.id').andOnNotIn('contacts.id', [7, 15, 23, 41]);
});
knex.select('*').from('users').join('contacts', function () {
knex.select('*').from('users').join('contacts', function() {
this.on('users.id', '=', 'contacts.id').orOnNotIn('contacts.id', [7, 15, 23, 41]);
});
knex.select('*').from('users').join('contacts', function () {
knex.select('*').from('users').join('contacts', function() {
this.on('users.id', '=', 'contacts.id').onNull('contacts.email');
});
knex.select('*').from('users').join('contacts', function () {
knex.select('*').from('users').join('contacts', function() {
this.on('users.id', '=', 'contacts.id').andOnNull('contacts.email');
});
knex.select('*').from('users').join('contacts', function () {
knex.select('*').from('users').join('contacts', function() {
this.on('users.id', '=', 'contacts.id').orOnNull('contacts.email');
});
knex.select('*').from('users').join('contacts', function () {
knex.select('*').from('users').join('contacts', function() {
this.on('users.id', '=', 'contacts.id').onNotNull('contacts.email');
});
knex.select('*').from('users').join('contacts', function () {
knex.select('*').from('users').join('contacts', function() {
this.on('users.id', '=', 'contacts.id').andOnNotNull('contacts.email');
});
knex.select('*').from('users').join('contacts', function () {
knex.select('*').from('users').join('contacts', function() {
this.on('users.id', '=', 'contacts.id').orOnNotNull('contacts.email');
});
knex.select('*').from('users').join('contacts', function () {
this.on('users.id', '=', 'contacts.id').onExists(function () {
knex.select('*').from('users').join('contacts', function() {
this.on('users.id', '=', 'contacts.id').onExists(function() {
this.select('*').from('accounts').whereRaw('users.account_id = accounts.id');
});
});
knex.select('*').from('users').join('contacts', function () {
this.on('users.id', '=', 'contacts.id').andOnExists(function () {
knex.select('*').from('users').join('contacts', function() {
this.on('users.id', '=', 'contacts.id').andOnExists(function() {
this.select('*').from('accounts').whereRaw('users.account_id = accounts.id');
});
});
knex.select('*').from('users').join('contacts', function () {
this.on('users.id', '=', 'contacts.id').orOnExists(function () {
knex.select('*').from('users').join('contacts', function() {
this.on('users.id', '=', 'contacts.id').orOnExists(function() {
this.select('*').from('accounts').whereRaw('users.account_id = accounts.id');
});
});
knex.select('*').from('users').join('contacts', function () {
this.on('users.id', '=', 'contacts.id').onNotExists(function () {
knex.select('*').from('users').join('contacts', function() {
this.on('users.id', '=', 'contacts.id').onNotExists(function() {
this.select('*').from('accounts').whereRaw('users.account_id = accounts.id');
});
});
knex.select('*').from('users').join('contacts', function () {
this.on('users.id', '=', 'contacts.id').andOnNotExists(function () {
knex.select('*').from('users').join('contacts', function() {
this.on('users.id', '=', 'contacts.id').andOnNotExists(function() {
this.select('*').from('accounts').whereRaw('users.account_id = accounts.id');
});
});
knex.select('*').from('users').join('contacts', function () {
this.on('users.id', '=', 'contacts.id').orOnNotExists(function () {
knex.select('*').from('users').join('contacts', function() {
this.on('users.id', '=', 'contacts.id').orOnNotExists(function() {
this.select('*').from('accounts').whereRaw('users.account_id = accounts.id');
});
});
knex.select('*').from('users').join('contacts', function () {
knex.select('*').from('users').join('contacts', function() {
this.on('users.id', '=', 'contacts.id').onBetween('contacts.id', [5, 30]);
});
knex.select('*').from('users').join('contacts', function () {
knex.select('*').from('users').join('contacts', function() {
this.on('users.id', '=', 'contacts.id').andOnBetween('contacts.id', [5, 30]);
});
knex.select('*').from('users').join('contacts', function () {
knex.select('*').from('users').join('contacts', function() {
this.on('users.id', '=', 'contacts.id').orOnBetween('contacts.id', [5, 30]);
});
knex.select('*').from('users').join('contacts', function () {
knex.select('*').from('users').join('contacts', function() {
this.on('users.id', '=', 'contacts.id').onNotBetween('contacts.id', [5, 30]);
});
knex.select('*').from('users').join('contacts', function () {
knex.select('*').from('users').join('contacts', function() {
this.on('users.id', '=', 'contacts.id').andOnNotBetween('contacts.id', [5, 30]);
});
knex.select('*').from('users').join('contacts', function () {
knex.select('*').from('users').join('contacts', function() {
this.on('users.id', '=', 'contacts.id').orOnNotBetween('contacts.id', [5, 30]);
});
knex.select('*').from('users').join('contacts', function () {
this.on('users.id', '=', 'contacts.id').onNotExists(function () {
knex.select('*').from('users').join('contacts', function() {
this.on('users.id', '=', 'contacts.id').onNotExists(function() {
this.select('*').from('accounts').whereRaw('users.account_id = accounts.id');
});
});
@@ -475,7 +475,7 @@ knex.from('users').innerJoin('accounts', 'users.id', 'accounts.user_id');
knex.table('users').innerJoin('accounts', 'users.id', '=', 'accounts.user_id');
knex('users').innerJoin('accounts', function () {
knex('users').innerJoin('accounts', function() {
this.on('accounts.id', '=', 'users.account_id').orOn('accounts.owner_id', '=', 'users.id');
});
@@ -485,7 +485,7 @@ knex('users').innerJoin('accounts', (join: Knex.JoinClause) => {
knex.select('*').from('users').leftJoin('accounts', 'users.id', 'accounts.user_id');
knex.select('*').from('users').leftJoin('accounts', function () {
knex.select('*').from('users').leftJoin('accounts', function() {
this.on('accounts.id', '=', 'users.account_id').orOn('accounts.owner_id', '=', 'users.id');
});
@@ -502,13 +502,13 @@ knex.select('*').from('users').leftJoin('accounts', (join) => {
knex.select('*').from('users').leftOuterJoin('accounts', 'users.id', 'accounts.user_id');
knex.select('*').from('users').leftOuterJoin('accounts', function () {
knex.select('*').from('users').leftOuterJoin('accounts', function() {
this.on('accounts.id', '=', 'users.account_id').orOn('accounts.owner_id', '=', 'users.id');
});
knex.select('*').from('users').rightJoin('accounts', 'users.id', 'accounts.user_id');
knex.select('*').from('users').rightJoin('accounts', function () {
knex.select('*').from('users').rightJoin('accounts', function() {
this.on('accounts.id', '=', 'users.account_id').orOn('accounts.owner_id', '=', 'users.id');
});
@@ -518,13 +518,13 @@ knex.select('*').from('users').rightJoin('accounts', (join: Knex.JoinClause) =>
knex.select('*').from('users').rightOuterJoin('accounts', 'users.id', 'accounts.user_id');
knex.select('*').from('users').rightOuterJoin('accounts', function () {
knex.select('*').from('users').rightOuterJoin('accounts', function() {
this.on('accounts.id', '=', 'users.account_id').orOn('accounts.owner_id', '=', 'users.id');
});
knex.select('*').from('users').outerJoin('accounts', 'users.id', 'accounts.user_id');
knex.select('*').from('users').outerJoin('accounts', function () {
knex.select('*').from('users').outerJoin('accounts', function() {
this.on('accounts.id', '=', 'users.account_id').orOn('accounts.owner_id', '=', 'users.id');
});
@@ -534,7 +534,7 @@ knex.select('*').from('users').outerJoin('accounts', (join: Knex.JoinClause) =>
knex.select('*').from('users').fullOuterJoin('accounts', 'users.id', 'accounts.user_id');
knex.select('*').from('users').fullOuterJoin('accounts', function () {
knex.select('*').from('users').fullOuterJoin('accounts', function() {
this.on('accounts.id', '=', 'users.account_id').orOn('accounts.owner_id', '=', 'users.id');
});
@@ -549,39 +549,39 @@ knex.select('*').from('accounts').joinRaw('natural full join table1').where('id'
knex.select('*').from('accounts').join(knex.raw('natural full join table1')).where('id', 1);
knex.select('*').from('accounts')
.join(function () {
.join(function() {
this.select('*').from('accounts').as('special_accounts');
}, 'special_accounts.a', '=', 'accounts.b');
knex.select('*').from('accounts')
.leftJoin(function () {
.leftJoin(function() {
this.select('*').from('accounts').as('special_accounts');
}, 'special_accounts.a', '=', 'accounts.b');
knex.select('*').from('accounts')
.leftOuterJoin(function () {
.leftOuterJoin(function() {
this.select('*').from('accounts').as('special_accounts');
}, 'special_accounts.a', '=', 'accounts.b');
knex.select('*').from('accounts')
.rightJoin(function () {
.rightJoin(function() {
this.select('*').from('accounts').as('special_accounts');
}, 'special_accounts.a', '=', 'accounts.b');
knex.select('*').from('accounts')
.rightOuterJoin(function () {
.rightOuterJoin(function() {
this.select('*').from('accounts').as('special_accounts');
}, 'special_accounts.a', '=', 'accounts.b');
knex.select('*').from('accounts')
.innerJoin(function () {
.innerJoin(function() {
this.select('*').from('accounts').as('special_accounts');
}, 'special_accounts.a', '=', 'accounts.b');
knex.select('*').from('accounts')
.crossJoin(function () {
.crossJoin(function() {
this.select('*').from('accounts').as('special_accounts');
}, 'special_accounts.a', '=', 'accounts.b');
knex.select('*').from('accounts')
.fullOuterJoin(function () {
.fullOuterJoin(function() {
this.select('*').from('accounts').as('special_accounts');
}, 'special_accounts.a', '=', 'accounts.b');
knex.select('*').from('accounts')
.outerJoin(function () {
.outerJoin(function() {
this.select('*').from('accounts').as('special_accounts');
}, 'special_accounts.a', '=', 'accounts.b');
@@ -1044,66 +1044,66 @@ knex.select('*').from('users').where(knex.raw('id = ?', [1])).toSQL();
//
knex('users')
.select('*')
.join('contacts', function (builder) {
this.on(function (builder: any) {
.join('contacts', function(builder) {
this.on(function(builder: any) {
let self: Knex.JoinClause = this;
self = builder;
}).andOn(function (builder: any) {
}).andOn(function(builder: any) {
let self: Knex.JoinClause = this;
self = builder;
}).orOn(function (builder: any) {
}).orOn(function(builder: any) {
let self: Knex.JoinClause = this;
self = builder;
}).onExists(function (builder: any) {
}).onExists(function(builder: any) {
let self: Knex.QueryBuilder = this;
self = builder;
}).orOnExists(function (builder: any) {
}).orOnExists(function(builder: any) {
let self: Knex.QueryBuilder = this;
self = builder;
}).andOnExists(function (builder: any) {
}).andOnExists(function(builder: any) {
let self: Knex.QueryBuilder = this;
self = builder;
}).onNotExists(function (builder: any) {
}).onNotExists(function(builder: any) {
let self: Knex.QueryBuilder = this;
self = builder;
}).andOnNotExists(function (builder: any) {
}).andOnNotExists(function(builder: any) {
let self: Knex.QueryBuilder = this;
self = builder;
}).orOnNotExists(function (builder: any) {
}).orOnNotExists(function(builder: any) {
let self: Knex.QueryBuilder = this;
self = builder;
});
}).where(function (builder) {
}).where(function(builder) {
let self: Knex.QueryBuilder = this;
self = builder;
}).orWhere(function (builder) {
}).orWhere(function(builder) {
let self: Knex.QueryBuilder = this;
self = builder;
}).andWhere(function (builder) {
}).andWhere(function(builder) {
let self: Knex.QueryBuilder = this;
self = builder;
}).whereIn('column', function (builder) {
}).whereIn('column', function(builder) {
let self: Knex.QueryBuilder = this;
self = builder;
}).orWhereIn('column', function (builder) {
}).orWhereIn('column', function(builder) {
let self: Knex.QueryBuilder = this;
self = builder;
}).whereNotIn('column', function (builder) {
}).whereNotIn('column', function(builder) {
let self: Knex.QueryBuilder = this;
self = builder;
}).orWhereNotIn('column', function (builder) {
}).orWhereNotIn('column', function(builder) {
let self: Knex.QueryBuilder = this;
self = builder;
}).whereWrapped(function (builder) {
}).whereWrapped(function(builder) {
let self: Knex.QueryBuilder = this;
self = builder;
}).union(function (builder) {
}).union(function(builder) {
let self: Knex.QueryBuilder = this;
self = builder;
}).unionAll(function (builder) {
}).unionAll(function(builder) {
let self: Knex.QueryBuilder = this;
self = builder;
}).modify(function (builder, aBool) {
}).modify(function(builder, aBool) {
let self: Knex.QueryBuilder = this;
self = builder;
}, true);
@@ -1197,12 +1197,12 @@ knex('characters')
knex('characters')
.select()
.whereIn('name', function () {
.whereIn('name', function() {
this.select('name').from('characters');
});
knex('characters')
.select()
.whereIn(['name', 'class'], function () {
.whereIn(['name', 'class'], function() {
this.select('name', 'class').from('characters');
});
+2 -2
View File
@@ -3,13 +3,13 @@ import mount = require("koa-mount");
const a = new Koa();
a.use(function (next) {
a.use(function(next) {
this.body = "Hello";
});
const b = new Koa();
b.use(function (next) {
b.use(function(next) {
this.body = "World";
});
+2 -2
View File
@@ -2180,7 +2180,7 @@ class Rectangle {
this.colors = Array.prototype.slice.call(arguments, 1);
}
Circle.prototype.area = function () { Math.PI * Math.pow(this.r, 2) };
Circle.prototype.area = function() { return Math.PI * Math.pow(this.r, 2); };
const circleN = R.constructN(2, Circle);
let c1 = circleN(1, "red");
@@ -2623,7 +2623,7 @@ class Rectangle {
const Why: any = ((val: boolean) => {
const why = {} as any;
why.val = val;
why.and = function (x: boolean) { this.val && x };
why.and = function(x: boolean) { return this.val && x; };
return Why;
})(true);
const why = new Why(true);
+1 -1
View File
@@ -10,7 +10,7 @@ Rivets.configure({
// Template delimiters for text bindings
templateDelimiters: ['[[', ']]'],
// Augment the event handler of the on-* binder
handler: function (target: any, event: any, binding: any) {
handler(target: any, event: any, binding: any) {
this.call(target, event, binding.view.models);
}
});
+1 -1
View File
@@ -1,6 +1,6 @@
import stampit = require('stampit');
const a = stampit().init(function (options) {
const a = stampit().init(function(options) {
const a = options.args[0];
this.getA = () => {
return a;
+1 -1
View File
@@ -502,7 +502,7 @@ describe('dest stream', () => {
const stream1 = vfs.dest('./out-fixtures/', { cwd: __dirname });
const stream2 = vfs.dest('./out-fixtures/', { cwd: __dirname });
const content = fs.readFileSync(srcPath);
const rename = through.obj(function (file: any, _: any, next: any) {
const rename = through.obj(function(file: any, _: any, next: any) {
file.path = inputPath2;
this.push(file);
next();
+1 -1
View File
@@ -502,7 +502,7 @@ describe('dest stream', () => {
const stream1 = vfs.dest('./out-fixtures/', { cwd: __dirname });
const stream2 = vfs.dest('./out-fixtures/', { cwd: __dirname });
const content = fs.readFileSync(srcPath);
const rename = through.obj(function (file: any, _: any, next: any) {
const rename = through.obj(function(file: any, _: any, next: any) {
file.path = inputPath2;
this.push(file);
next();
+1 -1
View File
@@ -1,4 +1,4 @@
const onFulfilled = function (item: WebMidi.MIDIAccess) {
const onFulfilled = function(item: WebMidi.MIDIAccess) {
this._midiPort = item;
item.onstatechange = (event: WebMidi.MIDIConnectionEvent) => {