You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sharing configurations that use plugins does not work
We are trying to share a company-wide config so that we can easily have a standard linter with just one line in package.json. We want to use a plugin that adds a rule that otherwise doesn't exist.
I have tried our config in a test repo, and then it works great! Thanks for the great tool! ✅
When I publish the config on npm without the plugin, I can extend it from other projects. ✅
When I publish the config on npm with the plugin, committlint does not recognize the rule. ❌
The plugin is commitlint-plugin-subject and we use it to enforce that we can put a JIRA-issue at the beginning of a subject line. Like fix: DAZ-123 Remove bugs.
Expected Behavior
I expect the commit fix: DAZ-123 Remove bugs to pass, and the rule 'subject-regexper' to be recognized.
Current Behavior
When I extend the configuration and run a commit like fix: DAZ-123 Remove bugs I get the following error:
Just a status update. We got higher priority tasks so I have not looked too much at this. I will most likely start looking at this by the end of this week or next week. Before I do so I just want a confirmation: Is committing supposed to work as I expected it to?
Sharing configurations that use plugins does not work
We are trying to share a company-wide config so that we can easily have a standard linter with just one line in package.json. We want to use a plugin that adds a rule that otherwise doesn't exist.
The configuration looks like this:
The plugin is commitlint-plugin-subject and we use it to enforce that we can put a JIRA-issue at the beginning of a subject line. Like
fix: DAZ-123 Remove bugs
.Expected Behavior
I expect the commit
fix: DAZ-123 Remove bugs
to pass, and the rule 'subject-regexper' to be recognized.Current Behavior
When I extend the configuration and run a commit like
fix: DAZ-123 Remove bugs
I get the following error:Affected packages
I am not sure but I think it is a core-issue.
Possible Solution
I am not sure. We really want a fix for this so If you point me in the right direction I could look into submitting a PR tomorrow.
Steps to Reproduce (for bugs)
npm init -y && git init
npm i -D husky @commitlint/cli
npm install @digitalroute/commitlint-config -D
echo "module.exports = {extends: ['@digitalroute/commitlint-config']};" > commitlint.config.js
"husky": { "hooks": {"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"}}
git commit -m "fix: DAZ-123 Remove bugs"
If you do
npm install @digitalroute/commitlint-config -D
you get the following config:You can modify it in node_modules if necessary. If you comment out
subject_regexp: ...
andplugins: ['subject'],
It should work to do a commit.Context
We want to run a regex on the subject line. The goal is to enforce that all our issues start with 'DAZ-\d+'
Your Environment
@commitlint/cli --version
git --version
node --version
The text was updated successfully, but these errors were encountered: