Skip to content

Commit a3ae212

Browse files
jlegronemarionebl
authored andcommitted
docs: update commit type error messages
1 parent 09c2b26 commit a3ae212

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

docs/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ echo "module.exports = {extends: [@commitlint/config-angular']}" > commitlint.co
4646
# Lint from stdin
4747
echo 'foo: bar' | commitlint
4848
⧗ input: foo: bar
49-
scope must be one of [build, chore, ci, docs, feat, fix, perf, refactor, revert, style, test] [type-enum]
49+
type must be one of [build, chore, ci, docs, feat, fix, perf, refactor, revert, style, test] [type-enum]
5050
✖ found 1 problems, 0 warnings
5151

5252
# Lint last commit from history

docs/assets/commitlint.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@
428428
],
429429
[
430430
0.000581,
431-
"\u001b[31m✖\u001b[39m scope must be one of [build, chore, ci, docs, feat, fix, perf, refactor, revert, style, test] \u001b[90m[type-enum]\u001b[39m\r\n\u001b[1m\u001b[31m✖\u001b[39m found 1 problems, 0 warnings\u001b[22m\r\n"
431+
"\u001b[31m✖\u001b[39m type must be one of [build, chore, ci, docs, feat, fix, perf, refactor, revert, style, test] \u001b[90m[type-enum]\u001b[39m\r\n\u001b[1m\u001b[31m✖\u001b[39m found 1 problems, 0 warnings\u001b[22m\r\n"
432432
],
433433
[
434434
0.058213,

docs/assets/commitlint.svg

Lines changed: 1 addition & 1 deletion
Loading

docs/guides-local-setup.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ git commit -m "foo: this will fail"
4747
husky > npm run -s commitmsg
4848

4949
⧗ input: foo: this will fail
50-
scope must be one of [build, chore, ci, docs, feat, fix, perf, refactor, revert, style, test] [type-enum]
50+
type must be one of [build, chore, ci, docs, feat, fix, perf, refactor, revert, style, test] [type-enum]
5151
✖ found 1 problems, 0 warnings
5252

5353
husky > commit-msg hook failed (add --no-verify to bypass)

docs/reference-api.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -195,23 +195,23 @@ lint(message: string, rules: {[ruleName: string]: Rule}) => Promise<Report>;
195195
const {lint} = require('@commitlint/core');
196196

197197
lint('foo: bar')
198-
.then(report => console.log(report));
198+
.then(report => console.log(report));
199199
// => { valid: true, errors: [], warnings: [] }
200200

201201
lint('foo: bar', {'type-enum': [1, 'always', ['foo']]})
202-
.then(report => console.log(report));
202+
.then(report => console.log(report));
203203
// => { valid: true, errors: [], warnings: [] }
204204

205205
lint('foo: bar', {'type-enum': [1, 'always', ['bar']]})
206-
.then(report => console.log(report));
206+
.then(report => console.log(report));
207207
/* =>
208208
{ valid: true,
209209
errors: [],
210210
warnings:
211211
[ { level: 1,
212212
valid: false,
213213
name: 'type-enum',
214-
message: 'scope must be one of [bar]' } ] }
214+
message: 'type must be one of [bar]' } ] }
215215
*/
216216
```
217217

@@ -225,16 +225,16 @@ const CONFIG = {
225225
};
226226

227227
load(CONFIG)
228-
.then(opts =>lint('foo: bar', opts.rules))
228+
.then(opts =>lint('foo: bar', opts.rules))
229229
.then(report => console.log(report));
230230
/* =>
231231
{ valid: false,
232232
errors:
233233
[ { level: 2,
234234
valid: false,
235235
name: 'type-enum',
236-
message: 'scope must be one of [build, chore, ci, docs, feat, fix, perf, refactor, revert, style, test]' } ],
237-
warnings: [] }
236+
message: 'type must be one of [build, chore, ci, docs, feat, fix, perf, refactor, revert, style, test]' } ],
237+
warnings: [] }
238238
*/
239239
```
240240

0 commit comments

Comments
 (0)