Skip to content

Commit

Permalink
chore(package)!: use conventionalcommits preset
Browse files Browse the repository at this point in the history
Instead of using angular's preset, use conventionalcommits preset to
ensure we're following the Conventional Commits standard.
  • Loading branch information
mmarchini committed Jul 1, 2020
1 parent 4bc7ba7 commit 2906547
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 4 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/commitlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Conventional Commit Linter
on:
push:
branches:
- master
pull_request:

jobs:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js v12
uses: actions/setup-node@v1
with:
node-version: v12
- run: npm install
- run: npx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }}
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,12 @@ clean: ## Cleans unit test coverage files and node_modules.

.PHONY: release-dry
release-dry: $(NODE_MODULES) $(UNLEASH) ## Dry run of `release` target
@$(UNLEASH) -d --type=$(shell $(CONVENTIONAL_RECOMMENDED_BUMP) -p angular)
@$(UNLEASH) -d --type=$(shell $(CONVENTIONAL_RECOMMENDED_BUMP) -p conventionalcommits)


.PHONY: release
release: $(NODE_MODULES) $(UNLEASH) security ## Versions, tags, and updates changelog based on commit messages
@$(UNLEASH) --type=$(shell $(CONVENTIONAL_RECOMMENDED_BUMP) -p angular) --no-publish
@$(UNLEASH) --type=$(shell $(CONVENTIONAL_RECOMMENDED_BUMP) -p conventionalcommits) --no-publish
@$(NPM) publish


Expand Down
8 changes: 8 additions & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
'use strict'

module.exports = {
extends: ['@commitlint/config-conventional'],
rules : {
'scope-case': [2, 'always', ['lower-case', 'pascal-case']]
}
};
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,11 @@
"test": "make test"
},
"devDependencies": {
"@commitlint/cli": "^9.0.1",
"@commitlint/config-conventional": "^9.0.1",
"chai": "^4.2.0",
"conventional-changelog-angular": "^5.0.0",
"conventional-recommended-bump": "^4.0.0",
"conventional-changelog-conventionalcommits": "^4.3.0",
"conventional-recommended-bump": "^6.0.9",
"coveralls": "^3.0.2",
"eslint": "^4.19.1",
"jscs": "^3.0.7",
Expand Down

0 comments on commit 2906547

Please sign in to comment.