Skip to content
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

When extending config the parser preset is not loaded #830

Closed
4 tasks
byCedric opened this issue Oct 16, 2019 · 1 comment · Fixed by #831 or #834
Closed
4 tasks

When extending config the parser preset is not loaded #830

byCedric opened this issue Oct 16, 2019 · 1 comment · Fixed by #831 or #834
Assignees
Labels

Comments

@byCedric
Copy link
Member

byCedric commented Oct 16, 2019

Expected Behavior

I tried to extend the new @commitlint/config-conventional and add some "overrides" into that one. What I'd expect is that the new parserPreset is also reused, besides the rules.

Current Behavior

Right now if you extend configs like there, the parser preset remains undefined. This is a dump I got from the @commitlint/load package.

{
  extends: [ '@commitlint/config-conventional' ],
  rules: {
    'header-max-length': [ 2, 'always', 80 ],
    'type-enum': [ 2, 'always', [Array] ]
  },
  parserPreset: undefined
}

Affected packages

  • cli
  • core
  • prompt
  • config-angular

Possible Solution

Steps to Reproduce (for bugs)

Context

Your Environment

Executable Version
commitlint --version 8.3.0
git --version 2.17.1
node --version 12.11.1
@byCedric
Copy link
Member Author

It looks like the tests aren't covering the exact use case of the new conventional changelog parser. I'll take a look tonight to see where the test case is behaving differently. For now, I see that in the tests it's receiving a Promise where the real-world use case is receiving a Function (and thus is not picked up by the // Await parser-preset if applicable-code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment