Skip to content

Commit

Permalink
style: 🎨 apply deno fmt to harmonize sources
Browse files Browse the repository at this point in the history
  • Loading branch information
JOTSR committed Mar 14, 2024
1 parent f06d9c1 commit 706e2c9
Show file tree
Hide file tree
Showing 16 changed files with 34 additions and 83 deletions.
2 changes: 1 addition & 1 deletion ansi/colors_test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { assertEquals } from "@std/assert";
import { underline, bold, red } from "@std/fmt/colors";
import { bold, red, underline } from "@std/fmt/colors";
import { colors } from "./colors.ts";

Deno.test({
Expand Down
11 changes: 10 additions & 1 deletion command/command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2798,7 +2798,16 @@ export class Command<
}

/** Get completions. */
public getCompletions(): Completion<any, any, any, any, any, any, any, any>[] {
public getCompletions(): Completion<
any,
any,
any,
any,
any,
any,
any,
any
>[] {
return this.getGlobalCompletions().concat(this.getBaseCompletions());
}

Expand Down
11 changes: 2 additions & 9 deletions command/test/command/action_test.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
import { assertEquals } from "@std/assert";
import {
assertSpyCall,
assertSpyCalls,
spy,
} from "@std/testing/mock";
import {
assertType,
IsExact,
} from "@std/testing/types";
import { assertSpyCall, assertSpyCalls, spy } from "@std/testing/mock";
import { assertType, IsExact } from "@std/testing/types";
import { Command } from "../../command.ts";

interface IStats {
Expand Down
10 changes: 2 additions & 8 deletions command/test/command/arguments_test.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
import {
assertEquals,
assertRejects,
} from "@std/assert";
import {
describe,
it,
} from "@std/testing/bdd";
import { assertEquals, assertRejects } from "@std/assert";
import { describe, it } from "@std/testing/bdd";
import type { ArgumentValue } from "../../../flags/types.ts";
import { ValidationError } from "../../_errors.ts";
import { Command } from "../../command.ts";
Expand Down
11 changes: 2 additions & 9 deletions command/test/command/error_handler_test.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
import {
assertEquals,
assertInstanceOf,
assertRejects,
} from "@std/assert";
import {
assertSpyCalls,
spy,
} from "@std/testing/mock";
import { assertEquals, assertInstanceOf, assertRejects } from "@std/assert";
import { assertSpyCalls, spy } from "@std/testing/mock";
import { Command, ErrorHandler, ValidationError } from "../../mod.ts";

Deno.test("[command] should call error handler on error", async () => {
Expand Down
6 changes: 1 addition & 5 deletions command/test/command/generic_types_test.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
import { Command, EnumType } from "../../mod.ts";
import {
assert,
IsAny,
IsExact,
} from "conditional_type_checks";
import { assert, IsAny, IsExact } from "conditional_type_checks";

// Not required to execute this code, only type check.
(() => {
Expand Down
10 changes: 2 additions & 8 deletions command/test/command/standalone_test.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
import {
assertEquals,
assertRejects,
} from "@std/assert";
import {
assertSpyCalls,
spy,
} from "@std/testing/mock";
import { assertEquals, assertRejects } from "@std/assert";
import { assertSpyCalls, spy } from "@std/testing/mock";
import { Command } from "../../command.ts";

Deno.test("[command] should execute standalone option action", async () => {
Expand Down
6 changes: 1 addition & 5 deletions command/test/command/sub_command_test.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
import {
assertEquals,
assertRejects,
assertThrows,
} from "@std/assert";
import { assertEquals, assertRejects, assertThrows } from "@std/assert";
import { Command } from "../../command.ts";

const version = "1.0.0";
Expand Down
11 changes: 2 additions & 9 deletions command/test/option/action_test.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
import {
assert,
assertEquals,
} from "@std/assert";
import {
assertSpyCall,
assertSpyCalls,
spy,
} from "@std/testing/mock";
import { assert, assertEquals } from "@std/assert";
import { assertSpyCall, assertSpyCalls, spy } from "@std/testing/mock";
import sinon from "sinon";
import { Command } from "../../command.ts";

Expand Down
5 changes: 1 addition & 4 deletions command/test/type/file_test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import {
assert,
IsExact,
} from "conditional_type_checks";
import { assert, IsExact } from "conditional_type_checks";
import { assertEquals } from "@std/assert";
import { Command } from "../../command.ts";

Expand Down
5 changes: 4 additions & 1 deletion prompt/_generic_list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,10 @@ export abstract class GenericList<
return this.settings.indent + " ".repeat(indentLevel);
}

protected getListItemPointer(option: TOption | TGroup, isSelected?: boolean): string {
protected getListItemPointer(
option: TOption | TGroup,
isSelected?: boolean,
): string {
if (!isSelected) {
return " ";
}
Expand Down
2 changes: 1 addition & 1 deletion prompt/_generic_prompt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
italic,
red,
stripColor,
yellow
yellow,
} from "@std/fmt/colors";
import { Reader, WriterSync } from "@std/io/types";
import { Figures } from "./_figures.ts";
Expand Down
14 changes: 2 additions & 12 deletions prompt/_generic_suggestions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,8 @@ import {
GenericInputPromptOptions,
GenericInputPromptSettings,
} from "./_generic_input.ts";
import {
bold,
brightBlue,
dim,
underline,
stripColor,
} from "@std/fmt/colors";
import {
dirname,
join,
normalize,
} from "@std/path"
import { bold, brightBlue, dim, stripColor, underline } from "@std/fmt/colors";
import { dirname, join, normalize } from "@std/path";
import { Figures, getFiguresByKeys } from "./_figures.ts";
import { distance } from "../_utils/distance.ts";

Expand Down
2 changes: 1 addition & 1 deletion prompt/test/integration/prompt_test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ansi } from "../../../ansi/ansi.ts";
import { assertEquals } from "@std/assert";
import { IsExact, assertType } from "@std/testing/types";
import { assertType, IsExact } from "@std/testing/types";
import { Checkbox, CheckboxOptions } from "../../checkbox.ts";
import { Confirm } from "../../confirm.ts";
import { Input } from "../../input.ts";
Expand Down
5 changes: 1 addition & 4 deletions prompt/test/prompt_list_test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import {
assert,
IsExact,
} from "conditional_type_checks";
import { assert, IsExact } from "conditional_type_checks";
import { assertEquals, assertRejects } from "@std/assert";
import { inject, prompt } from "../prompt.ts";
import { Checkbox } from "../checkbox.ts";
Expand Down
6 changes: 1 addition & 5 deletions table/test/table_test.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
import { Table } from "../table.ts";
import {
assertEquals,
assertStrictEquals,
assertThrows,
} from "@std/assert";
import { assertEquals, assertStrictEquals, assertThrows } from "@std/assert";
import { Row } from "../row.ts";

Deno.test("simple table", () => {
Expand Down

0 comments on commit 706e2c9

Please sign in to comment.