Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: JustinBeckwith/linkinator
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.13.2
Choose a base ref
...
head repository: JustinBeckwith/linkinator
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v2.13.3
Choose a head ref
  • 1 commit
  • 2 files changed
  • 1 contributor

Commits on Feb 7, 2021

  1. Copy the full SHA
    668aad6 View commit details
Showing with 5 additions and 4 deletions.
  1. +4 −4 src/cli.ts
  2. +1 −0 src/config.ts
8 changes: 4 additions & 4 deletions src/cli.ts
Original file line number Diff line number Diff line change
@@ -111,8 +111,8 @@ async function main() {
flags = await getConfig(cli.flags);

const start = Date.now();
const verbosity = parseVerbosity(cli.flags);
const format = parseFormat(cli.flags);
const verbosity = parseVerbosity(flags);
const format = parseFormat(flags);
const logger = new Logger(verbosity, format);

logger.error(`🏊‍♂️ crawling ${cli.input}`);
@@ -270,7 +270,7 @@ async function main() {
);
}

function parseVerbosity(flags: typeof cli.flags): LogLevel {
function parseVerbosity(flags: Flags): LogLevel {
if (flags.silent && flags.verbosity) {
throw new Error(
'The SILENT and VERBOSITY flags cannot both be defined. Please consider using VERBOSITY only.'
@@ -292,7 +292,7 @@ function parseVerbosity(flags: typeof cli.flags): LogLevel {
return LogLevel[verbosity as keyof typeof LogLevel];
}

function parseFormat(flags: typeof cli.flags): Format {
function parseFormat(flags: Flags): Format {
if (!flags.format) {
return Format.TEXT;
}
1 change: 1 addition & 0 deletions src/config.ts
Original file line number Diff line number Diff line change
@@ -10,6 +10,7 @@ export interface Flags {
skip?: string;
format?: string;
silent?: boolean;
verbosity?: string;
timeout?: number;
markdown?: boolean;
serverRoot?: string;