Skip to content

Commit a80dddc

Browse files
committed
scaffold out commands
1 parent fb46ba2 commit a80dddc

File tree

3 files changed

+13
-4
lines changed

3 files changed

+13
-4
lines changed

src/commands/format.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ import type { CommandContext } from "../context.ts";
33

44
// standardized `format` command, runs `@biomejs/biome` and fixes formatting
55
export async function format(ctx: CommandContext) {
6-
console.clear();
7-
console.log("Running format command...");
6+
console.log("Formatting with Biome");
87
const stdio = x("biome", ["check", "--write", "./src"]);
98

109
for await (const line of stdio) {

src/commands/lint.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
1+
import { x } from "tinyexec";
12
import type { CommandContext } from "../context.ts";
23

34
// standardized `lint` command, runs `@biomejs/biome` and generates a lint report
4-
export async function lint(ctx: CommandContext) {}
5+
export async function lint(ctx: CommandContext) {
6+
console.log("Linting with Biome");
7+
const stdio = x("biome", ["lint", "./src"]);
8+
9+
for await (const line of stdio) {
10+
console.log(line);
11+
}
12+
}

src/commands/test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
import type { CommandContext } from "../context.ts";
22

33
// standardized `test` command, shells out to `node test --strip-types`
4-
export async function test(ctx: CommandContext) {}
4+
export async function test(ctx: CommandContext) {
5+
console.log("TODO");
6+
}

0 commit comments

Comments
 (0)