@wr-projects/commitlint-config
v0.0.2
Published
π Lint commit messages
Downloads
3
Maintainers
Readme
Welcome to the @wr-projects/commitlint-config
Table Of Contents
- About the project
- Setup
- Examples
- Format
- Rules
- Code Of Conduct
- How to contribute ?
- Contributors
- Project Owner
- Follow us
- License
About the project
Shareable commitlint
config enforcing the Angular commit convention. Use with @commitlint/cli
Setup
pnpm install --save-dev @commitlint/cli @wr-projects/commitlint-config
echo "module.exports = {extends: ['@wr-projcts/commitlint-config']};" > .commitlintrc.js
Examples
β¨ feat(blog): add comment section
Format
<emoji> <type>(<scope>): <subject>
<BLANK LINE>
<body>
<BLANK LINE>
<footer>
Rules
Problems
The following rules are considered problems for and will yield a non-zero exit code when not met. Consult docs/rules for a list of available rules.
type-enum
- Condition: is found in value
type
- Rule:
always
- Value
[
"π init",
"π tag",
"β¨ feat",
"π bug",
"π₯ breaking",
"π critical",
"π©Ή fix",
"π§ wip",
"π comment",
"π permissions",
"π roles",
"π security",
"π secrets",
"π design",
"π¨ animations",
"π¨ transitions",
"π improve",
"π perf",
"β»οΈ refactor",
"βΏ accessibility",
"π» desktop",
"π± mobile",
"π±π» responsive",
"π windows",
"π macOS",
"π§ linux",
"π§ͺ test",
"β addingtest",
"π¦ build",
"π deploy",
"π· ci",
"π devscripts",
"π docs",
"π internationalize",
"π i18n",
"π localisation",
"π metadata",
"π lint",
"ποΈ architectural",
"β‘ generalupdate",
"β¬οΈ upgrade",
"β¬οΈ downgrade",
"β add",
"π₯ remove",
"π move",
"π rename",
"β adddep",
"βremovedep",
"π₯ contributor",
"π³ docker",
"π§ configfile",
"π½ api",
"π licence",
"π± assets",
"βοΈ gitfile",
"πΈ snapshots",
"βοΈ experiments",
"ποΈ seo",
"ποΈ database",
"π merge",
"πneedforks",
"β°οΈ dead",
"ποΈ bad"
]
echo "foo: some message" # fails
echo "π©Ή fix: some message" # passes
type-case
- Condition: is in case
type
value
- Rule:
always
- Value
'lowercase'
echo "FIX: some message" # fails
echo "π©Ή FIX: some message" # fails
echo "π©Ή fix: some message" # passes
type-empty
- Condition: is empty
type
- Rule:
never
echo ": some message" # fails
echo "π©Ή: some message" # fails
echo "π©Ή fix: some message" # passes
scope-case
- Condition: is in case
scope
value
- Rule:
always
'lowercase'
echo ": some message" # fails
echo "π©Ή: some message" # fails
echo "π©Ή fix: some message" # passes
subject-case
- Condition: is in on of the cases
subject
['sentence-case', 'start-case', 'pascale-case', 'upper-case']
- Rule:
never
echo "π©Ή fix(SCOPE): Some message" # fails
echo "π©Ή fix(SCOPE): Some Message" # fails
echo "π©Ή fix(SCOPE): SomeMessage" # fails
echo "π©Ή fix(SCOPE): SOMEMESSAGE" # fails
echo "π©Ή fix(scope): some message" # passes
echo "π©Ή fix(scope): some Message" # passes
subject-empty
- Condition: is empty
subject
- Rule:
never
echo "π©Ή fix:" # fails
echo "π©Ή fix: some message" # passes
subject-full-stop
- Condition: ends with
subject
value
- Rule:
never
- Value
'.'
echo "π©Ή fix: some message." # fails
echo "π©Ή fix: some message" # passes
subject-exclamation-mark
- Condition: must not have a before the marker
subject
!
:
- Rule:
never
header-max-length
- Condition: has or less characters
header
value
- Rule:
always
- Value
72
echo "π©Ή fix: some message that is way too long and breaks the line max-length by several characters" # fails
echo "π©Ή fix: some message" # passes
body-leading-blank
- Condition: Body should have a leading blank line
- Rule:
always
echo "π©Ή fix: some message
body" # fails
echo "π©Ή fix: some message
body" # passes
footer-leading-blank
- Condition: Footer should have a leading blank line
- Rule:
always
echo "π©Ή fix: some message
BREAKING CHANGE: It will be significant" # fails
echo "π©Ή fix: some message
BREAKING CHANGE: It will be significant" # passes
Code Of Conduct
Please read the Code Of Conduct before interacting with the project.
How to contribute ?
In your case, to start contributing, please fork @wr-projects/utils
and start working on your part.
Later, feel free to contribute a Pull Request, we will be pleased to review it with you.
Contributors
Project Owner
| | | -------------------------------------------------- | | GrΓ©goire FAVREAU |
Follow us
License
Copyright (c) WRProjects Community