Skip to content

Commit

Permalink
chore: install and configure commitlint
Browse files Browse the repository at this point in the history
  • Loading branch information
poulet42 committed Dec 4, 2023
1 parent 44b5b50 commit 6f01225
Show file tree
Hide file tree
Showing 5 changed files with 543 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
* `cd ember-amount-input`
* `pnpm install`

## Conventional Commits

This repository enforces conventional commits through Git hooks and `commitlint`. Thus, your commits must follow the [Conventional Commits spec](https://www.conventionalcommits.org/en/v1.0.0/) and `@commitlint/config-conventional` [rules](https://github.com/conventional-changelog/commitlint/tree/master/%40commitlint/config-conventional#rules).

## Linting

* `pnpm lint`
Expand Down
9 changes: 9 additions & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
"use strict";

module.exports = {
extends: ["@commitlint/config-conventional"],
rules: {
"body-leading-blank": [2, "always"],
"footer-leading-blank": [2, "always"],
},
};
4 changes: 4 additions & 0 deletions lefthook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
commit-msg:
commands:
commitlint:
run: pnpm commitlint --edit $1
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,20 @@
"lint": "pnpm --filter '*' lint",
"lint:fix": "pnpm --filter '*' lint:fix",
"lint:types": "pnpm --filter '*' lint:types",
"postinstall": "lefthook install",
"prepare": "pnpm build",
"start": "concurrently 'pnpm:start:*' --restart-after 5000 --prefix-colors cyan,white,yellow",
"start:addon": "pnpm --filter ember-amount-input start",
"start:test-app": "pnpm --filter test-app start",
"test": "pnpm --filter '*' test"
},
"devDependencies": {
"@commitlint/cli": "^18.4.3",
"@commitlint/config-conventional": "^18.4.3",
"@release-it-plugins/lerna-changelog": "^6.0.0",
"@release-it-plugins/workspaces": "^4.0.0",
"concurrently": "^8.2.2",
"lefthook": "^1.5.5",
"prettier": "^3.1.0",
"release-it": "^16.2.1"
},
Expand Down
Loading

0 comments on commit 6f01225

Please sign in to comment.