# emoji-commit-helpers

> Commitlint and Commitizen helpers for working with Gitmoji

Latest version **0.1.1** (published 2020-01-15) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install emoji-commit-helpers
pnpm add emoji-commit-helpers
yarn add emoji-commit-helpers
bun add emoji-commit-helpers
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.1 |
| Published | 2020-01-15 |
| First published | 2020-01-15 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 6 |
| Unpacked size | 21.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | snugug |

## Links

- npm: https://www.npmjs.com/package/emoji-commit-helpers
- Repository: https://github.com/chromeos/static-site-scaffold-modules
- Homepage: https://github.com/chromeos/static-site-scaffold-modules#readme
- Issues: https://github.com/chromeos/static-site-scaffold-modules/issues
- npm.io page: https://npm.io/package/emoji-commit-helpers

## Dependencies (6)

- [fuse.js](https://npm.io/package/fuse.js.md) ^3.4.6
- [wrap-ansi](https://npm.io/package/wrap-ansi.md) ^6.2.0
- [import-cwd](https://npm.io/package/import-cwd.md) ^3.0.0
- [cosmiconfig](https://npm.io/package/cosmiconfig.md) ^6.0.0
- [emoji-regex](https://npm.io/package/emoji-regex.md) ^8.0.0
- [inquirer-autocomplete-prompt](https://npm.io/package/inquirer-autocomplete-prompt.md) ^1.0.1

## Recent versions

- 0.1.1 (latest) — 2020-01-15
- 0.1.0 — 2020-01-15

## README

# Emoji Commit Helpers

This module assist users in using the Emoji-style git commit format `:emoji: (scope) Subject`. It currently makes sharing emoji and scope possible between [Commitizen](https://www.npmjs.com/package/commitizen) and [Commitlint](https://www.npmjs.com/package/@commitlint/cli) easy and can automatically generate package-based scopes for [Lerna](https://www.npmjs.com/package/lerna) projects.

## Configuring Commitizen and Commitlint

### Commitizen

In `package.json`, add the following:

```json
{
  "config": {
    "commitizen": {
      "path": "./node_modules/emoji-commit-helpers/commitizen.js"
    }
  }
}
```

### Commitlint

In `.commitlintrc.js`, do the following:

```js
const config = require('emoji-commit-helpers/commitlint');

module.exports = config;
```

This will set all the rules, patterns, and helpers you need correctly. The commitlint configuration supports either the actual emoji or the emoji code (`:code:`).

### Run Both on Code Commit

To run both Commitizen (to prepare your commit message) and Commitlint (to ensure your commit message is formatted correctly) automatically, first install `husky`, `@commitlint/cli`, and `@commitizen`, then add the following to your `package.json` file:

```json
{
  "husky": {
    "hooks": {
      "prepare-commit-msg": "exec < /dev/tty && git-cz --hook || true",
      "commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
    }
  }
}
```

## Configuring Emoji Commit Helpers

To configure Emoji Commit Helpers, first add one of the following files:

- `.commitrc`
- `.commitrc.yml`
- `.commitrc.json`
- `.commitrc.js`

Then, configure either the types to include and/or the scopes:

```yml
emoji:
  - style
  - perf
  - prune
  - fix
  - quickfix
  - docs
  - feature
scopes:
  - name: Root
    description: Root of my project
  - name: Modules
    description: Project Modules
```

## Available Emoji

| Type         | Emoji | Code                  | Description                                |
| :----------- | :---: | :-------------------- | :----------------------------------------- |
| style        |  🎨   | `:art:`               | Improving structure / format of the code.  |
| perf         |  🐎   | `:racehorse:`         | Improving performance.                     |
| prune        |  🔥   | `:fire:`              | Removing code or files.                    |
| fix          |  🐛   | `:bug:`               | Fixing a bug.                              |
| quickfix     |  🚑   | `:ambulance:`         | Critical hotfix.                           |
| feature      |  🆕   | `:new:`               | Introducing new features.                  |
| docs         |  📝   | `:memo:`              | Writing docs.                              |
| deploy       |  🚀   | `:rocket:`            | Deploying stuff.                           |
| ui           |  💎   | `:gem:`               | Updating the UI and style files.           |
| init         |  🎉   | `:tada:`              | Initial commit.                            |
| test         |  ✅   | `:white_check_mark:`  | Adding tests.                              |
| security     |  🔒   | `:lock:`              | Fixing security issues.                    |
| release      |  🔖   | `:bookmark:`          | Releasing / Version tags.                  |
| lint         |  👕   | `:shirt:`             | Removing linter warnings.                  |
| wip          |  🚧   | `:construction:`      | Work in progress.                          |
| fix-ci       |  💚   | `:green_heart:`       | Fixing CI Build.                           |
| downgrade    |  ⬇️   | `:arrow_down:`        | Downgrading dependencies.                  |
| upgrade      |  ⬆️   | `:arrow_up:`          | Upgrading dependencies.                    |
| pushpin      |  📌   | `:pushpin:`           | Pinning dependencies to specific versions. |
| refactoring  |  ♻️   | `:recycle:`           | Refactoring code.                          |
| dep-add      |  ➕   | `:heavy_plus_sign:`   | Adding a dependency.                       |
| dep-rm       |  ➖   | `:heavy_minus_sign:`  | Removing a dependency.                     |
| config       |  🔧   | `:wrench:`            | Changing configuration files.              |
| compat       |  👽   | `:alien:`             | Updating code due to external API changes. |
| mv           |  🚚   | `:truck:`             | Moving or renaming files.                  |
| breaking     |  💥   | `:boom:`              | Introducing breaking changes.              |
| docs-code    |  💡   | `:bulb:`              | Documenting source code.                   |
| ux           |  🚸   | `:children_crossing:` | Improving user experience / usability.     |
| see-no-evil  |  🙈   | `:see_no_evil:`       | Adding or updating a .gitignore file       |
| camera-flash |  📸   | `:camera_flash:`      | Adding or updating snapshots               |
| experiment   |  🔮   | `:crystal_ball:`      | Experimenting new things                   |

---
_Source: https://npm.io/package/emoji-commit-helpers · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
