From f781b79802252e733da1c60624c6b08620ed5435 Mon Sep 17 00:00:00 2001 From: alextilot Date: Mon, 22 May 2023 12:45:13 -0500 Subject: [PATCH] docs: revise conventional commit description --- CONTRIBUTING.md | 2 +- commitlint.config.js | 23 +++++++++++------------ 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2782777a..211c0fc6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -95,7 +95,7 @@ This project uses commit hooks to automate some tasks, and these are managed via #### Conventional commits -[Conventional commits](https://www.conventionalcommits.org/) is a standard format for commit messages, used to aid readability of commit history. This commit message format, with [these commit types](https://github.com/amelioro/ameliorate/blob/main/commitlint.config.js), is enforced in a commit hook via [commitlint](https://github.com/conventional-changelog/commitlint). +[Conventional commits](https://www.conventionalcommits.org/) is a standard format for commit messages, used to aid readability of commit history. The format is `[optional scope]: ` and an example commit message looks like `feat(header): add link to feedback page`. This commit message format, with [these commit types](https://github.com/amelioro/ameliorate/blob/main/commitlint.config.js), is enforced in a commit hook and github action via [commitlint](https://github.com/conventional-changelog/commitlint). #### Prettier diff --git a/commitlint.config.js b/commitlint.config.js index 5a928ecc..23f0d186 100644 --- a/commitlint.config.js +++ b/commitlint.config.js @@ -6,20 +6,19 @@ module.exports = { "type-enum": [ 2, "always", - // custom types should have comments explaining them [ - "build", - "chore", - "ci", - "docs", - "feat", - "fix", + "build", // modifies the build process / pipeline for the application + "chore", // is a catch-all for any change that doesn't fit into another category + "ci", // modifies the continuous integration pipeline + "docs", // adds or improves documentation + "feat", // adds new functionality + "fix", // fixes a bug "touchup", // small improvement, too small for "feat" or "refactor" - "perf", - "refactor", - "revert", - "style", - "test", + "perf", // improves performance without functionality changes + "refactor", // doesn't add functionality and doesn't fix a bug + "revert", // undoes a previous commit + "style", // does not affect the meaning of the code (white-space, formatting, missing semi-colons, etc) + "test", // updates testing ], ], },