Skip to content

Commit a0b6255

Browse files
committed
chore: apply no-console-log autofix
console.log → console.info across the CLI, applied by the new fixer.
1 parent 1be80d8 commit a0b6255

5 files changed

Lines changed: 11 additions & 11 deletions

File tree

src/bin.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ async function main() {
1515
const [command, ...args] = argv.slice(2);
1616

1717
if (!command) {
18-
console.log(`No command provided. Available commands: ${Object.keys(commands).join(', ')}\n`);
18+
console.info(`No command provided. Available commands: ${Object.keys(commands).join(', ')}\n`);
1919
return;
2020
}
2121

2222
const run = commands[command as keyof typeof commands];
2323
if (!run) {
24-
console.log(
24+
console.info(
2525
`Unknown command: ${command}. Available commands: ${Object.keys(commands).join(', ')}`,
2626
);
2727
return;

src/commands/dev.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export async function dev(ctx: CommandContext) {
66
const { args } = ctx;
77
const [file = './src/index.ts', ...rest] = args;
88
// console.clear();
9-
console.log(
9+
console.info(
1010
`node --experimental-transform-types --disable-warning=ExperimentalWarning ${args.join(' ')}`,
1111
);
1212
const stdio = x('node', [
@@ -16,18 +16,18 @@ export async function dev(ctx: CommandContext) {
1616
file,
1717
...rest,
1818
]);
19-
console.log('Starting dev server...');
20-
console.log('Press Ctrl+C to stop the server.');
19+
console.info('Starting dev server...');
20+
console.info('Press Ctrl+C to stop the server.');
2121

2222
for await (const line of stdio) {
2323
if (line.startsWith('Restarting')) {
24-
console.log(line);
24+
console.info(line);
2525
continue;
2626
}
2727
if (line.startsWith('Completed')) {
28-
console.log();
28+
console.info();
2929
continue;
3030
}
31-
console.log(line);
31+
console.info(line);
3232
}
3333
}

src/commands/format.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ export async function format(ctx: CommandContext) {
99
const stdio = x(local('oxfmt'), ['-c', config, ...ctx.args]);
1010

1111
for await (const line of stdio) {
12-
console.log(line);
12+
console.info(line);
1313
}
1414
}

src/commands/init.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export async function init(ctx: CommandContext) {
1818
// `--force` lets the template extract into an existing (non-empty) directory.
1919
if (inPlace) gigetArgs.push('--force');
2020
for await (const line of x('pnpx', gigetArgs)) {
21-
console.log(line);
21+
console.info(line);
2222
}
2323

2424
const promises: Promise<void>[] = [];

src/commands/test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ export async function test(ctx: CommandContext) {
1818
const stdio = x(local('vitest'), ['run', '--config', resolveConfig(), ...ctx.args]);
1919

2020
for await (const line of stdio) {
21-
console.log(line);
21+
console.info(line);
2222
}
2323
}

0 commit comments

Comments
 (0)