Skip to content

Commit

Permalink
chore(GGM-30): add config for commitlint
Browse files Browse the repository at this point in the history
  • Loading branch information
krzysztofbranecki committed Feb 29, 2024
1 parent f2166d2 commit aec9154
Show file tree
Hide file tree
Showing 7 changed files with 3,696 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
.idea

/node_modules
1 change: 1 addition & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npm run commitlint ${1}
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v20.10.0
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
## How to work with repository

### Requirements
- Node.js in version 20
(if you have the oldest version, you can use [nvm](https://nvm.sh) )

In this project, we use semantic release.
Before starting working with package, you should run ``yarn install``
in your project directory to prepare husky configuration for commitlint

More info:
CommitLint concept: https://commitlint.js.org/concepts/commit-conventions.html
Husky documentation: https://typicode.github.io/husky/

## How to work with package
### Requirements
- Node.js in version 16

### Setup
- go to package directory: ``cd ./package``
- run ``npm install`` or ``yarn install``
- run ``npm run watch`` or ``yarn watch``
14 changes: 14 additions & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
module.exports = {
extends: ['@commitlint/config-conventional'],
rules: {
'subject-case': [
2,
'never',
[
'upper-case',
'pascal-case',
'start-case',
]
]
}
};
22 changes: 22 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "block-react-parser-new",
"version": "0.1.0",
"scripts": {
"prepare": "husky",
"postinstall": "husky",
"pre-commit": "lint-staged",
"commitlint": "commitlint --edit"
},
"devDependencies": {
"@commitlint/config-conventional": "^19.0.3",
"@semantic-release/commit-analyzer": "^11.1.0",
"@semantic-release/exec": "^6.0.3",
"@semantic-release/git": "^10.0.1",
"@semantic-release/github": "^9.2.6",
"@semantic-release/npm": "^11.0.2",
"commitlint": "^19.0.3",
"husky": "^9.0.11",
"semantic-release": "^23.0.2"
},
"prepare": "husky"
}
Loading

0 comments on commit aec9154

Please sign in to comment.