Skip to content

Refactor tests structure, update Husky hooks, and add commitlint#18

Merged
remi-bezot merged 6 commits intomainfrom
feat/update-structure-modern-tech
Jan 3, 2025
Merged

Refactor tests structure, update Husky hooks, and add commitlint#18
remi-bezot merged 6 commits intomainfrom
feat/update-structure-modern-tech

Conversation

@remi-bezot
Copy link
Contributor

Refactor tests structure, update Husky hooks, and add commitlint

This PR restructures the test files, updates Husky hooks for compatibility, and adds Commitlint for consistent commit messages.

Changes:

  • Moved test files from src/tests to the root tests/ directory
  • Updated Husky hooks to remove deprecated initialization lines
  • Added Commitlint to enforce Conventional Commits
  • Updated paths in test files to reflect the new structure
  • Ensured compatibility with Husky 10+

Validation:

  • All unit tests pass
  • Verified Husky hooks execute correctly
  • Commitlint validation ensures commit messages follow conventions

Review Notes:

Please review the updated test structure and Husky hook compatibility.

- Added .commitlintrc.js for commit message validation

- Updated Husky hooks for pre-commit and pre-push

- Improved CI/CD workflows in .github/workflows/ci.yml

- Configured ESLint and Prettier for consistency

- Adjusted package.json scripts and dependencies

- Updated tsconfig.json to align with ESNext and strict settings

- Enhanced vitest configuration for better test setup

ACTION REQUIRED: Run `pnpm install` and ensure Husky hooks are executable with `chmod +x .husky/*`.
- Moved test files from 'src/tests/' to 'tests/'
- Updated import paths in test files to reflect new structure
- Modified index test for better structure and coverage
- Updated utility functions in arrayUtils, logger, and stringUtils
- Deleted old 'src/tests/index.test.ts' and created 'tests/index.test.ts'
- Updated @types/lodash to 4.17.14
- Updated @types/node to 22.10.5
- Updated semantic-release to 24.2.1
- Updated husky to 9.1.7
- Added commitlint to enforce commit message conventions
- Configured husky to use commitlint in commit-msg hook
- Created .commitlintrc.js with custom rules for validation
- Removed deprecated '.husky.sh' initialization lines
- Updated pre-commit, pre-push, post-merge, post-commit, post-checkout, and post-rewrite hooks
- Ensured compatibility with Husky 10 and streamlined hook tasks
- Verified functionality across all hooks
@remi-bezot remi-bezot merged commit 4037fd6 into main Jan 3, 2025
2 checks passed
@github-actions
Copy link

github-actions bot commented Jan 4, 2025

🎉 This PR is included in version 2.3.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant