-
Notifications
You must be signed in to change notification settings - Fork 709
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: regex headerPattern for eslint #268
Conversation
Can you add a test? |
I added a test case with the beginning trailing whitespaces. Did you mean this test case? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't mind this change. Any opposition?
👍 I'm fine with this change. I will note that I couldn't actually find any ESLint documentation on whether commit messages are allowed to contain spaces after the commit type and colon. Their documention does say one way or the other. @stevemao should this be a breaking change since the whitespace behavior has changed? |
I would see this as breaking change, since this update won't apply to the previous style. Also a fix wouldn't fit, 'cause the lib was never thought to be that way. |
@JPeer264 ok. Thanks! Could you squash and change the commit message to follow our standard? Make sure you have a |
like this? |
BREAKING CHANGE: Trailing whitespaces at the beginning of commit messages will not be saved anymore
The previous regex got a lot of overhead. The new one is easier to read and faster to parse.
But here I changed the regex a bit. First it also matched whitespaces in the beginning of the message, now it doesnt. If the same behavior is wished, I can change the regex to:
/^(\w*): (.*)$/
Which does the same as the original one, but with less overhead