Skip to content

@commitlint/load silently fails to load conventional changelog preset if it has a scoped package name #2488

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
javier-garcia-meteologica opened this issue Mar 3, 2021 · 3 comments
Labels

Comments

@javier-garcia-meteologica

conventional-changelog supports scoped package names @scope/conventional-changelog-custom-preset but commitlint doesn't.

https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog#preset

commitlint will only load presets that start with 'conventional-changelog-', without scopes.

if (
typeof parser === 'object' &&
typeof parser.parserOpts === 'function' &&
parserName.startsWith('conventional-changelog-')
) {

It's also very difficult to troubleshoot because there is no error. Commitlint silently ignores parserOpts and uses the default options instead.

@javier-garcia-meteologica javier-garcia-meteologica changed the title Scoped package names are broken for conventional changelog presets @commitlint/load silently breaks if conventional changelog preset has a scoped package name Mar 3, 2021
@javier-garcia-meteologica javier-garcia-meteologica changed the title @commitlint/load silently breaks if conventional changelog preset has a scoped package name @commitlint/load silently fails to load conventional changelog preset if it has a scoped package name Mar 3, 2021
@escapedcat
Copy link
Member

Hi, is this related to or a duplicate of #2108?

@javier-garcia-meteologica
Copy link
Author

javier-garcia-meteologica commented Mar 4, 2021

@escapedcat, I don't think so. The issue you linked refers to scopes in commit headers, like fix(@foo/bar): fix some bug.

Here I'm referring to presets used in commitlint configurations

module.exports = {    
  parserPreset: '@my-org/conventional-changelog-my-org',    
  rules: {
  ...
  }
};

@escapedcat
Copy link
Member

Ok, thanks for checking

@escapedcat escapedcat added the bug label Jan 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants