-
Notifications
You must be signed in to change notification settings - Fork 924
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(core): add sentence-case to ensure-case #117
Conversation
Rugal
commented
Nov 14, 2017
- Add standard-case rule
- Add test cases
Thanks for the contribution! If I understand this correctly you want to enable the use case raised as being unsupported in #114, where one wants to check if the first letter of the subject is capitalized or not, e.g. # config: [2, 'never']
# subject-case: [0]
echo "type: Foo Bar" | commitlint # throws for new rule
echo "type: foo Bar" | commitlint # passes
echo "type: foo bar" | commitlint # passes
# config: ['2', 'never']
# subject-case: [2, 'always', 'lowercase']
echo "type: Foo Bar" | commitlint # throws for new rule, subject-case
echo "type: foo Bar" | commitlint # throws
echo "type: foo bar" | commitlint # passes
# config: ['2', 'always']
# subject-case: [2, 'always', 'lowercase']
echo "type: Foo Bar" | commitlint # throws for subject-case
echo "type: foo Bar" | commitlint # throws for subject-case
echo "type: foo bar" | commitlint # passes I'd prefer to put this into a distinct rule named |
Hi @marionebl, Thanks for the reply. Actually I have this requirement from myself, where I want to have the first letter of a capture group to be uppercase. This not only applies for With that said, making it a rule that different from the What's your opinion? |
Ok, I can follow your reasoning here - avoiding the complexity of handling the collision of Do you have a reference for calling this I'd lean towards renaming this to Also, it would be awesome if you could extend the rule docs accordingly to your changes. |
Awesome, I am good with the renaming. |
@marionebl Please rerun |
@@ -156,6 +157,7 @@ Rule configurations are either of type `array` residing on a key with the rule's | |||
'camel-case', // camelCase | |||
'kebab-case', // kebab-case | |||
'pascal-case', // PascalCase | |||
'sentence-case', // Sentence 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.
@marionebl This duplicates the docs I added, please see 3 lines below.
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.
Thanks, deduped it
…-changelog#100 (conventional-changelog#117) * chore: refactoring version page * refactor: migrate version page to hooks * refactor: Version page better imports * fix: conventional-changelog#100 render not found on click item * test: add test for version page * chore: update mocks * test: add scenario for not found package * chore: fix wrong mock path * chore: update mock * chore: add todo list