Skip to content

Commit

Permalink
fix: fix new linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
sQVe committed Feb 26, 2020
1 parent 039cadf commit c19f2e5
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 13 deletions.
19 changes: 11 additions & 8 deletions src/index.ts
Expand Up @@ -9,10 +9,15 @@ import getRestructureMap from "./index/getFilePaths";

const { argv } = process;

export type Options = {
help: boolean;
version: boolean;
write: boolean;
type Options = {
help: boolean,
version: boolean,
write: boolean,
};

type Args = {
options: Partial<Options>,
rootPaths: string[],
};

const defaultOptions: Options = {
Expand Down Expand Up @@ -43,10 +48,8 @@ const printHelp = (exitCode: number) => {
return process.exit(exitCode);
};

const parseArgs = (
args: any[]
): { options: Partial<Options>; rootPaths: string[] } =>
args.reduce(
const parseArgs = (args: string[]): Args =>
args.reduce<Args>(
(acc, arg) => {
switch (arg) {
case "-h":
Expand Down
2 changes: 1 addition & 1 deletion src/index/generateTrees/printTree.ts
Expand Up @@ -2,7 +2,7 @@ import chalk from "chalk";

import logger from "../../shared/logger";

type PositionedLeaf = { text: string; position: number };
type PositionedLeaf = { text: string, position: number };

const createBranchFromParts = (parts: string[], count: number) =>
parts.slice(0, count).join("/");
Expand Down
2 changes: 1 addition & 1 deletion src/index/generateTrees/shared/Graph.ts
@@ -1,5 +1,5 @@
export type Graph = Record<string, string[]>;
export type OldGraph = Record<
string,
{ oldLocation: string; imports: Array<{ text: string; resolved: string }> }
{ oldLocation: string, imports: { text: string, resolved: string }[] }
>;
6 changes: 3 additions & 3 deletions src/index/shared/RootOption.ts
@@ -1,5 +1,5 @@
export type RootOption = {
parentFolder: string;
tree: Record<string, string>;
useForwardSlash: boolean;
parentFolder: string,
tree: Record<string, string>,
useForwardSlash: boolean,
};

0 comments on commit c19f2e5

Please sign in to comment.