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

@commitlint/config-angular does not validate subject casing #114

Closed
satazor opened this issue Nov 13, 2017 · 7 comments
Closed

@commitlint/config-angular does not validate subject casing #114

satazor opened this issue Nov 13, 2017 · 7 comments
Labels

Comments

@satazor
Copy link
Contributor

satazor commented Nov 13, 2017

According to angular developer guide the first letter of the subject must not be capitalised. Though, @commitlint/config-angular allows it.

I think this is an easy change by setting subject-case?

@marionebl
Copy link
Contributor

subject-case validates the entire subject. We'd have to add a subject-leading-case rule to support this.

@marionebl
Copy link
Contributor

We can take a first stab at this by adding {'subject-case': [2, 'never', 'sentence-case']}:

echo "foo: Bar baz" | commitlint # throws
echo "foo: bar baz" | commitlint # pass
echo "foo: Bar Baz" | commitlint # pass
echo "foo: BAR BAZ" | commitlint # pass

@satazor
Copy link
Contributor Author

satazor commented Nov 18, 2017

I agree!

@satazor
Copy link
Contributor Author

satazor commented Nov 18, 2017

Actually it feels kind of strange, do you feel this is useful? Mainly because of example 3 and 4 passing.

@marionebl
Copy link
Contributor

Nah, you are right - it is not. I am brewing up an string[] based API for subject-case that allows to forbid example 3 and 4.

@satazor
Copy link
Contributor Author

satazor commented Nov 18, 2017

Ok! Let me know if you need help.

@marionebl
Copy link
Contributor

Release via 5.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants