Skip to content

Commit 49eaeb9

Browse files
🤖 config(xo): Configure import/order.
These changes were automatically generated by a transform whose code can be found at: - https://github.com/make-github-pseudonymous-again/rejuvenate/blob/31b7e48f29789fa2e2ad9e16013ff277c3bbca57/src/transforms/xo:config-import-order.js Please contact the author of the transform if you believe there was an error.
1 parent 56d51ac commit 49eaeb9

File tree

7 files changed

+1052
-554
lines changed

7 files changed

+1052
-554
lines changed

package.json

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@
103103
"pinst": "3.0.0",
104104
"power-assert": "1.6.1",
105105
"regenerator-runtime": "0.14.1",
106-
"xo": "0.53.1"
106+
"xo": "0.57.0"
107107
},
108108
"ava": {
109109
"files": [
@@ -219,7 +219,43 @@
219219
"unicorn/prefer-math-trunc": "off",
220220
"unicorn/no-new-array": "off",
221221
"no-negated-condition": "off",
222-
"unicorn/prefer-node-protocol": "off"
222+
"unicorn/prefer-node-protocol": "off",
223+
"import/order": [
224+
"error",
225+
{
226+
"groups": [
227+
"builtin",
228+
"external",
229+
"internal",
230+
"parent",
231+
"sibling",
232+
"index",
233+
"object",
234+
"type"
235+
],
236+
"pathGroups": [
237+
{
238+
"pattern": "ava",
239+
"group": "external",
240+
"position": "before"
241+
},
242+
{
243+
"pattern": "#module",
244+
"group": "index",
245+
"position": "after"
246+
}
247+
],
248+
"pathGroupsExcludedImportTypes": [],
249+
"distinctGroup": true,
250+
"newlines-between": "always",
251+
"alphabetize": {
252+
"order": "asc",
253+
"orderImportKind": "asc",
254+
"caseInsensitive": false
255+
},
256+
"warnOnUnassignedImports": true
257+
}
258+
]
223259
},
224260
"overrides": [
225261
{

src/maxback/_contract.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import {head} from '@iterable-iterator/slice';
99
* @returns {Map}
1010
*/
1111
export default function _contract(G, ordering) {
12-
const u = ordering[ordering.length - 2];
13-
const v = ordering[ordering.length - 1];
12+
const u = ordering.at(-2);
13+
const v = ordering.at(-1);
1414

1515
const H = new Map();
1616

src/maxback/_order.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
import {PairingHeap as Heap} from '@heap-data-structure/pairing-heap';
12
import {prop} from '@total-order/key';
23
import {decreasing} from '@total-order/primitive';
3-
import {PairingHeap as Heap} from '@heap-data-structure/pairing-heap';
44

55
/**
66
* Lists the vertices of an undirected unweighted connected loopless multigraph
@@ -15,7 +15,6 @@ export default function* _order(G) {
1515

1616
for (const v of G.keys()) refs.set(v, heap.push({weight: 0, vertex: v}));
1717

18-
// eslint-disable-next-line no-unused-vars
1918
for (const _ of G) {
2019
const max = heap.pop();
2120
const u = max.vertex;

src/maxback/_smallcuts.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import {list} from '@iterable-iterator/list';
22
import {map} from '@iterable-iterator/map';
33

4-
import _order from './_order.js';
54
import _contract from './_contract.js';
5+
import _order from './_order.js';
66

77
/**
88
* Yields the small cuts of undirected unweighted connected loopless multigraph G.
@@ -18,8 +18,8 @@ export default function* _smallcuts(G) {
1818

1919
while (H.size >= 2) {
2020
const ordering = list(_order(H)); // Compute the max-back order
21-
const [x] = ordering[ordering.length - 2];
22-
const [y, cutsize] = ordering[ordering.length - 1];
21+
const [x] = ordering.at(-2);
22+
const [y, cutsize] = ordering.at(-1);
2323

2424
yield [new Set(id.get(y)), cutsize]; // Yield a small cut with its size
2525

src/maxback/maxback.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import adj from '../adj.js';
22
import outgoingedges from '../outgoingedges.js';
3+
34
import mb from './mb.js';
45

56
/**

test/src/mincut.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
import test from 'ava';
2+
23
import {map} from '@iterable-iterator/map';
34
import {sorted} from '@iterable-iterator/sorted';
4-
import {increasing} from '@total-order/primitive';
55
import {fixedlexicographical} from '@total-order/lex';
6+
import {increasing} from '@total-order/primitive';
7+
68
import {mincut} from '#module';
79

810
function order(edge) {

0 commit comments

Comments
 (0)