Skip to content

Commit 09c2b26

Browse files
jlegronemarionebl
authored andcommitted
fix(core): correct type validation message
1 parent 103b906 commit 09c2b26

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

@commitlint/cli/cli.test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,15 @@ test('should succeed for input from stdin without rules', async t => {
4646

4747
test('should fail for input from stdin with rule from rc', async t => {
4848
const actual = await t.throws(cli('foo: bar', [], {cwd: SIMPLE}));
49-
t.true(actual.stdout.includes('scope must not be one of [foo]'));
49+
t.true(actual.stdout.includes('type must not be one of [foo]'));
5050
t.is(actual.code, 1);
5151
});
5252

5353
test('should fail for input from stdin with rule from js', async t => {
5454
const actual = await t.throws(
5555
cli('foo: bar', ['--extends', './extended'], {cwd: EXTENDS_ROOT})
5656
);
57-
t.true(actual.stdout.includes('scope must not be one of [foo]'));
57+
t.true(actual.stdout.includes('type must not be one of [foo]'));
5858
t.is(actual.code, 1);
5959
});
6060

@commitlint/core/src/rules/type-enum.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export default (parsed, when, value) => {
1414
return [
1515
negated ? !result : result,
1616
message([
17-
`scope must`,
17+
`type must`,
1818
negated ? `not` : null,
1919
`be one of [${value.join(', ')}]`
2020
])

0 commit comments

Comments
 (0)