Skip to content

Commit c7210a2

Browse files
committed
docs: add configuration example for ignores
1 parent 3c4faaf commit c7210a2

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

README.md

+20-1
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,28 @@ dart pub add --dev commitlint_cli
3030
### Configuration
3131

3232
```bash
33-
# Configure commitlint to use conventional config
33+
# Simply use configuration of a package
3434
echo "include: package:commitlint_cli/commitlint.yaml" > commitlint.yaml
3535
```
36+
You can also customize your configuration in `commitlint.yaml`
37+
```yaml
38+
# Inherit configuration of a package
39+
include: package:commitlint_cli/commitlint.yaml
40+
41+
# Custom rules
42+
rules:
43+
type-case:
44+
- 2
45+
- always
46+
- 'upper-case'
47+
48+
# Whether commitlint uses the default ignore rules.
49+
defaultIgnores: true
50+
# Pattern that matches commit message if commitlint should ignore the given message.
51+
ignores:
52+
- r'^fixup'
53+
```
54+
3655
3756
### Test
3857

lib/src/lint.dart

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
import 'is_ignored.dart';
32
import 'parse.dart';
43
import 'rules.dart';

0 commit comments

Comments
 (0)