File tree 2 files changed +21
-1
lines changed
2 files changed +21
-1
lines changed Original file line number Diff line number Diff line change 26
26
*
27
27
* .
28
28
*
29
+ * [zulu][yankee].
30
+ *
31
+ * [yankee]: http://xray.com
32
+ *
29
33
* @example
30
34
* {"name": "not-ok.md", "label": "input"}
31
35
*
32
36
* [golf]().
33
37
*
34
38
* ![hotel]().
35
39
*
40
+ * [zulu][yankee].
41
+ *
42
+ * [yankee]: <>
43
+ *
36
44
* @example
37
45
* {"name": "not-ok.md", "label": "output"}
38
46
*
39
47
* 1:1-1:9: Don’t use links without URL
40
48
* 3:1-3:11: Don’t use images without URL
49
+ * 7:1-7:13: Don’t use definitions without URL
41
50
*/
42
51
43
52
/**
@@ -57,7 +66,9 @@ const remarkLintNoEmptyUrl = lintRule(
57
66
( tree , file ) => {
58
67
visit ( tree , ( node ) => {
59
68
if (
60
- ( node . type === 'link' || node . type === 'image' ) &&
69
+ ( node . type === 'link' ||
70
+ node . type === 'image' ||
71
+ node . type === 'definition' ) &&
61
72
! generated ( node ) &&
62
73
! node . url
63
74
) {
Original file line number Diff line number Diff line change @@ -136,6 +136,10 @@ It’s recommended to fill them out.
136
136
[alpha](http://bravo.com).
137
137
138
138
.
139
+
140
+ [zulu][yankee].
141
+
142
+ [yankee]: http://xray.com
139
143
```
140
144
141
145
###### Out
@@ -150,13 +154,18 @@ No messages.
150
154
[golf]().
151
155
152
156
![hotel]().
157
+
158
+ [zulu][yankee].
159
+
160
+ [yankee]: <>
153
161
```
154
162
155
163
###### Out
156
164
157
165
``` text
158
166
1:1-1:9: Don’t use links without URL
159
167
3:1-3:11: Don’t use images without URL
168
+ 7:1-7:13: Don’t use definitions without URL
160
169
```
161
170
162
171
## Compatibility
You can’t perform that action at this time.
0 commit comments