Dev#47
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
This pull request introduces commit message linting to the project using Commitlint and Husky. The implementation enforces conventional commit standards and sets up Git hooks for commit message validation, improving code quality and commit history consistency.
- Adds Commitlint with conventional commit format validation
- Configures Husky to run commit message linting via Git hooks
- Updates development dependencies and adds prepare script for automatic Husky installation
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| package.json | Adds commitlint and husky dev dependencies (v20.2.0 and v9.1.7 respectively) and includes prepare script for Husky setup |
| commitlint.config.ts | Defines commit message rules based on conventional commits with customized subject case allowance |
| .husky/commit-msg | Sets up Git hook to validate commit messages with commitlint |
| .husky/pre-commit | Adds placeholder pre-commit hook (commented out lint command) for future use |
| pnpm-lock.yaml | Updates lockfile with new commitlint and husky dependencies and their transitive dependencies |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
| "type-enum": [ | ||
| 2, | ||
| "always", | ||
| [ | ||
| "feat", | ||
| "fix", | ||
| "docs", | ||
| "style", | ||
| "refactor", | ||
| "perf", | ||
| "test", | ||
| "build", | ||
| "ci", | ||
| "chore", | ||
| "revert", | ||
| ], | ||
| ], |
There was a problem hiding this comment.
The type-enum rule configuration is redundant because @commitlint/config-conventional already defines these exact commit types. Since the configuration extends the conventional config, this rule override doesn't change any behavior and only adds unnecessary code.
| "type-enum": [ | |
| 2, | |
| "always", | |
| [ | |
| "feat", | |
| "fix", | |
| "docs", | |
| "style", | |
| "refactor", | |
| "perf", | |
| "test", | |
| "build", | |
| "ci", | |
| "chore", | |
| "revert", | |
| ], | |
| ], |
This pull request introduces commit message linting to the project by adding Commitlint and Husky. These tools help enforce consistent commit message formats and enable pre-commit and commit-msg hooks. The changes also update development dependencies and scripts in
package.jsonto support these tools.Commit message linting and Git hooks:
commitlint.config.tsfile to define commit message rules based on the conventional commit standard, allowing any subject case..husky/commit-msghook to run Commitlint on commit messages..husky/pre-commithook template (currently commented out lint command) for potential future use.Development tooling and configuration:
package.jsonto add@commitlint/cli,@commitlint/config-conventional, andhuskyas dev dependencies. [1] [2]package.jsonscripts to include apreparescript that sets up Husky hooks.