chore: re-add eslint-plugin-import-x

This commit is contained in:
Simon Chan 2024-05-20 15:57:17 +08:00
parent 493683b80c
commit fdf0a863d9
No known key found for this signature in database
GPG key ID: A8B69F750B9BCEDD
35 changed files with 668 additions and 619 deletions

View file

@ -39,12 +39,12 @@
"@yume-chan/struct": "workspace:^0.0.23"
},
"devDependencies": {
"@jest/globals": "^30.0.0-alpha.3",
"@types/node": "^20.12.8",
"@jest/globals": "^30.0.0-alpha.4",
"@types/node": "^20.12.12",
"@yume-chan/eslint-config": "workspace:^1.0.0",
"@yume-chan/tsconfig": "workspace:^1.0.0",
"cross-env": "^7.0.3",
"jest": "^30.0.0-alpha.3",
"jest": "^30.0.0-alpha.4",
"prettier": "^3.2.5",
"ts-jest": "^29.1.2",
"typescript": "^5.4.5"

View file

@ -40,11 +40,13 @@ export class AdbPower extends AdbCommandBase {
}
powerButton(longPress = false) {
return this.adb.subprocess.spawnAndWaitLegacy([
"input",
"keyevent",
longPress ? "--longpress POWER" : "POWER",
]);
const args = ["input", "keyevent"];
if (longPress) {
args.push("--longpress");
}
args.push("POWER");
return this.adb.subprocess.spawnAndWaitLegacy(args);
}
/**

View file

@ -1,12 +1,14 @@
import { PromiseResolver } from "@yume-chan/async";
import type {
PushReadableStreamController,
ReadableStream,
WritableStreamDefaultWriter,
} from "@yume-chan/stream-extra";
import {
MaybeConsumable,
PushReadableStream,
StructDeserializeStream,
WritableStream,
type PushReadableStreamController,
type ReadableStream,
type WritableStreamDefaultWriter,
} from "@yume-chan/stream-extra";
import type { StructValueType } from "@yume-chan/struct";
import Struct, { placeholder } from "@yume-chan/struct";

View file

@ -1,8 +1,8 @@
import type { ReadableStream } from "@yume-chan/stream-extra";
import {
AbortController,
DistributionStream,
MaybeConsumable,
type ReadableStream,
} from "@yume-chan/stream-extra";
import Struct, { placeholder } from "@yume-chan/struct";

View file

@ -2,6 +2,7 @@ import { describe, expect, it } from "@jest/globals";
import { EMPTY_UINT8_ARRAY, encodeUtf8 } from "@yume-chan/struct";
import { decodeBase64 } from "../utils/base64.js";
import type { AdbCredentialStore } from "./auth.js";
import { AdbAuthType, AdbPublicKeyAuthenticator } from "./auth.js";
import type { AdbPacketData } from "./packet.js";

View file

@ -1,5 +1,7 @@
import { describe, expect, it } from "@jest/globals";
import { decodeBase64 } from "../utils/base64.js";
import { adbGeneratePublicKey, modInverse } from "./crypto.js";
describe("modInverse", () => {

View file

@ -7,12 +7,14 @@ import {
getUint32LittleEndian,
setUint32LittleEndian,
} from "@yume-chan/no-data-view";
import type {
ReadableWritablePair,
WritableStreamDefaultWriter,
} from "@yume-chan/stream-extra";
import {
AbortController,
Consumable,
WritableStream,
type ReadableWritablePair,
type WritableStreamDefaultWriter,
} from "@yume-chan/stream-extra";
import { EMPTY_UINT8_ARRAY } from "@yume-chan/struct";

View file

@ -1,14 +1,13 @@
import { PromiseResolver } from "@yume-chan/async";
import type { Disposable } from "@yume-chan/event";
import {
MaybeConsumable,
PushReadableStream,
type AbortSignal,
type PushReadableStreamController,
type ReadableStream,
type WritableStream,
type WritableStreamDefaultController,
import type {
AbortSignal,
PushReadableStreamController,
ReadableStream,
WritableStream,
WritableStreamDefaultController,
} from "@yume-chan/stream-extra";
import { MaybeConsumable, PushReadableStream } from "@yume-chan/stream-extra";
import { EMPTY_UINT8_ARRAY } from "@yume-chan/struct";
import type { AdbSocket } from "../adb.js";

View file

@ -1,9 +1,9 @@
import { PromiseResolver } from "@yume-chan/async";
import type { ReadableWritablePair } from "@yume-chan/stream-extra";
import {
AbortController,
Consumable,
WritableStream,
type ReadableWritablePair,
} from "@yume-chan/stream-extra";
import type { ValueOrPromise } from "@yume-chan/struct";
import { decodeUtf8, encodeUtf8 } from "@yume-chan/struct";