You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+53-51
Original file line number
Diff line number
Diff line change
@@ -24,14 +24,14 @@ commitlint checks if your commit message meets the [conventional commit format](
24
24
-[Setup](#setup)
25
25
-[Manual](#manual)
26
26
-[Quick Test](#quick-test)
27
-
-[Usage](#usage)
28
-
-[Commands](#commands)
29
-
-[config](#config)
30
-
-[lint](#lint)
31
-
-[Precedence](#precedence)
32
-
-[Config](#config-1)
33
-
-[Message](#message)
34
-
-[hook](#hook)
27
+
-[Commands](#commands)
28
+
-[config](#config)
29
+
-[lint](#lint)
30
+
-[Precedence](#precedence)
31
+
-[Config](#config-1)
32
+
-[Message](#message)
33
+
-[hook](#hook)
34
+
-[debug](#debug)
35
35
-[Default Config](#default-config)
36
36
-[Commit Types](#commit-types)
37
37
-[Available Rules](#available-rules)
@@ -90,28 +90,26 @@ echo "fear: do not fear for commit message" | commitlint lint
90
90
# ❌ type-enum: type 'fear' is not allowed, you can use one of [build chore ci docs feat fix merge perf refactor revert style test]
91
91
```
92
92
93
-
## Usage
93
+
## Commands
94
94
95
-
### Commands
96
-
97
-
#### config
95
+
### config
98
96
99
97
- To create config file, run `commitlint config create` this will create `commitlint.yaml`
100
98
101
99
- To validate config file, run `commitlint config check --config=/path/to/conf.yaml`
102
100
103
-
####lint
101
+
### lint
104
102
105
103
To lint a message, you can use any one of the following
106
104
- run `commitlint lint --message=file`
107
105
- run `echo "message" | commitlint lint`
108
106
- run `commitlint lint < file`
109
107
110
-
#####Precedence
108
+
#### Precedence
111
109
112
110
`commitlint lint` follows below order for `config` and `message`
113
111
114
-
######Config
112
+
##### Config
115
113
116
114
- config file passed to `--config` command-line argument
117
115
-`COMMITLINT_CONFIG` env variable
@@ -122,53 +120,57 @@ To lint a message, you can use any one of the following
122
120
- commitlint.yaml
123
121
-[default config](#default-config)
124
122
125
-
######Message
123
+
##### Message
126
124
127
125
-`stdin` pipe stream
128
126
- commit message file passed to `--message` command-line argument
129
127
-`.git/COMMIT_EDITMSG` in current directory
130
128
131
-
####hook
129
+
### hook
132
130
133
131
- To create hook files, run `commitlint hook create`
134
132
133
+
### debug
134
+
135
+
To prints useful information for debugging commitlint
136
+
137
+
run `commitlint debug`
138
+
135
139
### Default Config
136
140
137
141
```yaml
138
-
version: v0.7.0
142
+
version: v0.8.0
139
143
formatter: default
140
144
rules:
141
-
header-min-length:
142
-
enabled: true
143
-
severity: error
144
-
argument: 10
145
-
header-max-length:
146
-
enabled: true
147
-
severity: error
148
-
argument: 50
149
-
body-max-line-length:
150
-
enabled: true
151
-
severity: error
152
-
argument: 72
153
-
footer-max-line-length:
154
-
enabled: true
155
-
severity: error
156
-
argument: 72
157
-
type-enum:
158
-
enabled: true
159
-
severity: error
160
-
argument:
161
-
- feat
162
-
- fix
163
-
- docs
164
-
- style
165
-
- refactor
166
-
- perf
167
-
- test
168
-
- build
169
-
- ci
170
-
- chore
171
-
- revert
145
+
- header-min-length
146
+
- header-max-length
147
+
- body-max-line-length
148
+
- footer-max-line-length
149
+
- type-enum
150
+
severity:
151
+
default: error
152
+
settings:
153
+
body-max-line-length:
154
+
argument: 72
155
+
footer-max-line-length:
156
+
argument: 72
157
+
header-min-length:
158
+
argument: 10
159
+
header-max-length:
160
+
argument: 50
161
+
type-enum:
162
+
argument:
163
+
- feat
164
+
- fix
165
+
- docs
166
+
- style
167
+
- refactor
168
+
- perf
169
+
- test
170
+
- build
171
+
- ci
172
+
- chore
173
+
- revert
172
174
```
173
175
174
176
#### Commit Types
@@ -225,15 +227,15 @@ commitlint
225
227
→ input: "fear: do not fear for ..."
226
228
227
229
Errors:
228
-
❌ type-enum: type 'fear' is not allowed, you can use one of [build chore ci docs feat fix merge perf refactor revert style test]
230
+
❌ type-enum: type 'fear' is not allowed, you can use one of [build chore ci docs feat fix perf refactor revert style test]
229
231
230
232
Total 1 errors, 0 warnings, 0 other severities
231
233
```
232
234
233
235
- JSON
234
236
235
237
```json
236
-
{"errors":[{"messages":["type 'fear' is not allowed, you can use one of [build chore ci docs feat fix merge perf refactor revert style test]"],"name":"type-enum"}],"input":"fear: do not fear for commit message","others":[],"status":false,"warnings":[]}
238
+
{"input":"fear: do not fear for commit message","issues":[{"description":"type 'fear' is not allowed, you can use one of [build chore ci docs feat fix perf refactor revert style test]","name":"type-enum","severity":"error"}]}
0 commit comments