Skip to content

Commit

Permalink
🤖 config(xo): Configure import/order.
Browse files Browse the repository at this point in the history
These changes were automatically generated by a transform whose code can be found at:
  - https://github.com/make-github-pseudonymous-again/rejuvenate/blob/b27ce6d333a4c46ff5161eaddfbe16895bbabf0f/src/transforms/xo:config-import-order.js
Please contact the author of the transform if you believe there was an error.
  • Loading branch information
a-flying-potato authored and make-github-pseudonymous-again committed Mar 3, 2024
1 parent d77520e commit 8344634
Show file tree
Hide file tree
Showing 7 changed files with 1,100 additions and 478 deletions.
40 changes: 38 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
"pinst": "3.0.0",
"power-assert": "1.6.1",
"regenerator-runtime": "0.14.0",
"xo": "0.53.1"
"xo": "0.57.0"
},
"ava": {
"files": [
Expand Down Expand Up @@ -219,7 +219,43 @@
"unicorn/prefer-node-protocol": "off",
"unicorn/prefer-math-trunc": "off",
"unicorn/no-new-array": "off",
"no-negated-condition": "off"
"no-negated-condition": "off",
"import/order": [
"error",
{
"groups": [
"builtin",
"external",
"internal",
"parent",
"sibling",
"index",
"object",
"type"
],
"pathGroups": [
{
"pattern": "ava",
"group": "external",
"position": "before"
},
{
"pattern": "#module",
"group": "index",
"position": "after"
}
],
"pathGroupsExcludedImportTypes": [],
"distinctGroup": true,
"newlines-between": "always",
"alphabetize": {
"order": "asc",
"orderImportKind": "asc",
"caseInsensitive": false
},
"warnOnUnassignedImports": true
}
]
},
"overrides": [
{
Expand Down
2 changes: 1 addition & 1 deletion src/_decode.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import byte2pair from './byte2pair.js';
import Base16DecodeError from './Base16DecodeError.js';
import byte2pair from './byte2pair.js';

export default function* _decode(bytes, _options = null) {
let start = 0;
Expand Down
6 changes: 3 additions & 3 deletions src/_encode.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import {next, StopIteration} from '@iterable-iterator/next';
import {iter} from '@iterable-iterator/iter';
import {next, StopIteration} from '@iterable-iterator/next';

import pair2byte from './pair2byte.js';
import Base16EncodeError from './Base16EncodeError.js';
import pair2byte from './pair2byte.js';

export default function* _encode(string, _options = null) {
let start = 0;
Expand Down Expand Up @@ -32,7 +32,7 @@ export default function* _encode(string, _options = null) {

const pair = first + second;

if (!Object.prototype.hasOwnProperty.call(pair2byte, pair)) {
if (!Object.hasOwn(pair2byte, pair)) {
const reason = `cannot find pair ${pair}`;
const position = {start, end: start + 2};
throw new Base16EncodeError(reason, string, position);
Expand Down
2 changes: 1 addition & 1 deletion test/loader/config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as importMapLoader from '@node-loader/import-maps';
import * as babelLoader from '@node-loader/babel';
import * as importMapLoader from '@node-loader/import-maps';

const config = {
loaders: [importMapLoader, babelLoader],
Expand Down
2 changes: 2 additions & 0 deletions test/src/decode.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import test from 'ava';

import {range} from '@iterable-iterator/range';

import {CodecError} from './_fixtures.js';

import {decode, Base16DecodeError, byte2pair} from '#module';

function success(t, bytes, options, expected) {
Expand Down
2 changes: 2 additions & 0 deletions test/src/encode.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import test from 'ava';

import {range} from '@iterable-iterator/range';

import {CodecError} from './_fixtures.js';

import {encode, Base16EncodeError, byte2pair} from '#module';

function success(t, string, options, expected) {
Expand Down
Loading

0 comments on commit 8344634

Please sign in to comment.