Skip to content

Unexpected behavior on extending config with rule 'type-enum' #470

Closed
@imrekq

Description

@imrekq

Expected Behavior

On extending config with rule type-enum should be capaility override this rule

Current Behavior

I has package with rules extending @commitlint/config-conventional. When I try use him in project that: 1) rule type-enum is a concatenation @commitlint/config-conventional and @ptsecurity/commitlint-config
2) on trying do commit with a wrong type that display this concatenation
type must be one of [feat, fix, docs, refactor, test, perf, bump, chore, revert, style, test] [type-enum]

Affected packages

  • cli
  • core
  • prompt
  • config-angular

Possible Solution

Steps to Reproduce (for bugs)

  1. Clone prepared repo https://github.com/imrekb/issue-concatenation-type-enum
  2. Try execute commit with message wrong: blah-blah
  3. Display unexpected enum is concatenation @commitlint/config-conventional and @ptsecurity/commitlint-config
commitlint.config.js
module.exports = {
    extends: ['@ptsecurity/commitlint-config'],
    rules: {
        'scope-enum': [
            2,
            'always',
            [
                // as examples
                'app',
                'common'
            ]
        ]
    }
};

Context

Your Environment

Executable Version
commitlint --version 7.2.1
git --version 2.17.1
node --version 8.11.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions