Skip to content

Incorrect body-leading-blank rule format #6

@sebastianquek

Description

@sebastianquek

Describe the bug
When using the following config, the body does not include a leading blank line.
I was looking at the source code, am wondering if it should be:

test('adds leading blank line', () => {
  const result = leadingBlankFilter('foo', [2, 'always', undefined]);
  expect(result).toBe('\n\nfoo');
});

To Reproduce
Use commitizen's cli and add a body

Expected behavior
Current:

feat: new feature
long description body

Expected:

feat: new feature

long description body

For additional context, the output of the default cz-conventional-changelog adapter adds an additional line as expected.

CommitLint config

module.exports = {
  extends: ["@commitlint/config-conventional"],
  rules: {
    "body-leading-blank": [2, "always"],
    "footer-leading-blank": [2, "always"],
  },
};

package.json

  "config": {
    "commitizen": {
      "path": "commitiquette"
    }
  },

Metadata

Metadata

Labels

bugSomething isn't workingquestionFurther information is requested

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions