Skip to content

Commit 19b3c1d

Browse files
style: npm run format
The pre-commit hooks would be really nice right about now.
1 parent 71ce06a commit 19b3c1d

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

src/cli.ts

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,18 @@ import net from "net";
1515
* Merges the options of the subcommand, and the main command, and then executes the function given.
1616
*/
1717
function mergeArgsAndExec(command: Command, func: Function) {
18-
19-
const options = ({
20-
...(command.parent?.opts() ?? {}),
21-
...(command.opts() ?? {})
22-
});
18+
const options = {
19+
...(command.parent?.opts() ?? {}),
20+
...(command.opts() ?? {}),
21+
};
2322

24-
const resolvedLogLevel = (options.verbose as number) + LogLevel.toNumber(options.logLevel);
23+
const resolvedLogLevel =
24+
(options.verbose as number) + LogLevel.toNumber(options.logLevel);
2525
Logger.logLevel = LogLevel.fromNumber(resolvedLogLevel);
2626
Logger.debug(`Set LogLevel to: ${Logger.logLevel}`);
27-
27+
2828
Logger.debug("options:", options);
29-
29+
3030
const resolvedImports = FastGlob.sync(options.includeImport, {
3131
ignore: options.ignoreInIncludeImport,
3232
caseSensitiveMatch: true,
@@ -38,9 +38,9 @@ function mergeArgsAndExec(command: Command, func: Function) {
3838
unique: true,
3939
dot: true,
4040
});
41-
41+
4242
Logger.debug("resolved:", { resolvedLogLevel, resolvedImports });
43-
43+
4444
return func(options);
4545
}
4646

@@ -142,8 +142,8 @@ const compile = program
142142

143143
/* Adding the 'port' option to the serve command */ {
144144
compile.option(
145-
"-o, --output <path>",
146-
"serve on this port",
145+
"-o, --output <path>",
146+
"serve on this port",
147147
(value) => path.resolve(value),
148148
"./slides.html",
149149
);
@@ -169,9 +169,9 @@ const serve = program
169169

170170
/* Adding the 'port' option to the serve command */ {
171171
serve.option(
172-
"-r, --root <prefix>",
173-
"The root prefix the serve on. If specified serve from that subdirectory.",
174-
"/"
172+
"-r, --root <prefix>",
173+
"The root prefix the serve on. If specified serve from that subdirectory.",
174+
"/",
175175
);
176176
}
177177

test/lib/logger.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { vi, beforeAll, afterEach } from "vitest";
44

55
describe("class Logger", () => {
66
// tests for the `Logger` class
7-
7+
88
const spy = vi.fn(Logger.DEV_NULL);
99

1010
beforeAll(() => {
@@ -49,5 +49,5 @@ describe("class Logger", () => {
4949
(Logger[key] as Function)(message);
5050
expect(spy).toHaveBeenCalledWith(message);
5151
}
52-
});
52+
});
5353
});

0 commit comments

Comments
 (0)