From 1affe4c7333bbcbb8b2c540ee3c9bdca5e5df551 Mon Sep 17 00:00:00 2001 From: Zoltan Kochan Date: Sun, 23 Sep 2018 15:37:07 +0300 Subject: [PATCH] style: use standard in dependencies-hierarchy --- packages/dependencies-hierarchy/package.json | 2 +- packages/dependencies-hierarchy/src/index.ts | 12 ++++++------ packages/dependencies-hierarchy/tslint.json | 2 ++ packages/list/package.json | 2 +- packages/outdated/package.json | 2 +- packages/outdated/tslint.json | 1 + 6 files changed, 12 insertions(+), 9 deletions(-) diff --git a/packages/dependencies-hierarchy/package.json b/packages/dependencies-hierarchy/package.json index e15c9a6985..1ae54e04b8 100644 --- a/packages/dependencies-hierarchy/package.json +++ b/packages/dependencies-hierarchy/package.json @@ -10,7 +10,7 @@ "scripts": { "fix": "tslint -c tslint.json --project . --fix", "lint": "tslint -c tslint.json --project .", - "test": "npm run lint && pnpm link . && ts-node test --type-check && mos t", + "test": "npm run tsc && npm run lint && pnpm link . && ts-node test --type-check && mos t", "prepublishOnly": "tsc", "tsc": "tsc", "md": "pnpm link . && tsc && mos" diff --git a/packages/dependencies-hierarchy/src/index.ts b/packages/dependencies-hierarchy/src/index.ts index 11d68c32f3..68491a6f8d 100644 --- a/packages/dependencies-hierarchy/src/index.ts +++ b/packages/dependencies-hierarchy/src/index.ts @@ -23,7 +23,7 @@ export interface PackageNode { circular?: true, } -export function forPackages( +export function forPackages ( packages: PackageSelector[], projectPath: string, opts?: { @@ -37,7 +37,7 @@ export function forPackages( return dependenciesHierarchy(projectPath, packages, opts) } -export default function( +export default function ( projectPath: string, opts?: { depth: number, @@ -47,7 +47,7 @@ export default function( return dependenciesHierarchy(projectPath, [], opts) } -async function dependenciesHierarchy( +async function dependenciesHierarchy ( projectPath: string, searched: PackageSelector[], maybeOpts?: { @@ -108,7 +108,7 @@ async function dependenciesHierarchy( return result } -function getTopDependencies( +function getTopDependencies ( shrinkwrap: Shrinkwrap, opts: { only?: 'dev' | 'prod', @@ -128,7 +128,7 @@ function getTopDependencies( } } -function getTree( +function getTree ( opts: { currentDepth: number, maxDepth: number, @@ -196,7 +196,7 @@ function getTree( return result } -function matches( +function matches ( searched: PackageSelector[], pkg: {name: string, version: string}, ) { diff --git a/packages/dependencies-hierarchy/tslint.json b/packages/dependencies-hierarchy/tslint.json index 60ea406f4a..0d4b1e491f 100644 --- a/packages/dependencies-hierarchy/tslint.json +++ b/packages/dependencies-hierarchy/tslint.json @@ -16,6 +16,8 @@ "no-use-before-declare": true, "no-var-requires": true, "no-require-imports": false, + "no-reference": false, + "space-before-function-paren": [true, "always"], "interface-name": [true, "never-prefix"], "one-line": [true, "check-else", diff --git a/packages/list/package.json b/packages/list/package.json index 8510939c60..97cd8b4c64 100644 --- a/packages/list/package.json +++ b/packages/list/package.json @@ -10,7 +10,7 @@ "scripts": { "fix": "tslint -c tslint.json --project . --fix", "lint": "tslint -c tslint.json --project .", - "test": "npm run lint && pnpm link . && ts-node test --type-check", + "test": "npm run tsc && npm run lint && pnpm link . && ts-node test --type-check", "prepublishOnly": "tsc", "tsc": "tsc", "md": "tsc && mos" diff --git a/packages/outdated/package.json b/packages/outdated/package.json index 8eba1d0d1b..4ecbdd5f83 100644 --- a/packages/outdated/package.json +++ b/packages/outdated/package.json @@ -11,7 +11,7 @@ "lib" ], "scripts": { - "test": "tslint --config tslint.json --project . && pnpm link . && ts-node test --type-check", + "test": "npm run tsc && tslint --config tslint.json --project . && pnpm link . && ts-node test --type-check", "prepublishOnly": "tsc", "tsc": "tsc", "md": "mos" diff --git a/packages/outdated/tslint.json b/packages/outdated/tslint.json index 12107b7676..305ee78f18 100644 --- a/packages/outdated/tslint.json +++ b/packages/outdated/tslint.json @@ -17,6 +17,7 @@ "no-var-requires": true, "no-require-imports": false, "no-console": false, + "no-reference": false, "space-before-function-paren": [true, "always"], "interface-name": [true, "never-prefix"], "one-line": [true,