Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ccnnde/commitlint-config-git-commit-emoji
Shareable commitlint config for the VS Code extension git-commit-plugin with emoji enabled
https://github.com/ccnnde/commitlint-config-git-commit-emoji
angular commit commitlint commitlint-config emoji git
Last synced: about 2 months ago
JSON representation
Shareable commitlint config for the VS Code extension git-commit-plugin with emoji enabled
- Host: GitHub
- URL: https://github.com/ccnnde/commitlint-config-git-commit-emoji
- Owner: ccnnde
- License: mit
- Created: 2021-12-12T04:22:08.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2021-12-12T05:45:38.000Z (about 3 years ago)
- Last Synced: 2024-10-26T03:07:19.139Z (about 2 months ago)
- Topics: angular, commit, commitlint, commitlint-config, emoji, git
- Language: JavaScript
- Homepage:
- Size: 2.93 KB
- Stars: 9
- Watchers: 1
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# commitlint-config-git-commit-emoji
[![npm latest][version-img]][pkg-url]
[![download][download-img]][pkg-url]
[![MIT][license-img]](LICENSE)Shareable `commitlint` config for the VS Code extension [git-commit-plugin](https://github.com/RedJue/git-commit-plugin) with emoji enabled.
Use with [commitlint](https://github.com/conventional-changelog/commitlint).## Getting started
```sh
npm install --save-dev @commitlint/cli commitlint-config-git-commit-emojiecho "module.exports = {extends: ['git-commit-emoji']};" > .commitlintrc.js
```## Format
```text
():```
### Example
```text
โจ feat(blog): add comment section
```## Rules
### Problems
The following rules are considered problems for `commitlint-config-git-commit-emoji` and will yield a non-zero exit code when not met.
Consult [docs/rules](https://conventional-changelog.github.io/commitlint/#/reference-rules) for a list of available rules.#### type-enum
- **condition**: `type` is found in value
- **rule**: `always`
- **value**```text
[
'๐ init',
'โจ feat',
'๐ fix',
'๐ docs',
'๐ style',
'๐ฆ refactor',
'๐ perf',
'๐งช test',
'๐ง build',
'๐ ci',
'๐ณ chore',
'โฉ revert',
]
``````sh
echo "foo: some message" # fails
echo "๐ fix: some message" # passes
```#### type-case
- **description**: `type` is in case `value`
- **rule**: `always`
- **value**```text
'lowerCase'
``````sh
echo "FIX: some message" # fails
echo "๐ fix: some message" # passes
```#### type-empty
- **condition**: `type` is empty
- **rule**: `never````sh
echo ": some message" # fails
echo "๐ fix: some message" # passes
```#### scope-case
- **condition**: `scope` is in case `value`
- **rule**: `always````text
'lowerCase'
``````sh
echo "๐ fix(SCOPE): some message" # fails
echo "๐ fix(scope): some message" # passes
```#### subject-case
- **condition**: `subject` is in one of the cases `['sentence-case', 'start-case', 'pascal-case', 'upper-case']`
- **rule**: `never````sh
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" # passes
```#### subject-empty
- **condition**: `subject` is empty
- **rule**: `never````sh
echo "๐ fix:" # fails
echo "๐ fix: some message" # passes
```#### subject-full-stop
- **condition**: `subject` ends with `value`
- **rule**: `never`
- **value**```text
'.'
``````sh
echo "๐ fix: some message." # fails
echo "๐ fix: some message" # passes
```#### subject-exclamation-mark
- **condition**: `subject` must not have a `!` before the `:` marker
- **rule**: `never`The [angular commit
convention](hhttps://github.com/angular/angular/blob/master/CONTRIBUTING.md#commit)
dose 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](https://github.com/conventional-changelog/commitlint/tree/master/%40commitlint/config-conventional#commitlintconfig-conventional).#### header-max-length
- **condition**: `header` has `value` or less characters
- **rule**: `always`
- **value**```text
72
``````sh
echo "๐ fix: some message that is way too long and breaks the line max-length by several characters" # fails
echo "๐ fix: some message" # passes
```#### body-leading-blank
- **condition**: Body should have a leading blank line
- **rule**: `always````sh
echo "๐ fix: some message
body" # failsecho "๐ fix: some message
body" # passes
```#### footer-leading-blank
- **condition**: Footer should have a leading blank line
- **rule**: `always````sh
echo "๐ fix: some message
BREAKING CHANGE: It will be significant" # failsecho "๐ fix: some message
BREAKING CHANGE: It will be significant" # passes
```## Thanks
- Header regex pattern modified from [@gitmoji/parser-opts](https://github.com/arvinxx/gitmoji-commit-workflow/blob/master/packages/parser-opts/README.md)
- Most of the rules come from [@commitlint/config-angular](https://github.com/conventional-changelog/commitlint/blob/master/%40commitlint/config-angular/README.md)## License
[MIT](LICENSE) ยฉ Nor Cod
[pkg-url]: https://www.npmjs.com/package/commitlint-config-git-commit-emoji
[version-img]: https://img.shields.io/npm/v/commitlint-config-git-commit-emoji?color=deepgreen&style=flat-square
[download-img]: https://img.shields.io/npm/dm/commitlint-config-git-commit-emoji?style=flat-square
[license-img]: https://img.shields.io/badge/license-MIT-blue?style=flat-square