|
1 |
| -# commitlint-config |
| 1 | +# @onify/commitlint-config |
| 2 | + |
| 3 | +Shareable `commitlint` config enforcing [Conventional Commits](https://www.conventionalcommits.org/) thru extension of [@commitlint/config-conventional](https://github.com/conventional-changelog/commitlint/tree/master/@commitlint/config-conventional). Use with [@commitlint/cli](https://www.npmjs.com/package/@commitlint/cli). |
| 4 | + |
| 5 | +## Installation |
| 6 | + |
| 7 | +```console |
| 8 | +npm install @commitlint/cli https://github.com/onify/commitlint-config.git |
| 9 | +``` |
| 10 | + |
| 11 | +## Usage |
| 12 | + |
| 13 | +Best used with [husky](https://typicode.github.io/husky) as a `commit-msg` hook. |
| 14 | + |
| 15 | +### With a dedicated Commitlint Config |
| 16 | + |
| 17 | +Create a `commitlint.config.js` file on the root directory and extend with this package: |
| 18 | + |
| 19 | +```js |
| 20 | +module.exports = { |
| 21 | + extends: ['@onify'], |
| 22 | +}; |
| 23 | +``` |
| 24 | + |
| 25 | +### With package.json |
| 26 | + |
| 27 | +In the `package.json` of your project |
| 28 | + |
| 29 | +```json |
| 30 | +{ |
| 31 | + "commitlint": { |
| 32 | + "extends": ["@onify"], |
| 33 | + } |
| 34 | +} |
| 35 | +``` |
| 36 | + |
| 37 | +## Valid Types |
| 38 | + |
| 39 | +| Type | Description | |
| 40 | +| --------- | --------------------------------------------------------------------------------------------------------------- | |
| 41 | +| build | Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm) | |
| 42 | +| chore | Changes to the build process or auxiliary tools and libraries such as documentation generation | |
| 43 | +| ci | Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs) | |
| 44 | +| **ui** | Changes that only affects the UI | |
| 45 | +| docs | Documentation only changes | |
| 46 | +| **dx** | Any changes or addition that improves developer experience | |
| 47 | +| feat | A new feature | |
| 48 | +| fix | A bug fix | |
| 49 | +| **infra** | Changes to any infrastructure configuration files and/or scripts (example scopes: aws, heroku, azure, nginx) | |
| 50 | +| perf | A code change that improves performance | |
| 51 | +| refactor | A code change that neither fixes a bug nor adds a feature | |
| 52 | +| revert | [Read here](https://www.conventionalcommits.org/en/v1.0.0/#how-does-conventional-commits-handle-revert-commits) | |
| 53 | +| style | Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc) | |
| 54 | +| test | Adding missing tests or correcting existing tests | |
| 55 | +| **wip** | Work in progress. For partial progress that you want to sync on the remote repo. | |
| 56 | + |
| 57 | + |
| 58 | +**Note:** Descriptions taken directly from [Angular's Commit Message Type Guidelines](https://github.com/angular/angular/blob/22b96b9/CONTRIBUTING.md#type) except for types that are in **bold** characters as they are new types added by this config. |
0 commit comments