Skip to content

Commit 1a3fcd3

Browse files
🤖 chore: Lint source files.
These changes were automatically generated by a transform whose code can be found at: - https://github.com/aureooms/rejuvenate/blob/b6b4f0332a3361f6005cf1c244b958f3cbcd1d1b/src/transforms/sources:initial-lint.js Please contact the author of the transform if you believe there was an error.
1 parent bab8e46 commit 1a3fcd3

File tree

9 files changed

+188
-89
lines changed

9 files changed

+188
-89
lines changed

src/_deque.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
import {TypeError, ValueError} from '@aureooms/js-error';
22

3-
export default function _deque(UnboundedDeque, BoundedDeque, SingleElementDeque, EmptyDeque) {
3+
export default function _deque(
4+
UnboundedDeque,
5+
BoundedDeque,
6+
SingleElementDeque,
7+
EmptyDeque,
8+
) {
49
const deque = function (iterable = null, maxlen = null) {
510
if (maxlen === null) {
611
return new UnboundedDeque(iterable);

src/deque.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,16 @@ import {
22
UnboundedDeque,
33
BoundedDeque,
44
SingleElementDeque,
5-
EmptyDeque
5+
EmptyDeque,
66
} from './implementation/index.js';
77

88
import _deque from './_deque.js';
99

10-
const deque = _deque(UnboundedDeque, BoundedDeque, SingleElementDeque, EmptyDeque);
10+
const deque = _deque(
11+
UnboundedDeque,
12+
BoundedDeque,
13+
SingleElementDeque,
14+
EmptyDeque,
15+
);
1116

1217
export default deque;

src/implementation/ArbitrarySizeDeque.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ export default function ArbitrarySizeDeque() {}
44

55
ArbitrarySizeDeque.prototype = new Deque();
66

7-
ArbitrarySizeDeque.prototype.values = function * () {
7+
ArbitrarySizeDeque.prototype.values = function* () {
88
let i = this.center;
9-
const _m = (i + this.length);
9+
const _m = i + this.length;
1010
const m = Math.min(this.capacity(), _m);
1111

1212
for (; i < m; ++i) {

src/implementation/Deque.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ Deque.prototype.set = function (i, value) {
9090
return this;
9191
};
9292

93-
Deque.prototype._range = function * (start, stop) {
93+
Deque.prototype._range = function* (start, stop) {
9494
for (let i = start; i < stop; ++i) {
9595
yield [i, this.get(i)];
9696
}

src/implementation/EmptyDeque.js

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,11 @@ EmptyDeque.prototype.capacity = function () {
1818
};
1919

2020
EmptyDeque.prototype.values = function () {
21-
return {next() {
22-
return {done: true};
23-
}};
21+
return {
22+
next() {
23+
return {done: true};
24+
},
25+
};
2426
};
2527

2628
EmptyDeque.prototype.append = function (_x) {
@@ -44,7 +46,7 @@ EmptyDeque.prototype._where = function (i) {
4446
};
4547

4648
EmptyDeque.prototype.pop =
47-
// eslint-disable-next-line no-multi-assign
48-
EmptyDeque.prototype.popleft = function () {
49-
throw new IndexError('pop / popleft');
50-
};
49+
// eslint-disable-next-line no-multi-assign
50+
EmptyDeque.prototype.popleft = function () {
51+
throw new IndexError('pop / popleft');
52+
};

src/implementation/SingleElementDeque.js

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ SingleElementDeque.prototype.capacity = function () {
2121
return 1;
2222
};
2323

24-
SingleElementDeque.prototype.values = function * () {
24+
SingleElementDeque.prototype.values = function* () {
2525
if (this.empty) {
2626
return;
2727
}
@@ -30,13 +30,13 @@ SingleElementDeque.prototype.values = function * () {
3030
};
3131

3232
SingleElementDeque.prototype.append =
33-
// eslint-disable-next-line no-multi-assign
34-
SingleElementDeque.prototype.appendleft = function (x) {
35-
this.empty = false;
36-
this.value = x;
33+
// eslint-disable-next-line no-multi-assign
34+
SingleElementDeque.prototype.appendleft = function (x) {
35+
this.empty = false;
36+
this.value = x;
3737

38-
return this;
39-
};
38+
return this;
39+
};
4040

4141
SingleElementDeque.prototype.clear = function () {
4242
this.empty = true;
@@ -50,19 +50,19 @@ SingleElementDeque.prototype.copy = function () {
5050
};
5151

5252
SingleElementDeque.prototype.pop =
53-
// eslint-disable-next-line no-multi-assign
54-
SingleElementDeque.prototype.popleft = function () {
55-
if (this.empty) {
56-
throw new IndexError('pop / popleft');
57-
}
53+
// eslint-disable-next-line no-multi-assign
54+
SingleElementDeque.prototype.popleft = function () {
55+
if (this.empty) {
56+
throw new IndexError('pop / popleft');
57+
}
5858

59-
const value = this.value;
59+
const value = this.value;
6060

61-
this.empty = true;
62-
this.value = 0;
61+
this.empty = true;
62+
this.value = 0;
6363

64-
return value;
65-
};
64+
return value;
65+
};
6666

6767
SingleElementDeque.prototype.get = function (i) {
6868
if (this.empty || i !== 0) {

src/implementation/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ export {
1111
Deque,
1212
EmptyDeque,
1313
SingleElementDeque,
14-
UnboundedDeque
14+
UnboundedDeque,
1515
};

src/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {
66
UnboundedDeque,
77
BoundedDeque,
88
SingleElementDeque,
9-
EmptyDeque
9+
EmptyDeque,
1010
} from './implementation/index.js';
1111

1212
export default deque;
@@ -19,5 +19,5 @@ export {
1919
UnboundedDeque,
2020
BoundedDeque,
2121
SingleElementDeque,
22-
EmptyDeque
22+
EmptyDeque,
2323
};

0 commit comments

Comments
 (0)