|
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 ..." |
5 | 5 |
|
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 ..." |
10 | 10 |
|
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 ..." |
15 | 15 |
|
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!" |
20 | 20 |
|
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