Skip to content

Commit 8de4201

Browse files
😒 chore: Lint all JavaScript files.
1 parent 2cbc3b6 commit 8de4201

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+222
-220
lines changed

_benchmark/benchmark.js

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const COUNTER = {
1717
},
1818
zero() {
1919
return 0;
20-
}
20+
},
2121
};
2222

2323
const ArgumentParser = require('argparse').ArgumentParser;
@@ -131,23 +131,23 @@ const INIT = new Benchmark.Suite()
131131
const _a = a.slice();
132132
for (let i = 0; i < _M; ++i) _a.pop();
133133
},
134-
{setup}
134+
{setup},
135135
)
136136
.add(
137137
'fingertree#removeLast',
138138
() => {
139139
let _t = qt;
140140
for (let i = 0; i < _M; ++i) _t = _t.removeLast();
141141
},
142-
{setup}
142+
{setup},
143143
)
144144
.add(
145145
'@aureooms/js-fingertree#init',
146146
() => {
147147
let _t = at;
148148
for (let i = 0; i < _M; ++i) _t = _t.init();
149149
},
150-
{setup}
150+
{setup},
151151
);
152152

153153
if (M <= 1000)
@@ -157,7 +157,7 @@ if (M <= 1000)
157157
let _m = a;
158158
for (let i = 0; i < _M; ++i) _m = _m.slice(0, -1);
159159
},
160-
{setup}
160+
{setup},
161161
);
162162

163163
INIT.on('cycle', (event) => {
@@ -184,7 +184,7 @@ if (M <= 10000)
184184
const _a = a.slice();
185185
for (let i = 0; i < _M; ++i) _a.shift();
186186
},
187-
{setup}
187+
{setup},
188188
);
189189

190190
TAIL.add(
@@ -193,14 +193,14 @@ TAIL.add(
193193
let _t = qt;
194194
for (let i = 0; i < _M; ++i) _t = _t.removeFirst();
195195
},
196-
{setup}
196+
{setup},
197197
).add(
198198
'@aureooms/js-fingertree#init',
199199
() => {
200200
let _t = at;
201201
for (let i = 0; i < _M; ++i) _t = _t.tail();
202202
},
203-
{setup}
203+
{setup},
204204
);
205205

206206
if (M <= 1000)
@@ -210,7 +210,7 @@ if (M <= 1000)
210210
let _m = a;
211211
for (let i = 0; i < _M; ++i) _m = _m.slice(1);
212212
},
213-
{setup}
213+
{setup},
214214
);
215215

216216
TAIL.on('cycle', (event) => {
@@ -235,7 +235,7 @@ const APPEND = new Benchmark.Suite()
235235
() => {
236236
at.append(range(M));
237237
},
238-
{setup}
238+
{setup},
239239
);
240240

241241
if (M <= 1000)
@@ -244,7 +244,7 @@ if (M <= 1000)
244244
() => {
245245
a.concat(Array.from(range(M)));
246246
},
247-
{setup}
247+
{setup},
248248
);
249249

250250
APPEND.on('cycle', (event) => {
@@ -266,7 +266,7 @@ const PREPEND = new Benchmark.Suite()
266266
() => {
267267
at.prepend(range(M));
268268
},
269-
{setup}
269+
{setup},
270270
);
271271

272272
if (M <= 1000)
@@ -275,7 +275,7 @@ if (M <= 1000)
275275
() => {
276276
Array.from(range(M)).concat(a);
277277
},
278-
{setup}
278+
{setup},
279279
);
280280

281281
PREPEND.on('cycle', (event) => {
@@ -325,7 +325,7 @@ const SPLIT = new Benchmark.Suite()
325325
return m > i;
326326
});
327327
},
328-
{setup}
328+
{setup},
329329
)
330330
.add(
331331
'@aureooms/js-fingertree#split',
@@ -337,7 +337,7 @@ const SPLIT = new Benchmark.Suite()
337337
return m > i;
338338
});
339339
},
340-
{setup}
340+
{setup},
341341
);
342342

343343
if (M < 1000)
@@ -351,7 +351,7 @@ if (M < 1000)
351351
_a.slice(i);
352352
}
353353
},
354-
{setup}
354+
{setup},
355355
);
356356

357357
SPLIT.on('cycle', (event) => {
@@ -385,14 +385,14 @@ new Benchmark.Suite()
385385
splits.push(
386386
t.split((m) => {
387387
return m > i;
388-
})
388+
}),
389389
);
390390
}
391391
},
392392
teardown() {
393393
splits.splice(0);
394-
}
395-
}
394+
},
395+
},
396396
)
397397
.add(
398398
'fingertree#concat',
@@ -409,14 +409,14 @@ new Benchmark.Suite()
409409
splits.push(
410410
t.split((m) => {
411411
return m > i;
412-
})
412+
}),
413413
);
414414
}
415415
},
416416
teardown() {
417417
splits.splice(0);
418-
}
419-
}
418+
},
419+
},
420420
)
421421
.on('cycle', (event) => {
422422
console.log(String(event.target));

_benchmark/tree.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const COUNTER = {
1313
},
1414
zero() {
1515
return 0;
16-
}
16+
},
1717
};
1818

1919
let t;
@@ -78,7 +78,7 @@ for (i = 0; i < length; ++i) {
7878
splits.push(
7979
t.split((m) => {
8080
return m > i;
81-
})
81+
}),
8282
);
8383
}
8484

_profile/append.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const COUNTER = {
1212
},
1313
zero() {
1414
return 0;
15-
}
15+
},
1616
};
1717

1818
const parser = new ArgumentParser();

_profile/concat.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const COUNTER = {
1212
},
1313
zero() {
1414
return 0;
15-
}
15+
},
1616
};
1717

1818
const parser = new ArgumentParser();
@@ -31,7 +31,7 @@ for (let j = 0; j < M; ++j)
3131
splits.push(
3232
t.split((m) => {
3333
return m > j;
34-
})
34+
}),
3535
);
3636
console.timeEnd('prepare');
3737

_profile/cons.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const COUNTER = {
1111
},
1212
zero() {
1313
return 0;
14-
}
14+
},
1515
};
1616

1717
const parser = new ArgumentParser();

_profile/init.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const COUNTER = {
1212
},
1313
zero() {
1414
return 0;
15-
}
15+
},
1616
};
1717

1818
const parser = new ArgumentParser();

_profile/prepend.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const COUNTER = {
1212
},
1313
zero() {
1414
return 0;
15-
}
15+
},
1616
};
1717

1818
const parser = new ArgumentParser();

_profile/push.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const COUNTER = {
1111
},
1212
zero() {
1313
return 0;
14-
}
14+
},
1515
};
1616

1717
const parser = new ArgumentParser();

_profile/split.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const COUNTER = {
1212
},
1313
zero() {
1414
return 0;
15-
}
15+
},
1616
};
1717

1818
const parser = new ArgumentParser();

_profile/tail.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const COUNTER = {
1212
},
1313
zero() {
1414
return 0;
15-
}
15+
},
1616
};
1717

1818
const parser = new ArgumentParser();

doc/scripts/header.js

Lines changed: 18 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,30 @@
1-
var domReady = function(callback) {
2-
var state = document.readyState ;
3-
if ( state === 'interactive' || state === 'complete' ) {
4-
callback() ;
5-
}
6-
else {
1+
const domReady = function (callback) {
2+
const state = document.readyState;
3+
if (state === 'interactive' || state === 'complete') {
4+
callback();
5+
} else {
76
document.addEventListener('DOMContentLoaded', callback);
87
}
9-
} ;
10-
8+
};
119

12-
domReady(function(){
13-
14-
var projectname = document.createElement('a');
10+
domReady(() => {
11+
const projectname = document.createElement('a');
1512
projectname.classList.add('project-name');
1613
projectname.text = 'aureooms/js-fingertree';
17-
projectname.href = './index.html' ;
14+
projectname.href = './index.html';
1815

19-
var header = document.getElementsByTagName('header')[0] ;
20-
header.insertBefore(projectname,header.firstChild);
16+
const header = document.querySelectorAll('header')[0];
17+
header.insertBefore(projectname, header.firstChild);
2118

22-
var testlink = document.querySelector('header > a[data-ice="testLink"]') ;
23-
testlink.href = 'https://coveralls.io/github/aureooms/js-fingertree' ;
24-
testlink.target = '_BLANK' ;
19+
const testlink = document.querySelector('header > a[data-ice="testLink"]');
20+
testlink.href = 'https://coveralls.io/github/aureooms/js-fingertree';
21+
testlink.target = '_BLANK';
2522

26-
var searchBox = document.querySelector('.search-box');
27-
var input = document.querySelector('.search-input');
23+
const searchBox = document.querySelector('.search-box');
24+
const input = document.querySelector('.search-input');
2825

29-
// active search box when focus on searchBox.
30-
input.addEventListener('focus', function(){
26+
// Active search box when focus on searchBox.
27+
input.addEventListener('focus', () => {
3128
searchBox.classList.add('active');
3229
});
33-
3430
});

package.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,12 @@
213213
"rules": {
214214
"import/no-unassigned-import": "off"
215215
}
216+
},
217+
{
218+
"files": [
219+
"doc/**"
220+
],
221+
"env": "browser"
216222
}
217223
]
218224
}

src/0-core/_fast/_app3.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import {Empty, Single, Deep} from "../../3-tree/index.js";
2-
import {delay} from "../../4-lazy/index.js";
3-
import {app3} from "../concatenate/index.js";
1+
import {Empty, Single, Deep} from '../../3-tree/index.js';
2+
import {delay} from '../../4-lazy/index.js';
3+
import {app3} from '../concatenate/index.js';
44

55
export function _app3(A, B) {
66
B = B.force();
@@ -13,6 +13,6 @@ export function _app3(A, B) {
1313
A.M,
1414
A.left,
1515
delay(() => app3(A.middle, A.right._nodes(A.M, B.left), B.middle)),
16-
B.right
16+
B.right,
1717
);
1818
}

src/0-core/_fast/_deepL.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import {delay} from "../../4-lazy/index.js";
2-
import {deepL} from "../split/index.js";
1+
import {delay} from '../../4-lazy/index.js';
2+
import {deepL} from '../split/index.js';
33

44
export function _deepL(M, left, middle, right) {
55
return delay(() => deepL(M, left, middle, right));

src/0-core/_fast/_deepR.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import {delay} from "../../4-lazy/index.js";
2-
import {deepR} from "../split/index.js";
1+
import {delay} from '../../4-lazy/index.js';
2+
import {deepR} from '../split/index.js';
33

44
export function _deepR(M, left, middle, right) {
55
return delay(() => deepR(M, left, middle, right));

src/0-core/_fast/_digit.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {One, Two, Three} from "../../1-digit/index.js";
1+
import {One, Two, Three} from '../../1-digit/index.js';
22

33
import assert from 'assert';
44

0 commit comments

Comments
 (0)