From e79e0f7505de3a632790e4ac30ef61d9da848d1e Mon Sep 17 00:00:00 2001 From: Phred Lane Date: Sun, 20 Jun 2021 06:11:57 -0500 Subject: [PATCH] refactor(husky-init): removed duplicated code (#989) --- packages/husky-init/src/index.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/husky-init/src/index.ts b/packages/husky-init/src/index.ts index e505ead18..13c16a2bb 100644 --- a/packages/husky-init/src/index.ts +++ b/packages/husky-init/src/index.ts @@ -21,7 +21,6 @@ export function updatePkg(pkg: PackageJson, isYarn2: boolean): PackageJson { pkg.devDependencies ||= {} pkg.devDependencies.husky = '^6.0.0' if (isYarn2) { - pkg.scripts ||= {} appendScript(pkg, 'postinstall', 'husky install') if (pkg.private !== true) { appendScript(pkg, 'prepublishOnly', 'pinst --disable') @@ -29,7 +28,6 @@ export function updatePkg(pkg: PackageJson, isYarn2: boolean): PackageJson { pkg.devDependencies.pinst = '^2.0.0' } } else { - pkg.scripts ||= {} appendScript(pkg, 'prepare', 'husky install') }