Skip to content

Commit 3a38d28

Browse files
nkgentilestipsan
authored andcommitted
fix: migrate husky setup
1 parent 06cd611 commit 3a38d28

File tree

4 files changed

+2
-8
lines changed

4 files changed

+2
-8
lines changed
Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
#!/bin/sh
2-
. "$(dirname "$0")/_/husky.sh"
3-
41
npx --no -- commitlint --edit ""
Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
#!/bin/sh
2-
. "$(dirname "$0")/_/husky.sh"
3-
41
npx lint-staged

src/presets/semver-workflow.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ async function applyPreset(options: InjectOptions) {
4242
async function addPrepareScript(options: InjectOptions) {
4343
const pkg = await getPackage(options)
4444
const didWrite = await addPackageJsonScripts(pkg, options, (scripts) => {
45-
scripts.prepare = addScript(`husky install`, scripts.prepare)
45+
scripts.prepare = addScript(`husky`, scripts.prepare)
4646
return scripts
4747
})
4848
info(didWrite, 'Added prepare script to package.json')

test/init.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ tap.test('plugin-kit init --force --preset semver-workflow in empty directory',
230230
'should have expected devDependencies',
231231
)
232232

233-
t.strictSame(pkg.scripts?.prepare, 'husky install')
233+
t.strictSame(pkg.scripts?.prepare, 'husky')
234234
},
235235
})
236236
})

0 commit comments

Comments
 (0)