@gitmoji/parser-opts

gitmoji styles commit parser options

Usage no npm install needed!

<script type="module">
  import gitmojiParserOpts from 'https://cdn.skypack.dev/@gitmoji/parser-opts';
</script>

README

@gitmoji/parser-opts

NPM version NPM downloads

a shareable parser options for gitmoji styles commit

this package is used in both conventional-changelog-gitmoji-config and commitlint-config-gitmoji

Sources

Header regex pattern test here : Regex101

module.exports = {
  headerPattern: /^(?::\w*:|(?:\ud83c[\udf00-\udfff])|(?:\ud83d[\udc00-\ude4f\ude80-\udeff])|[\u2600-\u2B55])\s(?<type>\w*)(?:\((?<scope>.*)\))?!?:\s(?<subject>(?:(?!#).)*(?:(?!\s).))\s?(?<ticket>#\d*)?$/,
  headerCorrespondence: ['type', 'scope', 'subject', 'ticket'],
};

License

MIT ® Arvin Xu