Skip to content

Commit

Permalink
Allow any scope casing for Conventional Commits (#2529)
Browse files Browse the repository at this point in the history
* Allow any scope casing for Conventional Commits

* Remove obsolete scope casing restriction test
  • Loading branch information
kripod committed Mar 28, 2021
1 parent d38a2ad commit 688ad1e
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 15 deletions.
1 change: 0 additions & 1 deletion @commitlint/config-conventional/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ module.exports = {
'footer-leading-blank': [1, 'always'],
'footer-max-line-length': [2, 'always', 100],
'header-max-length': [2, 'always', 100],
'scope-case': [2, 'always', 'lower-case'],
'subject-case': [
2,
'never',
Expand Down
14 changes: 0 additions & 14 deletions @commitlint/config-conventional/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ const messages = {
invalidTypeEnum: 'foo: some message',
invalidTypeCase: 'FIX: some message',
invalidTypeEmpty: ': some message',
invalidScopeCase: 'fix(SCOPE): some message',
invalidSubjectCases: [
'fix(scope): Some message',
'fix(scope): Some Message',
Expand Down Expand Up @@ -52,12 +51,6 @@ const errors = {
name: 'type-empty',
valid: false,
},
scopeCase: {
level: 2,
message: 'scope must be lower-case',
name: 'scope-case',
valid: false,
},
subjectCase: {
level: 2,
message:
Expand Down Expand Up @@ -134,13 +127,6 @@ test('type-empty', async () => {
expect(result.errors).toEqual([errors.typeEmpty]);
});

test('scope-case', async () => {
const result = await lint(messages.invalidScopeCase, rules);

expect(result.valid).toBe(false);
expect(result.errors).toEqual([errors.scopeCase]);
});

test('subject-case', async () => {
const invalidInputs = await Promise.all(
messages.invalidSubjectCases.map((invalidInput) =>
Expand Down

0 comments on commit 688ad1e

Please sign in to comment.