Skip to content

Commit 3350f64

Browse files
committed
optimize husky pre-push
1 parent 0da10d4 commit 3350f64

1 file changed

Lines changed: 19 additions & 19 deletions

File tree

.husky/pre-push

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
1-
# 1. Force Prettier Structure
2-
echo "🐶 Husky: 🌊 Enforcing TypeScript Types Check ..."
3-
yarn type-check || { echo "🐶 Husky: ❌ Enforcing Types Check. Aborting push."; exit 1; }
4-
echo "🐶 Husky: 🎉 TypeScript found no rule violations ..."
1+
# 1. TypeScript
2+
echo "🐶 Husky: 🌊 Enforcing TypeScript types check ..."
3+
yarn type-check || { echo "🐶 Husky: ❌ Enforcing types check failed. Aborting push."; exit 1; }
4+
echo "🐶 Husky: 🎉 TypeScript found no rule violations ..."
55

6-
# 2. Linting
7-
echo "🐶 Husky: 👮‍♂️ Executing oxlint ..."
8-
yarn lint || { echo "🐶 Husky: ❌ oxlint found issues. Aborting push."; exit 1; }
9-
echo "🐶 Husky: 🎉 Linter found no rule violations ..."
6+
# 2. Linting
7+
echo "🐶 Husky: 👮‍♂️ Executing Oxlint ..."
8+
yarn lint:fix || { echo "🐶 Husky: ❌ Oxlint found issues. Aborting push - you should install the Oxc extension!"; exit 1; }
9+
echo "🐶 Husky: 🎉 Linter found no rule violations ..."
1010

11-
# 3. Format check
12-
echo "🐶 Husky: 💅 Checking code format with oxfmt ..."
13-
yarn format:check || { echo "🐶 Husky: ❌ Format check failed. Aborting push."; exit 1; }
14-
echo "🐶 Husky: 🎉 Code format looks good ..."
11+
# 3. Formatting
12+
echo "🐶 Husky: 🍰 Executing OxFmt ..."
13+
yarn format || { echo "🐶 Husky: ❌ OxFmt found issues. Aborting push - you should install the Oxc extension!"; exit 1; }
14+
echo "🐶 Husky: 🎉 Formatter found no rule violations ..."
1515

16-
# 4. Unit-Testing
17-
echo "🐶 Husky: 🧪 Executing test:coverage ..."
18-
yarn test:coverage || { echo "🐶 Husky: ❌ Tests failed. Aborting push."; exit 1; }
19-
echo "🐶 Husky: 🎉 All tests passed successfully!"
16+
# 4. Unit-Testing
17+
echo "🐶 Husky: 🧪 Executing test:coverage ..."
18+
yarn test:coverage || { echo "🐶 Husky: ❌ Tests failed. Aborting push."; exit 1; }
19+
echo "🐶 Husky: 🎉 All unit-tests passed successfully!"
2020

21-
# 6. Success
22-
echo "🐶 Husky: 🎉 Pushing to git successfully - thank you for contributing!"
23-
exit 0
21+
# 6. Success
22+
echo "🐶 Husky: 🎉 Pushing to git successfully - thank you for contributing!"
23+
exit 0

0 commit comments

Comments
 (0)