Skip to content

Starraider/commitlint_config-typo3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

commitlint/config-typo3

Donate GitHub GitHub issues Lint Code Base

This is a config file, if you want to use commitlint in TYPO3 projects, to make sure your commit messages are in the correct format as described in the TYPO3 documentation

If you use git at the command line

I would recommend to use typicode/husky:

yarn add husky --dev

or

npm install husky --save-dev

You also need commitlint, commitlint/config-conventional and @commitlint/parse:

yarn add commitlint --dev
yarn add @commitlint/config-conventional --dev
yarn add @commitlint/parse --dev

or

npm install --save-dev @commitlint/config-conventional @commitlint/cli @commitlint/parse

Create a .huskyrc file in the root folder of your project, which runs commitlint during the Git commit-msg hook:

{
    "hooks": {
        "commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
    }
}

Finally copy the commitlint.config.js to the root of your project and you are ready to go.

If you use git in Visual Studio Code

First go to the Extension-Manager in Visual Studio Code and install the extension "VSCode Conventional Commits".

To make our own commitlint.config.js work, you have to install commitlint/config-conventional. You can install it localy (which I recommend) or globaly:

yarn add @commitlint/config-conventional --dev

or

npm install --save-dev @commitlint/config-conventional

Finally copy the commitlint.config.js to the root of your project.

Restart Visual Studio Code and it should work.

Info on how to use "VSCode Conventional Commits" you can find in the documentation.

Known bugs

According to the TYPO3 documentation, there should be no colon ":" after the typ.

[TASK] Remove colon in pattern -> correct
[TASK]: Remove colon in pattern -> false

But the "VSCode Conventional Commits" plugin for Visual Studio Code puts always a colon between the typ and the subject. Therefore the headerPattern has to tolerate the colon.

Additional resources

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published