Skip to content

Commit c1bbd9b

Browse files
committed
style: indent
1 parent 2da78cb commit c1bbd9b

File tree

5 files changed

+13
-13
lines changed

5 files changed

+13
-13
lines changed

bin.js

+9-9
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,18 @@ import i from './index.js'
55
let a = process.argv[2]
66

77
if (a == 'init') {
8-
let p = 'package.json'
9-
let d = JSON.parse(f.readFileSync(p))
10-
;(d.scripts ||= {}).prepare = 'husky'
11-
w('package.json', JSON.stringify(d, null, /\t/.test() ? '\t' : 2) + '\n')
12-
process.stdout.write(i())
13-
try { f.mkdirSync('.husky') } catch {}
14-
w('.husky/pre-commit', process.env.npm_config_user_agent.split('/')[0] + ' test\n')
15-
process.exit()
8+
let p = 'package.json'
9+
let d = JSON.parse(f.readFileSync(p))
10+
; (d.scripts ||= {}).prepare = 'husky'
11+
w('package.json', JSON.stringify(d, null, /\t/.test() ? '\t' : 2) + '\n')
12+
process.stdout.write(i())
13+
try { f.mkdirSync('.husky') } catch { }
14+
w('.husky/pre-commit', process.env.npm_config_user_agent.split('/')[0] + ' test\n')
15+
process.exit()
1616
}
1717

1818
let d = c => console.error(`${c} command is deprecated`)
1919
if (['add', 'set', 'uninstall'].includes(a)) { d(a); process.exit(1) }
2020
if (a == 'install') d(a)
2121

22-
process.stdout.write(i(a == 'install' ? undefined : a))
22+
process.stdout.write(i(a == 'install' ? undefined : a))

husky.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ c=$?
1818

1919
[ $c != 0 ] && echo "husky - $h script failed (code $c)"
2020
[ $c = 127 ] && echo "husky - command not found in PATH=$PATH"
21-
exit $c
21+
exit $c

index.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export default function (dir?: string): string;
1+
export default function (dir?: string): string;

index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ export default (d = '.husky') => {
2020
l.forEach(h => w(_(h), `#!/usr/bin/env sh\n. "\${0%/*}/h"`, { mode: 0o755 }))
2121
w(_('husky.sh'), '')
2222
return ''
23-
}
23+
}

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@
2222
"engines": {
2323
"node": ">=18"
2424
}
25-
}
25+
}

0 commit comments

Comments
 (0)