Skip to content

Commit

Permalink
refactor: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
fadeev committed Jan 26, 2025
1 parent 155a93f commit d9852c3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/cloneRepository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export const cloneRepository = async (
tempDir: string,
branchName: string,
options: any,
isVerbose: boolean
isVerbose: boolean,
) => {
const ONE_DAY_IN_MS = 24 * 60 * 60 * 1000;

Expand Down
12 changes: 6 additions & 6 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env node
import clear from "clear";
import { Command } from "commander";
import os from "os";
import path from "path";
Expand All @@ -7,7 +8,6 @@ import { cloneRepository } from "./cloneRepository";
import { copyExample } from "./copyExample";
import { getExampleDirectories } from "./getExampleDirectories";
import { promptForExample } from "./promptForExample";
import clear from "clear";

const program = new Command();
const REPO_URL = "https://github.com/zeta-chain/example-contracts.git";
Expand All @@ -19,18 +19,18 @@ program
.name("create-universal-contracts")
.description(
"CLI tool for creating universal contracts on ZetaChain.\n" +
"For more information, visit: https://zetachain.com/docs"
"For more information, visit: https://zetachain.com/docs",
)
.option("--no-cache", "Bypass cached repository and re-clone")
.option("--verbose", "Enable verbose logging")
.option(
"--output <directory>",
"Specify custom output directory or name",
process.cwd()
process.cwd(),
)
.option(
"--example <exampleName>",
"Specify the example to use and skip the prompt"
"Specify the example to use and skip the prompt",
);

program.parse(process.argv);
Expand All @@ -49,15 +49,15 @@ const main = async () => {
let chosenExample;
if (exampleName) {
const matchingExample = directories.find(
(dir) => dir.name === exampleName
(dir) => dir.name === exampleName,
);
if (!matchingExample) {
console.error(`Error: Example "${exampleName}" not found.`);
console.error(
"Available examples:",
directories
.map((dir) => `${dir.name} - ${dir.description}`)
.join("\n")
.join("\n"),
);
process.exit(1);
}
Expand Down

0 comments on commit d9852c3

Please sign in to comment.