style: use standard in dependencies-hierarchy

This commit is contained in:
Zoltan Kochan
2018-09-23 15:37:07 +03:00
parent 85ad6dcb33
commit 1affe4c733
6 changed files with 12 additions and 9 deletions

View File

@@ -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"

View File

@@ -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},
) {

View File

@@ -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",

View File

@@ -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"

View File

@@ -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"

View File

@@ -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,