Skip to content

Commit

Permalink
refactor(lint): add commit lint scope validation
Browse files Browse the repository at this point in the history
  • Loading branch information
Natalie-Smirnova committed Feb 14, 2024
1 parent 93f6e42 commit ca8d5b6
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 5 deletions.
11 changes: 6 additions & 5 deletions .commitlintrc.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
extends:
- "@commitlint/config-conventional"
rules:
header-max-length: [1, 'always', 120]
body-max-length: [1, 'always', 150]
body-max-line-length: [1, 'always', 150]
footer-max-line-length: [1, 'always', 120]
subject-case: [1, 'never', ['sentence-case', 'start-case', 'pascal-case', 'upper-case']]
header-max-length: [ 1, 'always', 120 ]
body-max-length: [ 1, 'always', 150 ]
body-max-line-length: [ 1, 'always', 150 ]
footer-max-line-length: [ 1, 'always', 120 ]
subject-case: [ 1, 'never', [ 'sentence-case', 'start-case', 'pascal-case', 'upper-case' ] ]
scope-enum: [ 2, 'always', [ 'esl-a11y-group', 'esl-alert', 'esl-animate', 'esl-base-element', 'esl-carousel','esl-event-listener','esl-footnotes','esl-forms','esl-image','esl-media','esl-media-query','esl-mixin-element','esl-open-state','esl-panel','esl-panel-group','esl-popup','esl-random-text','esl-related-target','esl-scrollbar','esl-share','esl-tab','esl-toggleable','esl-tooltip','esl-traversing-query','esl-trigger','esl-utils', 'site', 'deps', 'lint' ] ]
47 changes: 47 additions & 0 deletions docs/COMMIT_CONVENTION.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,3 +163,50 @@ Update of css rules order.
Close PR #123.
```

### \<scope\>

Scope is an optional part of your commit message.

Utilize a scope to clarify the area of changes.

Scope should be enclosed in parentheses after the type but before :.

Scope should be in lowercase.
```text
fix(esl-utils): Fixed IE compatibility for scroll type detection
```

**Permissible Scope Values**

To ensure consistency and clarity in commit messages, the following are the permissible scope values:

- esl-a11y-group
- esl-alert
- esl-animate
- esl-base-element
- esl-carousel
- esl-event-listener
- esl-footnotes
- esl-forms
- esl-image
- esl-media
- esl-media-query
- esl-mixin-element
- esl-open-state
- esl-panel
- esl-panel-group
- esl-popup
- esl-random-text
- esl-related-target
- esl-scrollbar
- esl-share
- esl-tab
- esl-toggleable
- esl-tooltip
- esl-traversing-query
- esl-trigger
- esl-utils
- site
- deps
- lint

0 comments on commit ca8d5b6

Please sign in to comment.