Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions eslint.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@

const js = require('@eslint/js');
const tseslint = require('typescript-eslint');
// This plugin ships as ESM with a `default` export under CJS interop.
const unicornPlugin =
require('eslint-plugin-unicorn').default ?? require('eslint-plugin-unicorn');

module.exports = tseslint.config(
{
Expand All @@ -21,16 +18,6 @@ module.exports = tseslint.config(
js.configs.recommended,
...tseslint.configs.recommended,
{
// `unicorn` is only registered so legacy
// `// eslint-disable-next-line unicorn/...` comments scattered through
// the source resolve. We don't enable any rules from it.
// `eslint-plugin-import` used to be registered here for the same reason,
// but it was dropped: it dragged in minimatch@3 -> brace-expansion@1.x,
// which has an unpatched DoS advisory (GHSA-mh99-v99m-4gvg, no 1.x
// backport) and failed `pnpm audit`. No rules from it were ever enabled.
plugins: {
unicorn: unicornPlugin,
},
languageOptions: {
ecmaVersion: 2022,
sourceType: 'module',
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
"chai": "^6.2.2",
"eslint": "^10.15.0",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-unicorn": "^80.0.0",
"husky": "^9.1.7",
"mocha": "^12.0.0",
"prettier": "^3.8.4",
Expand Down
238 changes: 0 additions & 238 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

3 changes: 0 additions & 3 deletions src/commands/cloud.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable complexity */
import { defineCommand } from 'citty';
import { existsSync } from 'node:fs';
import * as path from 'node:path';
Expand Down Expand Up @@ -80,7 +79,6 @@ process.on('warning', (warning) => {
) {
return;
}
// eslint-disable-next-line no-console
console.warn(warning.stack ?? `${warning.name}: ${warning.message}`);
});

Expand Down Expand Up @@ -122,7 +120,6 @@ export const cloudCommand = defineCommand({
description: 'The flow file to run against the app, e.g. test.yaml',
},
},
// eslint-disable-next-line complexity
async run({ args, rawArgs }) {
const cliVersion = getCliVersion();
const deviceValidationService = new DeviceValidationService();
Expand Down
1 change: 0 additions & 1 deletion src/commands/status.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ export const statusCommand = defineCommand({
description: 'UUID of the upload to check status for',
},
},
// eslint-disable-next-line complexity
async run({ args }) {
const apiKeyFlag = args['api-key'] as string | undefined;
const apiUrl = resolveApiUrl(args['api-url'] as string | undefined);
Expand Down
1 change: 0 additions & 1 deletion src/methods.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ export const compressFilesFromRelativePath = async (
};

export const verifyAppZip = async (zipPath: string) => {
// eslint-disable-next-line new-cap
const zip = await new StreamZip.async({
file: zipPath,
storeEntries: true,
Expand Down
2 changes: 0 additions & 2 deletions src/services/execution-plan.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,6 @@ export async function plan(options: PlanOptions): Promise<IExecutionPlan> {
throw error;
}

// eslint-disable-next-line unicorn/no-array-reduce
const configPerFlowFile = unfilteredFlowFiles.reduce(
(acc, filePath) => {
const { config } = readTestYamlFileAsJson(filePath);
Expand Down Expand Up @@ -645,7 +644,6 @@ export async function plan(options: PlanOptions): Promise<IExecutionPlan> {
allFlows.map((filePath) => checkDependencies(filePath)),
).then((results) => [...new Set(results.flat())]);

// eslint-disable-next-line unicorn/no-array-reduce
const pathsByName = allFlows.reduce((acc, filePath) => {
const config = configPerFlowFile[filePath];
const name = (config?.name as string) || path.parse(filePath).name;
Expand Down
1 change: 0 additions & 1 deletion src/services/moropo.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ export class MoropoService {
}

private async extractZipFile(zipPath: string, extractPath: string): Promise<void> {
// eslint-disable-next-line new-cap
const zip = new StreamZip.async({ file: zipPath });
await zip.extract(null, extractPath);
await zip.close();
Expand Down
2 changes: 0 additions & 2 deletions src/services/results-polling.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,6 @@ export class ResultsPollingService {

try {
// Poll in a loop until all tests complete
// eslint-disable-next-line no-constant-condition
while (true) {
try {
nextPollAt = null;
Expand Down Expand Up @@ -463,7 +462,6 @@ export class ResultsPollingService {
},
},
...(hasFailedTests && {
// eslint-disable-next-line camelcase
fail_reason: {
get(row) {
return row.status === 'FAILED' && row.fail_reason
Expand Down
1 change: 0 additions & 1 deletion src/services/test-submission.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,6 @@ export class TestSubmissionService {
}

private parseKeyValuePairs(pairs: string[]): Record<string, string> {
// eslint-disable-next-line unicorn/no-array-reduce
return pairs.reduce((acc, cur) => {
const [key, ...value] = cur.split('=');
// handle case where value includes an equals sign
Expand Down
4 changes: 0 additions & 4 deletions src/utils/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,16 +70,13 @@ export interface Logger {

export const logger: Logger = {
log(message: string): void {
// eslint-disable-next-line no-console
console.log(message);
},
warn(message: string): void {
// eslint-disable-next-line no-console
console.warn(symbols.warning + ' ' + message);
},
json(value: unknown): void {
// The one stdout write under --json; everything else is gated off.
// eslint-disable-next-line no-console
console.log(JSON.stringify(value, null, 2));
},
error(
Expand All @@ -95,7 +92,6 @@ export const logger: Logger = {
} else {
// The literal "Error:" prefix is important for tests and for grep-friendly
// CI logs — it survives color stripping and matches /error/i assertions.
// eslint-disable-next-line no-console
console.error(symbols.error + ' Error: ' + text);
}
return logger.fail(message, opts.exit ?? 1);
Expand Down
2 changes: 0 additions & 2 deletions src/utils/config-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ export function readConfig(): StoredConfig | null {
const raw = readFileSync(p, 'utf8');
const parsed = JSON.parse(raw) as StoredConfig;
if (parsed.version !== CONFIG_SCHEMA_VERSION) {
// eslint-disable-next-line no-console
console.warn(
`Warning: config at ${p} was written by an incompatible CLI version (config version ${parsed.version}); ignoring it. Run \`dcd login\` to recreate it.`,
);
Expand All @@ -74,7 +73,6 @@ export function readConfig(): StoredConfig | null {
} catch {
// Surface the corruption instead of silently behaving as logged-out, so
// downstream "Not authenticated" errors aren't mystifying.
// eslint-disable-next-line no-console
console.warn(
`Warning: could not parse config at ${p}; treating as logged out. Run \`dcd login\` to recreate it.`,
);
Expand Down
3 changes: 0 additions & 3 deletions src/utils/progress.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ class Action {
this.current = null;
this._status = '';
if (line) {
// eslint-disable-next-line no-console
console.log(line);
}
}
Expand All @@ -110,15 +109,13 @@ class Action {
private print(line: string): void {
if (line === this._lastPrinted) return;
this._lastPrinted = line;
// eslint-disable-next-line no-console
console.log(line);
}
}

export const ux = {
action: new Action(),
info(message: string): void {
// eslint-disable-next-line no-console
console.log(message);
},
};
1 change: 0 additions & 1 deletion src/utils/styling.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,6 @@ export function table<T>(
options: { printLine?: (line: string) => void } = {},
): void {
const printLine = options.printLine ?? ((line: string) => {
// eslint-disable-next-line no-console
console.log(line);
});

Expand Down
3 changes: 0 additions & 3 deletions test/unit/report-download.service.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ before(async () => {

/** `zip` cut off before its central directory, as a dropped stream leaves it. */
const truncated = (zip: Buffer) => zip.subarray(0, Math.floor(zip.length / 2));
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const originalFetch = (global as any).fetch;

/**
Expand All @@ -63,7 +62,6 @@ function mockFetch(status: number, responseBody?: Buffer | string) {
const encoder = new TextEncoder();
// Default: a complete ZIP, the body a successful artifacts download has.
const body = responseBody ?? INLINE_ZIP;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
(global as any).fetch = async (
input: URL | string,
init?: RequestInit,
Expand Down Expand Up @@ -91,7 +89,6 @@ function mockFetch(status: number, responseBody?: Buffer | string) {
}

function restoreFetch() {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
(global as any).fetch = originalFetch;
captured = null;
}
Expand Down
Loading