Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 9 additions & 35 deletions commitlint.config.cjs
Original file line number Diff line number Diff line change
@@ -1,42 +1,16 @@
/**
* Custom config for commitlint based on Linchpin needs/conventions.
* Commit linting for this project.
*
* This config only slightly modifies the default config to allow for "improve" as a type
* and adds support for ClickUp or Github issue numbers in the commit message.
* The rules live in @linchpinagency/commitlint-config so every Linchpin project
* lints commits the same way and a convention change ships from one place
* instead of drifting per repo.
*
* Format Example
* Format example
*
* feat(LINCHPIN-4850): Add new feature or GitHub issue number or NO-TASK if cowboying it on the fly.
* feat(PROJ-123): Add new feature
*
* or, with no task, NO-TASK or a GitHub issue number such as #42.
*/
module.exports = {
extends: ["@commitlint/config-conventional"],
rules: {
'type-enum': [
2,
'always',
[
'improve',
'build',
'chore',
'ci',
'docs',
'feat',
'fix',
'perf',
'refactor',
'revert',
'style',
'test',
'update',
],
],
'subject-case': [1, 'always', ['sentence-case']],
},
parserPreset: {
parserOpts: {
headerPattern:
/^(improve|build|ci|feat|fix|docs|style|revert|perf|refactor|test|chore)\(((?:[A-Z]+-\d+)|(?:NO-TASK)|(?:\#\d+))\):\s?([\w\d\s,\-]*)/,
headerCorrespondence: ['type', 'scope', 'subject'],
},
}
extends: [ '@linchpinagency/commitlint-config' ],
};
15 changes: 15 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"@commitlint/cli": "^21.0.0",
"@commitlint/config-conventional": "^21.0.0",
"@inquirer/prompts": "^8.2.1",
"@linchpinagency/commitlint-config": "^1.2.0",
"@types/node": "^24.0.0",
"@vercel/detect-agent": "^1.2.4",
"commander": "^15.0.0",
Expand Down