1.6.0 • Published 2 years ago

commitlint-config-aron v1.6.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Getting Started

Skip if you have already run npm install aronrepo:

npm install commitlint-config-aron -D

Configuration

Create a .commitlintrc.yml file in your project root and extend aron:

extends: aron

Set up Husky

Use Husky to register Git Hooks to automatically check whether it is legal before committing.

npx husky install
npx husky add .husky/commit-msg 'npx --no -- commitlint --edit ${1}'

Check if the .husky is successfully generated in the project root:

+ └── .husky
+     ├─── _
+     └─── commit-msg

From now on, you just need to commit; the check happens after the commit. If everything is legal, there will be no prompts.

package.json

Pre-commit checks via Git Hook are only enabled when other team members clone the project and run npm install.

Save commit-check and husky install commands for teamwork and CI:

{
    "scripts": {
        "install": "husky install",
        "commit-check": "commitlint --from=HEAD~1 --verbose"
    }
}

npm run commit-check:

Continuous Integration

Typically, you double-check commits before publishing and on relevant workflows, using GitHub Actions as an example:

Create a workflow for commit check /.github/workflows/commit-check.yml:

name: Commit Check
on:
    push:
        branches:
            - '**'
    pull_request_target:
        types:
            - opened
            - reopened
            - edited
            - synchronize

jobs:
    check:
        timeout-minutes: 15
        runs-on: ubuntu-20.04
        strategy:
            matrix:
                node-version: [18.12.1]
        steps:
            - uses: actions/checkout@v3
              with:
                  fetch-depth: 0
            - uses: actions/setup-node@v3
              with:
                  node-version: ${{ matrix.node-version }}
                  cache: 'npm'
            - run: npm ci
            - run: npm run commit-check

Commit Header Format

The header has a particular format that includes a Type, a Target, and a Summary:

Type(Target): Summary
  ┊     ┊
  ┊     └─⫸ Target: Workspace, Package or Role
  ┊
  └─⫸ Type: Bump, Feat, New, Perf, Add, Update, Improve, Fix, Depreciate, Drop, Docs, Upgrade, Revert, Example, Test, Refactor, Chore, Misc

For the full documentation, check out the Aron's conventional commits

1.4.6

2 years ago

1.4.5

2 years ago

1.4.4

2 years ago

1.4.3

2 years ago

1.6.0

2 years ago

1.4.2

2 years ago

1.4.1

2 years ago

1.4.0

2 years ago

1.3.10

2 years ago

1.3.11

2 years ago

1.3.9

2 years ago

1.3.8

2 years ago

1.3.7

2 years ago

1.3.6

2 years ago

1.3.5

2 years ago

1.5.2

2 years ago

1.3.4

2 years ago

1.5.1

2 years ago

1.3.3

2 years ago

1.5.0

2 years ago

1.4.7

2 years ago

1.3.2

2 years ago

1.3.1

2 years ago

1.3.0

2 years ago

1.2.0

2 years ago

1.2.1

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.0-beta.51

2 years ago

1.0.0-beta.52

2 years ago

1.0.0-beta.50

3 years ago

1.0.0-beta.44

3 years ago

1.0.0-beta.45

3 years ago

1.0.0-beta.42

3 years ago

1.0.0-beta.43

3 years ago

1.0.0-beta.40

3 years ago

1.0.0-beta.41

3 years ago

1.0.0-beta.48

3 years ago

1.0.0-beta.49

3 years ago

1.0.0-beta.46

3 years ago

1.0.0-beta.47

3 years ago

1.0.1-beta.2

2 years ago

1.0.1-beta.1

2 years ago

1.0.1-beta.6

2 years ago

1.0.1-beta.5

2 years ago

1.0.1-beta.4

2 years ago

1.0.1-beta.3

2 years ago

1.0.0-beta.34

3 years ago

1.0.0-beta.39

3 years ago

1.0.0-beta.37

3 years ago

1.0.0-beta.38

3 years ago

1.0.0-beta.35

3 years ago

1.0.0-beta.36

3 years ago

1.0.0-beta.33

3 years ago

1.0.0-beta.32

3 years ago

1.0.0-beta.31

3 years ago

1.0.0-beta.30

3 years ago

1.0.0-beta.29

3 years ago

1.0.0-beta.28

3 years ago

1.0.0-beta.27

3 years ago

1.0.0-beta.26

3 years ago

1.0.0-beta.25

3 years ago

1.0.0-beta.24

3 years ago

1.0.0-beta.23

3 years ago

1.0.0-beta.22

3 years ago

1.0.0-beta.21

3 years ago

1.0.0-beta.20

3 years ago

1.0.0-beta.19

3 years ago

1.0.0-beta.18

3 years ago

1.0.0-beta.17

3 years ago

1.0.0-beta.16

3 years ago

1.0.0-beta.15

3 years ago

1.0.0-beta.14

3 years ago

1.0.0-beta.11

3 years ago

1.0.0-beta.10

3 years ago

1.0.0-beta.9

3 years ago

1.0.0-beta.8

3 years ago

1.0.0-beta.7

3 years ago

1.0.0-beta.6

3 years ago

1.0.0-beta.5

3 years ago

1.0.0-beta.4

3 years ago

1.0.0-beta.3

3 years ago

1.0.0-beta.2

3 years ago

1.0.0-beta.1

3 years ago