refactor: add suupport for "story" commits

This commit is contained in:
Hossein Mehrabi 2023-02-09 13:56:37 +03:30
parent 3ed81a2840
commit a6de9ed280
3 changed files with 60 additions and 10 deletions

53
.czrc Normal file
View File

@ -0,0 +1,53 @@
{
"path": "node_modules/cz-conventional-changelog",
"types": {
"feat": {
"description": "A new feature",
"title": "Features"
},
"fix": {
"description": "A bug fix",
"title": "Bug Fixes"
},
"docs": {
"description": "Documentation only changes",
"title": "Documentation"
},
"style": {
"description": "Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)",
"title": "Styles"
},
"refactor": {
"description": "A code change that neither fixes a bug nor adds a feature",
"title": "Code Refactoring"
},
"perf": {
"description": "A code change that improves performance",
"title": "Performance Improvements"
},
"test": {
"description": "Adding missing tests or correcting existing tests",
"title": "Tests"
},
"build": {
"description": "Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)",
"title": "Builds"
},
"ci": {
"description": "Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)",
"title": "Continuous Integrations"
},
"chore": {
"description": "Other changes that don't modify src or test files",
"title": "Chores"
},
"revert": {
"description": "Reverts a previous commit",
"title": "Reverts"
},
"story": {
"title": "Storybook",
"description": "Changes to Storybook configuration or stories"
}
}
}

7
commitlint.config.js Normal file
View File

@ -0,0 +1,7 @@
const config = require('@commitlint/config-conventional')
const types = config.rules['type-enum'][2]
config.rules['type-enum'][2] = ['story'].concat(types)
module.exports = config

View File

@ -24,17 +24,7 @@
"packages/*", "packages/*",
"apps/*" "apps/*"
], ],
"commitlint": {
"extends": [
"@commitlint/config-conventional"
]
},
"lint-staged": { "lint-staged": {
"*": "yarn run format:fix" "*": "yarn run format:fix"
},
"config": {
"commitizen": {
"path": "node_modules/cz-conventional-changelog"
}
} }
} }