Package Exports
- @commitlint/config-angular
- @commitlint/config-angular/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@commitlint/config-angular) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Lint your commits, angular-style
@commitlint/config-angular
Shareable commitlint config enforcing the Angular commit convention.
Use with @commitlint/cli and @commitlint/prompt-cli.
Getting started
npm install --save-dev @commitlint/config-angular @commitlint/cli
echo "module.exports = {extends: ['@commitlint/config-angular']};" > commitlint.config.jsRules
Problems
The following rules are considered problems for @commitlint/config-angular and will yield a non-zero exit code when not met.
Consult docs/rules for a list of available rules.
type-enum
condition:
typeis found in valuerule:
alwaysvalue
[ 'build', 'ci', 'docs', 'feat', 'fix', 'perf', 'refactor', 'revert', 'style', 'test' ]
echo "foo: some message" # fails
echo "fix: some message" # passestype-case
- description:
typeis in casevalue - rule:
always - value
'lowerCase'
echo "FIX: some message" # fails
echo "fix: some message" # passestype-empty
- condition:
typeis empty - rule:
never
echo ": some message" # fails
echo "fix: some message" # passesscope-case
- condition:
scopeis in casevalue - rule:
always
'lowerCase'echo "fix(SCOPE): some message" # fails
echo "fix(scope): some message" # passessubject-case
- condition:
subjectis in one of the cases['sentence-case', 'start-case', 'pascal-case', 'upper-case'] - rule:
never
echo "fix(SCOPE): Some message" # fails
echo "fix(SCOPE): Some Message" # fails
echo "fix(SCOPE): SomeMessage" # fails
echo "fix(SCOPE): SOMEMESSAGE" # fails
echo "fix(scope): some message" # passes
echo "fix(scope): some Message" # passessubject-empty
- condition:
subjectis empty - rule:
never
echo "fix:" # fails
echo "fix: some message" # passessubject-full-stop
- condition:
subjectends withvalue - rule:
never - value
'.'echo "fix: some message." # fails
echo "fix: some message" # passessubject-exclamation-mark
- condition:
subjectmust not have a!before the:marker - rule:
never
The angular commit
convention
does not use a ! to define a breaking change in the commit subject. If you
want to use this feature please consider using the conventional commit
config.
header-max-length
- condition:
headerhasvalueor less characters - rule:
always - value
72echo "fix: some message that is way too long and breaks the line max-length by several characters" # fails
echo "fix: some message" # passesWarnings
The following rules are considered warnings for @commitlint/config-angular and will print warning messages when not met.
body-leading-blank
- condition: Body begins with blank line
- rule:
always