Skip to content

Commit 8e0ae1c

Browse files
⬆️ deps: Upgrade xo to 0.40.1.
Needed some refactoring and rule ignores to make linting pass.
1 parent 1e2b573 commit 8e0ae1c

File tree

22 files changed

+642
-1631
lines changed

22 files changed

+642
-1631
lines changed

_benchmark/array.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
let t;
22
let i;
3-
const length = 100000;
3+
const length = 100_000;
44

55
console.log('number of operations:', length);
66

_benchmark/benchmark.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ const itertools = require('@aureooms/js-itertools');
44

55
const qiao_fingertree = require('fingertree');
66
const fromArray = qiao_fingertree.fromArray;
7-
const aureooms_fingertree = require('..');
87
const empty = aureooms_fingertree.empty;
98
const from = aureooms_fingertree.from;
109

@@ -33,6 +32,7 @@ global.from = from;
3332
global.range = itertools.range;
3433

3534
const Benchmark = require('benchmark');
35+
const aureooms_fingertree = require('..');
3636

3737
// PUSH
3838

@@ -77,7 +77,7 @@ const CONS = new Benchmark.Suite().on('start', () => {
7777
console.log('\nCONS\n==\n');
7878
});
7979

80-
if (M <= 10000)
80+
if (M <= 10_000)
8181
CONS.add('Array#unshift', () => {
8282
const a = [];
8383
const _M = M;
@@ -177,7 +177,7 @@ const TAIL = new Benchmark.Suite().on('start', () => {
177177
console.log('\nTAIL\n==\n');
178178
});
179179

180-
if (M <= 10000)
180+
if (M <= 10_000)
181181
TAIL.add(
182182
'Array#shift',
183183
() => {

_benchmark/placebo.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
let t;
22
let i;
3-
const length = 100000;
3+
const length = 100_000;
44

55
console.log('number of operations:', length);
66

_benchmark/tree.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const COUNTER = {
1818

1919
let t;
2020
let i;
21-
const length = 100000;
21+
const length = 100_000;
2222

2323
let start = Date.now();
2424

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
"pinst": "2.1.6",
9595
"power-assert": "1.6.1",
9696
"regenerator-runtime": "0.13.7",
97-
"xo": "0.38.2"
97+
"xo": "0.40.1"
9898
},
9999
"ava": {
100100
"files": [
@@ -208,7 +208,9 @@
208208
"camelcase": "off",
209209
"unicorn/filename-case": "off",
210210
"unicorn/explicit-length-check": "off",
211-
"unicorn/no-array-push-push": "off"
211+
"unicorn/no-array-push-push": "off",
212+
"unicorn/prefer-node-protocol": "off",
213+
"unicorn/prefer-module": "off"
212214
},
213215
"overrides": [
214216
{

src/0-core/_fast/_digit.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
import {One, Two, Three} from '../../1-digit/index.js';
2-
31
import assert from 'assert';
2+
import {One, Two, Three} from '../../1-digit/index.js';
43

54
/**
65
* Creates a Digit from as small list.

src/0-core/_fast/_from_digit.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1+
import assert from 'assert';
12
import {One, Two, Three, Four} from '../../1-digit/index.js';
23
import {Empty, Single, Deep} from '../../3-tree/index.js';
34
import {cache} from '../measure/index.js';
45

5-
import assert from 'assert';
6-
76
export function _from_digit(M, digit) {
87
if (digit instanceof One) return new Single(M, digit.a);
98
assert(

src/0-core/_fast/_from_small_list.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1+
import assert from 'assert';
12
import {Empty, Single, Deep} from '../../3-tree/index.js';
23
import {One, Two} from '../../1-digit/index.js';
34
import {cache} from '../measure/index.js';
45

5-
import assert from 'assert';
6-
76
export function _from_small_list(M, list) {
87
assert(Number.isInteger(list.length) && list.length >= 0 && list.length <= 3);
98
switch (list.length) {

src/1-digit/1-One.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
import {Digit, Two, Three} from './index.js';
1+
import assert from 'assert';
22
import {node2, node3} from '../2-node/index.js';
33
import {Split} from '../0-core/index.js';
4-
5-
import assert from 'assert';
4+
import {Digit, Two, Three} from './index.js';
65

76
export function One(a) {
87
this.a = a;

src/1-digit/2-Two.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
import {Digit, One, Three} from './index.js';
1+
import assert from 'assert';
22
import {node2, node3} from '../2-node/index.js';
33
import {Split} from '../0-core/index.js';
4-
5-
import assert from 'assert';
4+
import {Digit, One, Three} from './index.js';
65

76
export function Two(a, b) {
87
this.a = a;

0 commit comments

Comments
 (0)