feat(core): add sentence-case to ensure-case#117
feat(core): add sentence-case to ensure-case#117marionebl merged 3 commits intoconventional-changelog:masterfrom Rugal:StandardCase
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 # passesI'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 |
| 'camel-case', // camelCase | ||
| 'kebab-case', // kebab-case | ||
| 'pascal-case', // PascalCase | ||
| 'sentence-case', // Sentence case |
There was a problem hiding this comment.
@marionebl This duplicates the docs I added, please see 3 lines below.
…-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