Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(engine): adds body character count #122

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sajithneyo
Copy link

This PR adds a character count feedback when typing the body.

Previous =>
? Provide a longer description of the change: (press enter to skip)

Now =>

? Provide a longer description of the change (max 80 chars per line): (press enter to skip)
 (0) 

So by showing the count a rough idea can be taken when typing the commit message about where to end the line break "\n" without letting commitlint to do it automatically and also gives a basic idea about the body character count. Additionally a config "maxBodyLineWidth" can be set to show line length in the prompt reminding other developers about the line lengths configured. It defaults to 80.

If this is not suitable for the current release, please add this feature in the next release. This helped me a lot to manage and plan my commit messages nicely.

@ThisIsMissEm
Copy link

I don't think you need another configuration option here, just using maxLineWidth should be okay. The automatic wrapping actually happens in cz-conventional-commit: https://github.com/commitizen/cz-conventional-changelog/blob/master/engine.js#L206

@sajithneyo
Copy link
Author

@ThisIsMissEm updated the PR

fix(engine): removed maxBodyLineWidth  property
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants