Skip to content

Commit

Permalink
chore: Upgrade husky, Add lint-staged
Browse files Browse the repository at this point in the history
  • Loading branch information
builtbysuraj committed Feb 6, 2024
1 parent 24aac98 commit 5517246
Show file tree
Hide file tree
Showing 3 changed files with 714 additions and 53 deletions.
46 changes: 1 addition & 45 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,45 +1 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

echo '
💅🛠️ Formatting and testing project before committing...
'

# Check tsconfig standards
npm run check-types ||
(
echo '
TypeScript Check Failed. ❌
Make the required changes listed above, add changes and try to commit again.
'
false;
)


# Check ESLint Standards
npm run check-lint ||
(
echo '
ESLint Check Failed. ❌
Make the required changes listed above, add changes and try to commit again.
'
false;
)


# Check Prettier standards
npm run check-format-client ||
(
echo '
Prettier Check Failed. ❌
Run npm run format, add changes and try commit again.';
false;
)

npm run check-format-server ||
(
echo '
Prettier Check Failed. ❌
Run npm run format, add changes and try commit again.';
false;
)
npx lint-staged
Loading

0 comments on commit 5517246

Please sign in to comment.