Skip to content

Commit c0c6d5a

Browse files
byCedricmarionebl
authored andcommitted
refactor(lint): use invalid instead of missing for unknown rules
1 parent ed2dc7f commit c0c6d5a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

@commitlint/lint/src/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export default async (message, rules = {}, opts = {}) => {
3535
if (missing.length > 0) {
3636
const names = Object.keys(implementations);
3737
throw new RangeError(
38-
`Found missing rule names: ${missing.join(
38+
`Found invalid rule names: ${missing.join(
3939
', '
4040
)}. Supported rule names are: ${names.join(', ')}`
4141
);

@commitlint/lint/src/index.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ test('throws for invalid rule names', async t => {
5959
lint('foo', {foo: [2, 'always'], bar: [1, 'never']})
6060
);
6161

62-
t.is(error.message.indexOf('Found missing rule names: foo, bar'), 0);
62+
t.is(error.message.indexOf('Found invalid rule names: foo, bar'), 0);
6363
});
6464

6565
test('throws for invalid rule config', async t => {

0 commit comments

Comments
 (0)