Skip to main content

Conventional Commits Readme

Conventional commits documentation for README.md

––– views

Conventional Commits is a specification for adding human and machine readable meaning to commit messages.

See more explanation about Conventional Commits.

This code snippets usually added to README.md on my collaborative projects.

English

## Commit Message Convention
 
This website follows [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/)
 
Commit message will be checked using [husky and commit lint](https://minhubfolio.vercel.app/library/husky-commitlint-prettier), you can't commit if not using the proper convention below.
 
### Format
 
`<type>(optional scope): <description>`
Example: `feat(pre-event): add speakers section`
 
### 1. Type
 
Available types are:
 
- feat → Changes about addition or removal of a feature. Ex: `feat: add table on landing page`, `feat: remove table from landing page`
- fix → Bug fixing, followed by the bug. Ex: `fix: illustration overflows in mobile view`
- docs → Update documentation (README.md)
- style → Updating style, and not changing any logic in the code (reorder imports, fix whitespace, remove comments)
- chore → Installing new dependencies, or bumping deps
- refactor → Changes in code, same output, but different approach
- ci → Update github workflows, husky
- test → Update testing suite, cypress files
- revert → when reverting commits
- perf → Fixing something regarding performance (deriving state, using memo, callback)
- vercel → Blank commit to trigger vercel deployment. Ex: `vercel: trigger deployment`
 
### 2. Optional Scope
 
Labels per page Ex: `feat(pre-event): add date label`
 
\*If there is no scope needed, you don't need to write it
 
### 3. Description
 
Description must fully explain what is being done.
 
Add BREAKING CHANGE in the description if there is a significant change.
 
**If there are multiple changes, then commit one by one**
 
- After colon, there are a single space Ex: `feat: add something`
- When using `fix` type, state the issue Ex: `fix: file size limiter not working`
- Use imperative, and present tense: "change" not "changed" or "changes"
- Don't use capitals in front of the sentence
- Don't add full stop (.) at the end of the sentence

Bahasa Indonesia

## Commit Message Convention
 
This website follows [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/)
 
Commit message akan dicek menggunakan [husky and commit lint](https://minhubfolio.vercel.app/library/husky-commitlint-prettier), jika convention salah, maka tidak bisa melakukan commit
 
### Format
 
`<type>(optional scope): <description>`
Contoh: `feat(pre-event): add speakers section`
 
### 1. Type
 
Type yang bisa digunakan adalah:
 
- feat → Jika ada penambahan/pengurangan fitur codingan. Contoh: `feat: add table on landing page`, `feat: remove table from landing page`
- fix → Jika ada bug fixing, diikuti dengan bugnya. Contoh: `fix: illustration overflows in mobile view`
- docs → Update documentation (README.md)
- style → Update style, tidak mengubah logic sama sekali (reorder import, fix whitespace, remove comment)
- chore → Jika menginstall, mengupdate dependecies
- refactor → Jika ada perubahan code, dengan end result yang sama, tetapi approach berbeda yang lebih baik.
- ci → Update github workflows, husky
- test → Update testing suite
- revert → Ketika melakukan revert commit
- perf → Fix sesuatu yang bersifat improve performance (derived state, memo)
- vercel → Jika ada commit kosong untuk trigger vercel deployment. Contoh: `vercel: trigger deployment`
 
### 2. Optional Scope
 
Contoh labeling per page `feat(pre-event): add date label`
 
\*Jika tidak ada scope, maka tidak perlu ditulis.
 
### 3. Description
 
Description harus bisa mendeskripsikan apa yang dikerjakan.
 
Tambahkan BREAKING CHANGE di description apabila ada perubahan yang signifikan.
 
**Jika ada beberapa hal yang dikerjakan, maka lakukan commit secara bertahap.**
 
- Setelah titik dua, ada spasi. Contoh: `feat: add something`
- Jika type `fix` langsung sebut issuenya. Contoh: `fix: file size limiter not working`
- Gunakan kata imperative, dan present tense: "change" bukan "changed" atau "changes"
- Jangan gunakan huruf kapital di awal kalimat description
- Jangan tambahkan titik di akhir description