-
Notifications
You must be signed in to change notification settings - Fork 9
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
Add support for rules via commitlint #35
Comments
You probably don't need this if you always follow |
My goal was to expose the same DSL instead of forcing regex upon users. Side note: the PR title changes based on the number of commits in the pull request. 1 commit and the title is the commit message, 2 or more commits and the title is the branch name. I wish the title was ALWAYS the branch name. I started a project called github-ui-hooks that was supposed to be a chrome extension that would change the behavior of github. One of these days I'll find the time to fully release it :) |
Oh, I get it, yeah that would be a welcome addition if this can support a lintrc file. Makes it easier to adopt. |
Once #96 is merged, we can look for this file first, followed by prlint.json followed by default config. I'm thinking to have |
We could probably keep it all in prlint.json: {
"title": [
{
"pattern": "^(build|ci|docs|feat|fix|perf|refactor|style|test):\\s",
"message": "Your title needs to be prefixed with a topic"
},
+ {
+ "rules": {
+ "header-max-length": [0, "always", 72],
+ },
+ "message": "Your title needs to be less than 72 characters"
+ }
]
} |
Yes, but then commitlint will not be able to find those. This might be a good time to open a dialog with commitlint folks if you deem fit. |
Looks like https://github.com/conventional-changelog/commitlint/tree/master/@commitlint/lint would do the job. |
I recently modified my internal lambda to lint commits using |
Here are some examples
https://github.com/conventional-changelog/commitlint/blob/master/@commitlint/config-conventional/index.js
The text was updated successfully, but these errors were encountered: