https://github.com/leotabosa/commitlint-example
Commitlint prototyping and examples
https://github.com/leotabosa/commitlint-example
commit commitlint git hacktoberfest hacktoberfest2021 lint linting
Last synced: about 1 month ago
JSON representation
Commitlint prototyping and examples
- Host: GitHub
- URL: https://github.com/leotabosa/commitlint-example
- Owner: leotabosa
- License: mit
- Created: 2021-03-28T03:32:14.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2023-07-12T15:41:16.000Z (almost 3 years ago)
- Last Synced: 2025-07-05T03:41:14.890Z (12 months ago)
- Topics: commit, commitlint, git, hacktoberfest, hacktoberfest2021, lint, linting
- Language: JavaScript
- Homepage:
- Size: 186 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

# Instructions
Clone this repo with:
```bash
git clone git@github.com:leotabosa/commitlint-example.git
```
Install all dependencies with:
```bash
yarn install
```
Now add a file:
```bash
echo "hello" >> temp_file
```
Stage the file and commit (this should fail):
```bash
git add temp_file
git commit -m "testing"
```
Why?
```js
return [
String(header).startsWith("#"),
`${error}Commit message should start with '#NNNNN' (task number).`,
];
```
Now commit with a message matching the expected pattern:
```bash
git commit -m "#1 - Testing"
```