From efe58893899c0611aed01e9b8fce03a298540340 Mon Sep 17 00:00:00 2001 From: aleclarson Date: Sat, 29 Dec 2018 18:14:16 -0500 Subject: [PATCH] chore: run prettier --- .vscode/tasks.json | 12 ++++-------- src/add.ts | 6 ++++-- src/installations.ts | 12 +++++------- test/fixture/project/nested/package.json | 2 +- test/fixture/project/package.json | 14 +++++++------- 5 files changed, 21 insertions(+), 25 deletions(-) diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 24d4a47..6adf854 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -7,13 +7,9 @@ { "taskName": "tsc", "command": "node", - "args": [ - "./node_modules/typescript/lib/tsc.js", - "-w", - "-p", - "." - ], + "args": ["./node_modules/typescript/lib/tsc.js", "-w", "-p", "."], "isBackground": true, "problemMatcher": "$tsc-watch" - }] - } \ No newline at end of file + } + ] +} diff --git a/src/add.ts b/src/add.ts index 0f0c0e6..5b7e926 100644 --- a/src/add.ts +++ b/src/add.ts @@ -176,7 +176,9 @@ export const addPackages = async ( } const addedAction = options.link ? 'linked' : 'added' console.log( - `Package ${pkg.name}@${pkg.version} ${addedAction} ==> ${destModulesDir}.` + `Package ${pkg.name}@${ + pkg.version + } ${addedAction} ==> ${destModulesDir}.` ) } @@ -213,6 +215,6 @@ export const addPackages = async ( if (options.yarn) { console.log('Running yarn:') - execSync('yarn', {cwd: options.workingDir}) + execSync('yarn', { cwd: options.workingDir }) } } diff --git a/src/installations.ts b/src/installations.ts index 839d6fb..8f0fb85 100644 --- a/src/installations.ts +++ b/src/installations.ts @@ -38,9 +38,8 @@ export const readInstallationsFile = (): InstallationsFile => { export const showInstallations = ({ packages }: { packages: string[] }) => { const config = readInstallationsFile() Object.keys(config) - .filter( - packageName => - packages.length ? packages.indexOf(packageName) >= 0 : true + .filter(packageName => + packages.length ? packages.indexOf(packageName) >= 0 : true ) .map((name: PackageName) => ({ name, locations: config[name] })) .forEach(({ name, locations }) => { @@ -55,14 +54,13 @@ export const cleanInstallations = async ({ packages, dry }: { - packages: string[], + packages: string[] dry: boolean }) => { const config = readInstallationsFile() const installsToRemove = Object.keys(config) - .filter( - packageName => - packages.length ? packages.indexOf(packageName) >= 0 : true + .filter(packageName => + packages.length ? packages.indexOf(packageName) >= 0 : true ) .map((name: PackageName) => ({ name, locations: config[name] })) .reduce( diff --git a/test/fixture/project/nested/package.json b/test/fixture/project/nested/package.json index 2852173..78427ea 100644 --- a/test/fixture/project/nested/package.json +++ b/test/fixture/project/nested/package.json @@ -6,4 +6,4 @@ "dependencies": { "dep-package": "1.0.0" } -} \ No newline at end of file +} diff --git a/test/fixture/project/package.json b/test/fixture/project/package.json index 35898b7..14aad49 100644 --- a/test/fixture/project/package.json +++ b/test/fixture/project/package.json @@ -1,9 +1,9 @@ { - "name": "yalc-test-project", - "version": "1.0.0", - "main": "index.js", - "license": "MIT", - "dependencies": { - "dep-package": "1.0.0" - } + "name": "yalc-test-project", + "version": "1.0.0", + "main": "index.js", + "license": "MIT", + "dependencies": { + "dep-package": "1.0.0" + } }