mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-09-22 05:40:48 +02:00
Compare commits
1372 commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
224987d727 | ||
![]() |
8cb8f6c695 | ||
![]() |
a1506e71f3 | ||
![]() |
b3935080e9 | ||
![]() |
738f4aa59a | ||
![]() |
979419c7a0 | ||
![]() |
4d8e79d33e | ||
![]() |
6adfaf68b5 | ||
![]() |
a4b7ffa8ce | ||
![]() |
f34f4dde69 | ||
![]() |
2775534144 | ||
![]() |
006b6af736 | ||
![]() |
328506e6c8 | ||
![]() |
c413ac9a88 | ||
![]() |
9849e2871f | ||
![]() |
2a85b3c3f1 | ||
![]() |
b611eba684 | ||
![]() |
faf96d513b | ||
![]() |
318b9ff6b4 | ||
![]() |
e93b9854dc | ||
![]() |
f6087f0e6a | ||
![]() |
1dc4974191 | ||
![]() |
647dac621f | ||
![]() |
fb8b562c94 | ||
![]() |
91eba5470a | ||
![]() |
4c6672d24d | ||
![]() |
92cd6d51cb | ||
![]() |
759c31760e | ||
![]() |
00fef38119 | ||
![]() |
e40ed300d0 | ||
![]() |
2ab8b49b48 | ||
![]() |
75003eb741 | ||
![]() |
c17bfc5c17 | ||
![]() |
40a252d028 | ||
![]() |
02478d24cf | ||
![]() |
45932c7837 | ||
![]() |
3145b68bed | ||
![]() |
a84f7c5b18 | ||
![]() |
a9417fdf67 | ||
![]() |
b4204f197e | ||
![]() |
465fc448eb | ||
![]() |
918f15945b | ||
![]() |
c4a6ef42a6 | ||
![]() |
32d660c34b | ||
![]() |
61fab7ba24 | ||
![]() |
41357b551f | ||
![]() |
62dc79864d | ||
![]() |
c061888937 | ||
![]() |
031c7be4db | ||
![]() |
0916d178e7 | ||
![]() |
9b46692b8d | ||
![]() |
95f82760ce | ||
![]() |
8baa843ce3 | ||
![]() |
5fc91f6977 | ||
![]() |
cb39972d9b | ||
![]() |
50300fa7af | ||
![]() |
5749c8dcf7 | ||
![]() |
06b60b7372 | ||
![]() |
a3db3dba2d | ||
![]() |
917c5a5f1d | ||
![]() |
61febde9c1 | ||
![]() |
d4a8a3bdfa | ||
![]() |
5cc88a7759 | ||
![]() |
d4a638101a | ||
![]() |
087df4480e | ||
![]() |
7b4c958e48 | ||
![]() |
d5cb5c8546 | ||
![]() |
d36a57d680 | ||
![]() |
f0b1afe884 | ||
![]() |
435c55f72a | ||
![]() |
d02090db2c | ||
![]() |
dbf828c493 | ||
![]() |
965b642109 | ||
![]() |
14cf2454ae | ||
![]() |
a5e2134147 | ||
![]() |
63147ee1eb | ||
![]() |
1f237e6c54 | ||
![]() |
c4d15e0d2a | ||
![]() |
27d70632cd | ||
![]() |
55941a5627 | ||
![]() |
1c4f69a7fc | ||
![]() |
5d3d07d345 | ||
![]() |
909b9a75ae | ||
![]() |
eaa1c74a11 | ||
![]() |
d918f61c77 | ||
![]() |
14524283cc | ||
![]() |
6645868510 | ||
![]() |
a2d569b012 | ||
![]() |
d53e3ff46c | ||
![]() |
264946920a | ||
![]() |
c30b59ae81 | ||
![]() |
a36f2dcf41 | ||
![]() |
4b3626b5f2 | ||
![]() |
715020de46 | ||
![]() |
241fe5b51c | ||
![]() |
31e480ad05 | ||
![]() |
41654fbb60 | ||
![]() |
c39a2dd516 | ||
![]() |
571c2353ea | ||
![]() |
b8374ec5d2 | ||
![]() |
4117394250 | ||
![]() |
6f7307ae7b | ||
![]() |
737ea4ec6d | ||
![]() |
bae6f9c63e | ||
![]() |
aa4f080b3f | ||
![]() |
f950936baa | ||
![]() |
44c302fe0b | ||
![]() |
d4b981bcb3 | ||
![]() |
3cbe1cb6c5 | ||
![]() |
b23fc96ab2 | ||
![]() |
656254e64f | ||
![]() |
c71e298d4b | ||
![]() |
90cf515ff0 | ||
![]() |
2d2fafc58d | ||
![]() |
f2a0bfe651 | ||
![]() |
37f96413dd | ||
![]() |
b0a267bf47 | ||
![]() |
9d2b4cb1cc | ||
![]() |
cb00a41ff3 | ||
![]() |
079aba9012 | ||
![]() |
feca49e4f8 | ||
![]() |
eb8a0a2b7c | ||
![]() |
8dbfe965e9 | ||
![]() |
4d4aab6bd4 | ||
![]() |
a4c553a45a | ||
![]() |
53ff5c43f1 | ||
![]() |
a1da464618 | ||
![]() |
e6ee4cc0b1 | ||
![]() |
e272b10a90 | ||
![]() |
48336b7ed3 | ||
![]() |
a6cc4cc860 | ||
![]() |
4ad6628dcb | ||
![]() |
637975f517 | ||
![]() |
d4352c7a44 | ||
![]() |
74b1c195e3 | ||
![]() |
ef70472df7 | ||
![]() |
795eac22de | ||
![]() |
df33933fe5 | ||
![]() |
8e5f699bb2 | ||
![]() |
92eb4254fc | ||
![]() |
1587927660 | ||
![]() |
a1081ec450 | ||
![]() |
5fad452106 | ||
![]() |
baf4944f5f | ||
![]() |
8ad4698536 | ||
![]() |
599b687849 | ||
![]() |
e959c1e522 | ||
![]() |
af086995ed | ||
![]() |
dc26c50688 | ||
![]() |
5056da0f93 | ||
![]() |
a46b587900 | ||
![]() |
faa9c6cbb4 | ||
![]() |
c9d32c33b0 | ||
![]() |
a009407088 | ||
![]() |
65eeb4c8d9 | ||
![]() |
8b26129d55 | ||
![]() |
6737ace933 | ||
![]() |
259f19a558 | ||
![]() |
14d8db70f6 | ||
![]() |
ed3cd80bab | ||
![]() |
898c573f29 | ||
![]() |
015b34ff09 | ||
![]() |
62073a8fde | ||
![]() |
6e52643f8c | ||
![]() |
2449163ffb | ||
![]() |
fd7fb925a9 | ||
![]() |
ce7efbd9e1 | ||
![]() |
b404c8bf16 | ||
![]() |
8da43dd246 | ||
![]() |
e41f034bef | ||
![]() |
853c142291 | ||
![]() |
69242b3aa6 | ||
![]() |
4965ee84e4 | ||
![]() |
8f66aafe28 | ||
![]() |
789190962c | ||
![]() |
3599f694ba | ||
![]() |
1e71f6f44e | ||
![]() |
191226f070 | ||
![]() |
41dda9e041 | ||
![]() |
07ef2bf804 | ||
![]() |
e815e1a458 | ||
![]() |
9fe9f801dc | ||
![]() |
770bbce5d4 | ||
![]() |
587b830cb2 | ||
![]() |
3812cba029 | ||
![]() |
6f76cd105d | ||
![]() |
d536543344 | ||
![]() |
4853cf4c31 | ||
![]() |
a25af76bbb | ||
![]() |
a22b432d8a | ||
![]() |
fe45e0110a | ||
![]() |
1ace77f0b0 | ||
![]() |
0092c5f189 | ||
![]() |
e07c66ae68 | ||
![]() |
f29ca16c38 | ||
![]() |
1737a6c672 | ||
![]() |
132ccbea03 | ||
![]() |
3850a6dc60 | ||
![]() |
b91dfb539f | ||
![]() |
a418847399 | ||
![]() |
975e25fcf0 | ||
![]() |
2beebd6fc5 | ||
![]() |
7ba8160e8c | ||
![]() |
db409190ed | ||
![]() |
727518d1cf | ||
![]() |
589ecbf720 | ||
![]() |
04b597ab90 | ||
![]() |
b6dda50e58 | ||
![]() |
886e00a8d5 | ||
![]() |
0eedda0a6c | ||
![]() |
368cb1be5f | ||
![]() |
a7a50eaa39 | ||
![]() |
3b07268aeb | ||
![]() |
d96bc9c97f | ||
![]() |
e708143a28 | ||
![]() |
b4697d6354 | ||
![]() |
14a2756470 | ||
![]() |
16512bba25 | ||
![]() |
e6e799d145 | ||
![]() |
d94b78e6bf | ||
![]() |
38b4ec0c2f | ||
![]() |
1d9bd4725d | ||
![]() |
36aaebbf44 | ||
![]() |
fea5d886b7 | ||
![]() |
17cca9e8a1 | ||
![]() |
effab8d513 | ||
![]() |
eae26a2af8 | ||
![]() |
fc204577ed | ||
![]() |
36ff47a3fc | ||
![]() |
b92ebcfc59 | ||
![]() |
1be3273b79 | ||
![]() |
5e1b269fa5 | ||
![]() |
a63972a666 | ||
![]() |
d22c1f19ef | ||
![]() |
2fa7730a6b | ||
![]() |
8b1ed92466 | ||
![]() |
04c693b00b | ||
![]() |
74aa96d19d | ||
![]() |
5faa6f4235 | ||
![]() |
61a9c2427e | ||
![]() |
4f6b17934a | ||
![]() |
c5d4a3297f | ||
![]() |
df70ea5989 | ||
![]() |
5367a9aeec | ||
![]() |
4e30462216 | ||
![]() |
e0219411c6 | ||
![]() |
9b1840a5a4 | ||
![]() |
5182911acc | ||
![]() |
29ebb28f10 | ||
![]() |
30bb7e4f8e | ||
![]() |
5cc40c54b7 | ||
![]() |
264da24dae | ||
![]() |
790cd1353e | ||
![]() |
d3819c4e75 | ||
![]() |
ee50519e00 | ||
![]() |
33631a5984 | ||
![]() |
5701d0bf52 | ||
![]() |
97effd921e | ||
![]() |
124b7e2276 | ||
![]() |
5e568d0da9 | ||
![]() |
cfcb5fbd57 | ||
![]() |
63744b4047 | ||
![]() |
073c376fa6 | ||
![]() |
fa24329f89 | ||
![]() |
8cbbed8e79 | ||
![]() |
0f210d5c1a | ||
![]() |
ab4f5b8bb1 | ||
![]() |
a73990cdc5 | ||
![]() |
d3f814fc1f | ||
![]() |
0dffe940b5 | ||
![]() |
92a786c5e9 | ||
![]() |
57cd055fd1 | ||
![]() |
f4aae0b7a3 | ||
![]() |
2c56a08277 | ||
![]() |
87daa5b06c | ||
![]() |
2ea3f95fd1 | ||
![]() |
b749d9fbb4 | ||
![]() |
1c5927fd26 | ||
![]() |
98ff66209d | ||
![]() |
a65e05bff2 | ||
![]() |
bdd5cdcafe | ||
![]() |
d279c4e424 | ||
![]() |
5e7c3b7420 | ||
![]() |
4893b55d22 | ||
![]() |
7a8e2c95e0 | ||
![]() |
2e2d719669 | ||
![]() |
d269f2a2a6 | ||
![]() |
338ce755c9 | ||
![]() |
087be0dd8a | ||
![]() |
e50cc161b8 | ||
![]() |
164bbac651 | ||
![]() |
fe02674ce0 | ||
![]() |
6d097cce3f | ||
![]() |
9c8e7156e1 | ||
![]() |
bbca3ad209 | ||
![]() |
0291179e93 | ||
![]() |
05a467494b | ||
![]() |
dfcb4529f3 | ||
![]() |
85e704f32a | ||
![]() |
6870a48829 | ||
![]() |
0d769607af | ||
![]() |
ea8d596a9b | ||
![]() |
697780b3b6 | ||
![]() |
60d00bc944 | ||
![]() |
b79b519c34 | ||
![]() |
7aac5b0553 | ||
![]() |
55729cfcf7 | ||
![]() |
2b8369ae39 | ||
![]() |
c8fd9eb4b3 | ||
![]() |
7efc2605b1 | ||
![]() |
c5f4a93cc7 | ||
![]() |
3101c94cf0 | ||
![]() |
3b581a7f6d | ||
![]() |
4072cf7417 | ||
![]() |
37ab4a0faf | ||
![]() |
9161692c4b | ||
![]() |
d8601edef2 | ||
![]() |
c5abbafb5e | ||
![]() |
ff8c1bf9b2 | ||
![]() |
e528b2998a | ||
![]() |
c35e8ce40d | ||
![]() |
a8da6c5586 | ||
![]() |
470fe89684 | ||
![]() |
a63e6ed9b7 | ||
![]() |
d3178a7865 | ||
![]() |
a6cf08dfc6 | ||
![]() |
daa155d5a1 | ||
![]() |
92a19b6f36 | ||
![]() |
f07de29a92 | ||
![]() |
a1d8f4e022 | ||
![]() |
0eaedb80ed | ||
![]() |
ba4b224bf4 | ||
![]() |
d7431657cd | ||
![]() |
57ee2fe322 | ||
![]() |
5bc11228c4 | ||
![]() |
7d73e48c79 | ||
![]() |
5fc3399bce | ||
![]() |
8889706bfe | ||
![]() |
f5d732eeaf | ||
![]() |
1bac9445f2 | ||
![]() |
4d002e268e | ||
![]() |
6c8d0fdef8 | ||
![]() |
a80387a0a0 | ||
![]() |
29adb6d843 | ||
![]() |
85ce6b1e8d | ||
![]() |
0fe5fddbba | ||
![]() |
7eda0894e4 | ||
![]() |
b9ce9b2285 | ||
![]() |
fb52c5dc66 | ||
![]() |
f08249a613 | ||
![]() |
0f9556f4ec | ||
![]() |
4fd1b05021 | ||
![]() |
6912c12847 | ||
![]() |
2dd3ea7d18 | ||
![]() |
54f5faafac | ||
![]() |
e2a2f9ddc5 | ||
![]() |
0f4beae0f3 | ||
![]() |
7e488a112f | ||
![]() |
4522a44453 | ||
![]() |
984cf2d46d | ||
![]() |
ac0b0bb11c | ||
![]() |
d9467eca21 | ||
![]() |
0d2af0c26a | ||
![]() |
ef03a3a839 | ||
![]() |
ca53b93e64 | ||
![]() |
c162ddcdc3 | ||
![]() |
f6f9e41d11 | ||
![]() |
964e4c80ab | ||
![]() |
7377b75383 | ||
![]() |
cfa76c8c71 | ||
![]() |
053be3fab6 | ||
![]() |
9d023ae07c | ||
![]() |
25b12eab56 | ||
![]() |
adb388b120 | ||
![]() |
347302169c | ||
![]() |
ec957029a5 | ||
![]() |
1513e3803b | ||
![]() |
d9c5d24e20 | ||
![]() |
e4a90136f0 | ||
![]() |
96354678dc | ||
![]() |
b1b16dabec | ||
![]() |
fc9eaca653 | ||
![]() |
3b9a7fb2dd | ||
![]() |
26a0084515 | ||
![]() |
8d55bceaee | ||
![]() |
07bdeda466 | ||
![]() |
2ea03a928d | ||
![]() |
157e888532 | ||
![]() |
0b165c1566 | ||
![]() |
e3ca9b1755 | ||
![]() |
c3f351e6bd | ||
![]() |
e8ecc3f69f | ||
![]() |
4ff3a27fa2 | ||
![]() |
3003d244f9 | ||
![]() |
5280fc4d68 | ||
![]() |
23a712ccb8 | ||
![]() |
de14950965 | ||
![]() |
106ca0bc90 | ||
![]() |
12502f6571 | ||
![]() |
ea9659841e | ||
![]() |
6daaa43410 | ||
![]() |
e447db33c9 | ||
![]() |
446fe901c3 | ||
![]() |
610d82352e | ||
![]() |
f032849081 | ||
![]() |
39afe0a775 | ||
![]() |
de6382ce05 | ||
![]() |
e4b5ecf07d | ||
![]() |
56a7fc82d7 | ||
![]() |
78400582df | ||
![]() |
e9e9c5ff4f | ||
![]() |
26466108e9 | ||
![]() |
5ecdb045a5 | ||
![]() |
ce525005d8 | ||
![]() |
4a5af4b448 | ||
![]() |
da5b4dca7a | ||
![]() |
c06492cfc6 | ||
![]() |
399e79052d | ||
![]() |
65dfdd504a | ||
![]() |
71bef68c11 | ||
![]() |
189d58d88e | ||
![]() |
81dacdae0d | ||
![]() |
ebded850b5 | ||
![]() |
2c88c520f3 | ||
![]() |
6120106f40 | ||
![]() |
e754cb2973 | ||
![]() |
428bb0023f | ||
![]() |
b0272506b0 | ||
![]() |
90b572f292 | ||
![]() |
38cbbc9669 | ||
![]() |
823002ccba | ||
![]() |
cb1d38434e | ||
![]() |
e2bcb29257 | ||
![]() |
ed8296a55f | ||
![]() |
cc34704ffa | ||
![]() |
607c3af776 | ||
![]() |
815ac10d12 | ||
![]() |
e12f4d4562 | ||
![]() |
22f1f064fd | ||
![]() |
4a1b3550d3 | ||
![]() |
d293854714 | ||
![]() |
7bbf99948e | ||
![]() |
95561108e7 | ||
![]() |
c58c706f52 | ||
![]() |
2946d5af09 | ||
![]() |
5ef6f7ceed | ||
![]() |
c96f06f3c5 | ||
![]() |
0cb91affd0 | ||
![]() |
fa78d69634 | ||
![]() |
ae913184db | ||
![]() |
aa3981190f | ||
![]() |
6d908d610d | ||
![]() |
ed1bb6d88e | ||
![]() |
3c9e5f2342 | ||
![]() |
b657990bac | ||
![]() |
c3ecf9bdad | ||
![]() |
0f55b9aec8 | ||
![]() |
6c7784fbbe | ||
![]() |
ef98d74dd6 | ||
![]() |
c6716f9bac | ||
![]() |
36844eefef | ||
![]() |
5fc311f824 | ||
![]() |
42e2c52c61 | ||
![]() |
c0719025c4 | ||
![]() |
5a9a30af65 | ||
![]() |
22c56b91b9 | ||
![]() |
992f65703a | ||
![]() |
74a9f2a155 | ||
![]() |
b9618df069 | ||
![]() |
ce24356f17 | ||
![]() |
285cbb7a47 | ||
![]() |
06824f201d | ||
![]() |
dfbb7ffcf6 | ||
![]() |
02afc89443 | ||
![]() |
9b78582e86 | ||
![]() |
9aa6ff4fd5 | ||
![]() |
0dbbedb2f7 | ||
![]() |
b7ed1e6540 | ||
![]() |
fb671b6cd1 | ||
![]() |
51bb751155 | ||
![]() |
b2305efafb | ||
![]() |
6920d8c728 | ||
![]() |
8fe819fa69 | ||
![]() |
53f4bbf19a | ||
![]() |
4c7cc9c326 | ||
![]() |
ab0ea70b7f | ||
![]() |
c83afe1cfd | ||
![]() |
82441faa91 | ||
![]() |
6f6348a63d | ||
![]() |
a83e2d8a09 | ||
![]() |
0f5e65abd4 | ||
![]() |
fdd8ba1974 | ||
![]() |
3acf7da822 | ||
![]() |
d5994ae4de | ||
![]() |
d2acc168d2 | ||
![]() |
c44f165fe1 | ||
![]() |
b44566c6bc | ||
![]() |
c287e49eac | ||
![]() |
cdc30b1279 | ||
![]() |
a5371e29c5 | ||
![]() |
3f31d6f7a2 | ||
![]() |
2b73095ebd | ||
![]() |
902783df21 | ||
![]() |
28e1b23955 | ||
![]() |
828ae3541a | ||
![]() |
aee8c2d1d3 | ||
![]() |
12c4f79604 | ||
![]() |
996d88a9b4 | ||
![]() |
4436d84b55 | ||
![]() |
56ff097266 | ||
![]() |
730ae9a96f | ||
![]() |
a2997f1595 | ||
![]() |
f0d691b1ed | ||
![]() |
807fee01b1 | ||
![]() |
4a7af239ce | ||
![]() |
45e567bcab | ||
![]() |
64b9032b51 | ||
![]() |
f26df4743c | ||
![]() |
f5b5773b50 | ||
![]() |
89eef68dbd | ||
![]() |
ac47b5772f | ||
![]() |
58ad0a3543 | ||
![]() |
0a9aca4b2b | ||
![]() |
4fe3415822 | ||
![]() |
8f23e85b17 | ||
![]() |
8a56503b2b | ||
![]() |
22db0b952c | ||
![]() |
45c8766eda | ||
![]() |
242b35f98f | ||
![]() |
ece0ccf269 | ||
![]() |
ac9cc5bf9c | ||
![]() |
8dd3eff128 | ||
![]() |
0a81e2a1a1 | ||
![]() |
400c69f89d | ||
![]() |
41cda6641c | ||
![]() |
1b9b48dcbc | ||
![]() |
52a4d37e63 | ||
![]() |
31d0247981 | ||
![]() |
9999762b08 | ||
![]() |
fb8963b2c6 | ||
![]() |
27f24b0ca5 | ||
![]() |
7840b3f80d | ||
![]() |
7e58e945bb | ||
![]() |
e950b0a7eb | ||
![]() |
0b5bf96436 | ||
![]() |
26a755a149 | ||
![]() |
1769f70845 | ||
![]() |
555079da6d | ||
![]() |
18fa243f2a | ||
![]() |
7ae5dcabaf | ||
![]() |
d4b92e05f0 | ||
![]() |
7c1adc589a | ||
![]() |
83141dd4ea | ||
![]() |
f3e7006c02 | ||
![]() |
11e76c2787 | ||
![]() |
5d91cca518 | ||
![]() |
9c77f92616 | ||
![]() |
ff1f3e32e6 | ||
![]() |
30d62f19ac | ||
![]() |
f694a56254 | ||
![]() |
0ddbffdecf | ||
![]() |
a4ff6061b3 | ||
![]() |
6a5fff0b7f | ||
![]() |
9640be90a4 | ||
![]() |
7c2391b021 | ||
![]() |
b55208b27b | ||
![]() |
5f3d73a3b1 | ||
![]() |
0fe351798a | ||
![]() |
9b5f6a28f9 | ||
![]() |
e7d3708056 | ||
![]() |
f2209005e9 | ||
![]() |
6e60306313 | ||
![]() |
b140a786df | ||
![]() |
d0a491d74b | ||
![]() |
7d2248d211 | ||
![]() |
a563c082a5 | ||
![]() |
4a52864b39 | ||
![]() |
7a93987f10 | ||
![]() |
a24ce43278 | ||
![]() |
fa462fe3fc | ||
![]() |
c5be0ccd34 | ||
![]() |
87301620c6 | ||
![]() |
f161ad96dd | ||
![]() |
e78cd97066 | ||
![]() |
6a76b64d51 | ||
![]() |
48136b0a7d | ||
![]() |
517ea46023 | ||
![]() |
1c531f7d14 | ||
![]() |
e014a79e16 | ||
![]() |
47fdfa6dfa | ||
![]() |
0e6ffaaab4 | ||
![]() |
9f87e7dc60 | ||
![]() |
0e80fa5720 | ||
![]() |
2388c38f50 | ||
![]() |
652244fbab | ||
![]() |
f2725178b1 | ||
![]() |
c39facc73f | ||
![]() |
bae7813acb | ||
![]() |
36145a44cb | ||
![]() |
626a869da6 | ||
![]() |
edc101bf01 | ||
![]() |
35f0184cb3 | ||
![]() |
3486e9e029 | ||
![]() |
60e6c5b36a | ||
![]() |
19b67bb06e | ||
![]() |
c19acce9c3 | ||
![]() |
9270513f14 | ||
![]() |
7df23eed2c | ||
![]() |
d2a0f74bbd | ||
![]() |
43330dc04f | ||
![]() |
316b0989c3 | ||
![]() |
24ee072442 | ||
![]() |
254eb8b97e | ||
![]() |
a64295658e | ||
![]() |
dd7b9db685 | ||
![]() |
41bc8465d2 | ||
![]() |
ff465262c9 | ||
![]() |
49ef661478 | ||
![]() |
b709a2f624 | ||
![]() |
84333a5f08 | ||
![]() |
06e3ac4828 | ||
![]() |
063310e51a | ||
![]() |
4390715f4b | ||
![]() |
a9a77940c5 | ||
![]() |
20a552b4b7 | ||
![]() |
80539b774e | ||
![]() |
0cf014601d | ||
![]() |
08498d209a | ||
![]() |
d4bfb633bb | ||
![]() |
b3f0e529cf | ||
![]() |
d29aa37eb2 | ||
![]() |
3db8b258dc | ||
![]() |
ada9f6888d | ||
![]() |
3b1dfe42df | ||
![]() |
760055e129 | ||
![]() |
18497ff03c | ||
![]() |
1a376f60bb | ||
![]() |
7dc50c125f | ||
![]() |
6649a120d5 | ||
![]() |
5fd9688f98 | ||
![]() |
efcf3217c8 | ||
![]() |
10f095c4fd | ||
![]() |
460836445c | ||
![]() |
20b8af5054 | ||
![]() |
1249e8af70 | ||
![]() |
739cfb6fe2 | ||
![]() |
a084c2525c | ||
![]() |
5950e4481a | ||
![]() |
1ef90f4214 | ||
![]() |
78381e59e5 | ||
![]() |
82d1a92460 | ||
![]() |
96fb905fdb | ||
![]() |
63325edc97 | ||
![]() |
2a56f130c1 | ||
![]() |
06466905a5 | ||
![]() |
531e58ed9a | ||
![]() |
0afedaebf4 | ||
![]() |
a5fb19ba9e | ||
![]() |
da17cec722 | ||
![]() |
cdf0818752 | ||
![]() |
dcda3bd22c | ||
![]() |
3694df2731 | ||
![]() |
9297bcde1c | ||
![]() |
bfb484b513 | ||
![]() |
ccad67b16c | ||
![]() |
d011db3f5e | ||
![]() |
e89ff6ea98 | ||
![]() |
0c4b89c4af | ||
![]() |
6eca6f1c3d | ||
![]() |
d2faf40e6a | ||
![]() |
74f4163a10 | ||
![]() |
33d309a669 | ||
![]() |
6720eadad4 | ||
![]() |
dd6fe21ac7 | ||
![]() |
e07eb4bf73 | ||
![]() |
4f9d567e56 | ||
![]() |
7bd8ff68fa | ||
![]() |
01ee16471b | ||
![]() |
941769f204 | ||
![]() |
ca9930464e | ||
![]() |
64015ef8f3 | ||
![]() |
e95042bf4b | ||
![]() |
8cf50f01b7 | ||
![]() |
3561fc3f38 | ||
![]() |
c59071734b | ||
![]() |
7a7f7a49a6 | ||
![]() |
3e44e43ac4 | ||
![]() |
d45d7ef5bb | ||
![]() |
6aa00a5d69 | ||
![]() |
daec896b8d | ||
![]() |
de5fa400e7 | ||
![]() |
276fd9f230 | ||
![]() |
31f35bd550 | ||
![]() |
a4527a8333 | ||
![]() |
3fa5d957b6 | ||
![]() |
47f36e98f7 | ||
![]() |
5f12463992 | ||
![]() |
673664378f | ||
![]() |
11fbab3c47 | ||
![]() |
ba260b9b1e | ||
![]() |
1ddee6b195 | ||
![]() |
b7ef571401 | ||
![]() |
a7dfa4bcbf | ||
![]() |
07f403173c | ||
![]() |
8bb97dadfe | ||
![]() |
45590a8fa1 | ||
![]() |
b5a79701d0 | ||
![]() |
c118c1160a | ||
![]() |
a736588958 | ||
![]() |
6a2b86753b | ||
![]() |
24c97a54fb | ||
![]() |
e282874fe3 | ||
![]() |
af91dbfed9 | ||
![]() |
acd8c6ff28 | ||
![]() |
b13d6a49ee | ||
![]() |
96a36de713 | ||
![]() |
84e664e86e | ||
![]() |
86a72a05fa | ||
![]() |
0a7b4d478a | ||
![]() |
73e7271188 | ||
![]() |
87fda39df8 | ||
![]() |
3099a98b51 | ||
![]() |
d1f7f147dc | ||
![]() |
f427ae81a6 | ||
![]() |
7b3fdebfbc | ||
![]() |
c2c4a44931 | ||
![]() |
523eeee3bb | ||
![]() |
8c8841e7b1 | ||
![]() |
bc0fd1b465 | ||
![]() |
e5fbfefb79 | ||
![]() |
7f14d9b5a8 | ||
![]() |
90b2b8a551 | ||
![]() |
be105c8eb7 | ||
![]() |
d641caf90c | ||
![]() |
d9de1dd22f | ||
![]() |
bdc9d357f3 | ||
![]() |
480df6a436 | ||
![]() |
36e84a4b46 | ||
![]() |
809841098d | ||
![]() |
f079df140c | ||
![]() |
1eb40d3c4c | ||
![]() |
ef1bd286a9 | ||
![]() |
dd73b0ad7f | ||
![]() |
87e831b3af | ||
![]() |
babfab2d1f | ||
![]() |
c83ac3f3db | ||
![]() |
e8cc7eb3cb | ||
![]() |
3dedc1cda1 | ||
![]() |
07b851b3c7 | ||
![]() |
4d378815ba | ||
![]() |
b770ea4871 | ||
![]() |
73b9704159 | ||
![]() |
e86fb7699d | ||
![]() |
9646590496 | ||
![]() |
900fb349ee | ||
![]() |
6d8a85d12f | ||
![]() |
3945de161e | ||
![]() |
de2922a8eb | ||
![]() |
2cd8f89bdb | ||
![]() |
2fcd6e9fa9 | ||
![]() |
7de83e9433 | ||
![]() |
c8236ed0ea | ||
![]() |
dce6091503 | ||
![]() |
9897863130 | ||
![]() |
8fe7c109ed | ||
![]() |
14a7529ce7 | ||
![]() |
c699b8e22b | ||
![]() |
14974e52a9 | ||
![]() |
7a794192ca | ||
![]() |
3dcb66cac5 | ||
![]() |
69778c8b4f | ||
![]() |
4711bafeb3 | ||
![]() |
5f2bb06f56 | ||
![]() |
bab252f741 | ||
![]() |
330f0f7700 | ||
![]() |
ddf5784289 | ||
![]() |
1a6af150d8 | ||
![]() |
cd684aeb34 | ||
![]() |
153bb7cb24 | ||
![]() |
58cab5d017 | ||
![]() |
9347b00a59 | ||
![]() |
1bb9e46a5d | ||
![]() |
d1e7bf6405 | ||
![]() |
330e504c85 | ||
![]() |
37a41b3bc9 | ||
![]() |
6f8c70877c | ||
![]() |
1942b11fb5 | ||
![]() |
07aee046be | ||
![]() |
2cf2dcd117 | ||
![]() |
980863ab38 | ||
![]() |
c06506c317 | ||
![]() |
272c15ed39 | ||
![]() |
8fb6287300 | ||
![]() |
f176c4fd65 | ||
![]() |
26e3866e8c | ||
![]() |
ac86fd2c7d | ||
![]() |
3cb598c1b2 | ||
![]() |
dbf85fc441 | ||
![]() |
019657826c | ||
![]() |
16b1162d2d | ||
![]() |
dc5ef57351 | ||
![]() |
9b44978bfe | ||
![]() |
40c85f2386 | ||
![]() |
06ad056a4b | ||
![]() |
d81569066d | ||
![]() |
9d03717f56 | ||
![]() |
e89bda698a | ||
![]() |
805030ced6 | ||
![]() |
02d6e2103a | ||
![]() |
196fc46815 | ||
![]() |
6bc266dfd6 | ||
![]() |
cd21270db9 | ||
![]() |
dcb34e66c5 | ||
![]() |
73a82b7014 | ||
![]() |
7fc88a0b75 | ||
![]() |
48a3fe7c49 | ||
![]() |
87b9c366f1 | ||
![]() |
92e7554c24 | ||
![]() |
f5a2df1e86 | ||
![]() |
d01180ec5a | ||
![]() |
b3c20f717b | ||
![]() |
22dc6cae84 | ||
![]() |
de02503154 | ||
![]() |
14feedb16c | ||
![]() |
b1eff75034 | ||
![]() |
8cb6b8eff5 | ||
![]() |
e45fd62fe0 | ||
![]() |
02df32aea3 | ||
![]() |
c8c3d74d51 | ||
![]() |
923889f88e | ||
![]() |
96818746ab | ||
![]() |
afbfa0712f | ||
![]() |
80eb978de8 | ||
![]() |
5d2685cc5a | ||
![]() |
d0dd908110 | ||
![]() |
2a19681b93 | ||
![]() |
91e5a2f134 | ||
![]() |
1dd49791e0 | ||
![]() |
8471914a1d | ||
![]() |
dc4acff067 | ||
![]() |
1b0e783c33 | ||
![]() |
0006636f75 | ||
![]() |
7005a8a438 | ||
![]() |
e1233aad4b | ||
![]() |
d6fba5439d | ||
![]() |
9b4e19e3fc | ||
![]() |
a4a38ec9d2 | ||
![]() |
d5f108b35e | ||
![]() |
02a2761adb | ||
![]() |
488813f7f7 | ||
![]() |
054f208e9a | ||
![]() |
c277d6d482 | ||
![]() |
81ba8f6f54 | ||
![]() |
250a7cb712 | ||
![]() |
f6c4fa0559 | ||
![]() |
869eea6ae7 | ||
![]() |
61d8ea22a4 | ||
![]() |
8464bf5106 | ||
![]() |
7c870d729b | ||
![]() |
af964dbe50 | ||
![]() |
99ef8f8e7e | ||
![]() |
f9ca97a527 | ||
![]() |
3ef4747062 | ||
![]() |
a6877f5018 | ||
![]() |
0a4188d717 | ||
![]() |
c277162541 | ||
![]() |
c0649ddba1 | ||
![]() |
fb78b6f3df | ||
![]() |
cc7d196511 | ||
![]() |
2d68e382f5 | ||
![]() |
d9818ce3b4 | ||
![]() |
71a8cb1e1b | ||
![]() |
2a3b3c80d2 | ||
![]() |
fd3a157264 | ||
![]() |
b4cf7d987d | ||
![]() |
072133d51e | ||
![]() |
4a6626112f | ||
![]() |
f85a806e5f | ||
![]() |
b3e7461978 | ||
![]() |
bcb8c1c008 | ||
![]() |
418736f859 | ||
![]() |
b6839ee5e7 | ||
![]() |
c740cc5787 | ||
![]() |
2e7c301d3f | ||
![]() |
e6e4e0f4fd | ||
![]() |
6293a70d50 | ||
![]() |
894994f9bf | ||
![]() |
ee6407b00a | ||
![]() |
38e168ba09 | ||
![]() |
8595962251 | ||
![]() |
1cba45cf80 | ||
![]() |
7bacd23ccd | ||
![]() |
63f487e29a | ||
![]() |
279fa9705d | ||
![]() |
0cf81e4ef4 | ||
![]() |
2cef1d1b3f | ||
![]() |
b2865ba047 | ||
![]() |
79c696ea35 | ||
![]() |
363d0ade1c | ||
![]() |
21a687d426 | ||
![]() |
46b8f6a780 | ||
![]() |
ca2981e330 | ||
![]() |
1bb203e333 | ||
![]() |
38a2b6f5fb | ||
![]() |
fcb8190781 | ||
![]() |
2ab546bec0 | ||
![]() |
953165a219 | ||
![]() |
b2fad12098 | ||
![]() |
a15b38d22b | ||
![]() |
0dc05789e9 | ||
![]() |
fcae3385c1 | ||
![]() |
87bb16210a | ||
![]() |
1adb82f0d7 | ||
![]() |
016ee61914 | ||
![]() |
d9d15c36ef | ||
![]() |
f317091a83 | ||
![]() |
1656cd8a06 | ||
![]() |
95992f23c6 | ||
![]() |
772839cc76 | ||
![]() |
2cb8931e69 | ||
![]() |
e5a7a55538 | ||
![]() |
fdec335de4 | ||
![]() |
8f93a77b87 | ||
![]() |
f3da7ed65a | ||
![]() |
1f78f02be9 | ||
![]() |
5f00104588 | ||
![]() |
5847b38eec | ||
![]() |
300ee36a5f | ||
![]() |
0ebcf248ca | ||
![]() |
c49d37c382 | ||
![]() |
d53d4ca227 | ||
![]() |
35fd755f24 | ||
![]() |
54ff26c3ba | ||
![]() |
5bff33d41b | ||
![]() |
e8a85c91f2 | ||
![]() |
32324b7aea | ||
![]() |
b4d269d1cb | ||
![]() |
20e571ba65 | ||
![]() |
4ec9b2049b | ||
![]() |
37154a5dff | ||
![]() |
22785921fa | ||
![]() |
ce9713038b | ||
![]() |
8057f3d37e | ||
![]() |
f1e33672ba | ||
![]() |
f9c861b110 | ||
![]() |
90ccf961a0 | ||
![]() |
81f35edd6c | ||
![]() |
3cedb5a5b8 | ||
![]() |
ea523f3839 | ||
![]() |
42f2612c35 | ||
![]() |
2312e522aa | ||
![]() |
0c48b4b032 | ||
![]() |
13ced64c21 | ||
![]() |
781b854f4b | ||
![]() |
962547ecc8 | ||
![]() |
b787758a48 | ||
![]() |
60ad79fd2b | ||
![]() |
4b27bac79b | ||
![]() |
5302ee45de | ||
![]() |
a87f40efd8 | ||
![]() |
c15262a0f5 | ||
![]() |
8e66b8f926 | ||
![]() |
00bf27406c | ||
![]() |
f8e793786a | ||
![]() |
ddb71ed1e8 | ||
![]() |
b990b3ea77 | ||
![]() |
64159fa456 | ||
![]() |
3bf4bb1cda | ||
![]() |
545e571ca5 | ||
![]() |
26c94ad61b | ||
![]() |
9af466993f | ||
![]() |
97f99befb8 | ||
![]() |
57c612cfa4 | ||
![]() |
c1df46f607 | ||
![]() |
80235711f4 | ||
![]() |
c53df8b720 | ||
![]() |
48a92d41a4 | ||
![]() |
08b31da0aa | ||
![]() |
1461ad6272 | ||
![]() |
ed854f7092 | ||
![]() |
fc2ed221ff | ||
![]() |
c9e8f8b8ea | ||
![]() |
c2192204dc | ||
![]() |
bb0aa012b5 | ||
![]() |
5038f6e154 | ||
![]() |
000281e2f0 | ||
![]() |
7142bbd8ed | ||
![]() |
366a498150 | ||
![]() |
2e7b7b9079 | ||
![]() |
3e454481fd | ||
![]() |
7c818914fb | ||
![]() |
b8abf5ee29 | ||
![]() |
fc4ee2e608 | ||
![]() |
06f6c7577f | ||
![]() |
f7cce8c919 | ||
![]() |
61142e466a | ||
![]() |
4478fd68a7 | ||
![]() |
443b6dbaa4 | ||
![]() |
f9820602c3 | ||
![]() |
ec75a8ce4d | ||
![]() |
278ac51e87 | ||
![]() |
11a61166e2 | ||
![]() |
d3358cab84 | ||
![]() |
903bd34450 | ||
![]() |
ff85dde7df | ||
![]() |
b9043c251d | ||
![]() |
ec1b2a364f | ||
![]() |
b0fd823327 | ||
![]() |
228f66cf3c | ||
![]() |
22db339eee | ||
![]() |
20d0f39c15 | ||
![]() |
3f86765ba9 | ||
![]() |
eb2a3c0922 | ||
![]() |
0e0060d660 | ||
![]() |
32d4fc8232 | ||
![]() |
5684685d5b | ||
![]() |
5870eb20f0 | ||
![]() |
e3fbc08156 | ||
![]() |
5a4cf179c4 | ||
![]() |
bbbb63c393 | ||
![]() |
a5d9f299fe | ||
![]() |
86a4a7de79 | ||
![]() |
f000a33481 | ||
![]() |
691b7afc52 | ||
![]() |
868edf889e | ||
![]() |
6b01a98363 | ||
![]() |
c346e0dbac | ||
![]() |
d3605b5c3c | ||
![]() |
741e6fe72c | ||
![]() |
8d6e0b5419 | ||
![]() |
485c63c579 | ||
![]() |
0ea385cc3c | ||
![]() |
aa3635187a | ||
![]() |
466f1d00e4 | ||
![]() |
ac8f495ea2 | ||
![]() |
d352d4ece1 | ||
![]() |
2e2937081e | ||
![]() |
6e38259a4a | ||
![]() |
e8ec7bd94f | ||
![]() |
e42da81293 | ||
![]() |
cb16438a41 | ||
![]() |
21e27a4b63 | ||
![]() |
22b755fb79 | ||
![]() |
d7433af4d3 | ||
![]() |
c9f7a323cc | ||
![]() |
3ebfdd5157 | ||
![]() |
493b10da78 | ||
![]() |
068b090293 | ||
![]() |
bdac708a41 | ||
![]() |
fc98a7c59d | ||
![]() |
a86998bf6f | ||
![]() |
5eef37751b | ||
![]() |
82ea22d31a | ||
![]() |
2146bbae5f | ||
![]() |
cba5e8d340 | ||
![]() |
ce5d393109 | ||
![]() |
8de4fe831c | ||
![]() |
37fe758c34 | ||
![]() |
2c38ae90fc | ||
![]() |
09911b24cf | ||
![]() |
72a8975a4b | ||
![]() |
b133beaa77 | ||
![]() |
0d2875ed34 | ||
![]() |
cc701ea700 | ||
![]() |
37c32dbe2a | ||
![]() |
acec0dcf96 | ||
![]() |
39446cbc33 | ||
![]() |
8df19ae24b | ||
![]() |
55937a0cfd | ||
![]() |
9823170617 | ||
![]() |
4fb54a25c1 | ||
![]() |
bfb7852b3f | ||
![]() |
f84c91d95f | ||
![]() |
2e63bf7dd8 | ||
![]() |
bb1c4d4ee6 | ||
![]() |
91dd6dcb1d | ||
![]() |
72439f42c6 | ||
![]() |
718de432f3 | ||
![]() |
bb197027cb | ||
![]() |
99a3f164a9 | ||
![]() |
fe1e93e20d | ||
![]() |
4daf17da79 | ||
![]() |
b73ab7fd91 | ||
![]() |
30353cc733 | ||
![]() |
38ae54a27f | ||
![]() |
b4bea5e8ee | ||
![]() |
b97ef2cfe8 | ||
![]() |
495ad42fd7 | ||
![]() |
1223a8a170 | ||
![]() |
52044c8181 | ||
![]() |
13b4340747 | ||
![]() |
37baddcf27 | ||
![]() |
32c75ebfd9 | ||
![]() |
0294b9bcc8 | ||
![]() |
a2b1353db5 | ||
![]() |
09294d640b | ||
![]() |
8c14d0dceb | ||
![]() |
e10e71ebf5 | ||
![]() |
37f74ee958 | ||
![]() |
592a42b0cb | ||
![]() |
7d1fa55cc4 | ||
![]() |
a90ff65260 | ||
![]() |
01ba757d3a | ||
![]() |
c333976a44 | ||
![]() |
56f379b0fc | ||
![]() |
f0bb4c639b | ||
![]() |
7f8962c882 | ||
![]() |
9b5e6db137 | ||
![]() |
4e1692ffed | ||
![]() |
82a5de0821 | ||
![]() |
cedbdbaaf1 | ||
![]() |
e09d7193a2 | ||
![]() |
109e1e9bac | ||
![]() |
c845fe5ca3 | ||
![]() |
9fcce62e20 | ||
![]() |
c383aab383 | ||
![]() |
eb05bac07d | ||
![]() |
abc1338abe | ||
![]() |
029e17fc81 | ||
![]() |
b5660eae7e | ||
![]() |
f4f9f8a773 | ||
![]() |
a5c343a289 | ||
![]() |
373a2095bb | ||
![]() |
43f7749604 | ||
![]() |
0533d17422 | ||
![]() |
6974cd6012 | ||
![]() |
62060aaf21 | ||
![]() |
92eca1be16 | ||
![]() |
24e767b127 | ||
![]() |
743897c5be | ||
![]() |
50f30e22a6 | ||
![]() |
8c622a9bac | ||
![]() |
3cae6ae4e6 | ||
![]() |
97f349a81d | ||
![]() |
392a184bc8 | ||
![]() |
4c00ffa2f0 | ||
![]() |
c6d0ce5596 | ||
![]() |
8aff36fc8a | ||
![]() |
48f7f62fcb | ||
![]() |
209a58171e | ||
![]() |
7fc88f036b | ||
![]() |
9afd56d00d | ||
![]() |
cb06e80421 | ||
![]() |
a0839171d6 | ||
![]() |
c1e028028f | ||
![]() |
2b2dc27f24 | ||
![]() |
4767ebc6f1 | ||
![]() |
eccae6d0d5 | ||
![]() |
2488a5c0ce | ||
![]() |
ebf249b6cc | ||
![]() |
a6489acd6b | ||
![]() |
2c3e8c938b | ||
![]() |
5544ea54d7 | ||
![]() |
1154ab483b | ||
![]() |
48f47b5214 | ||
![]() |
08cdd9513a | ||
![]() |
6c8ef48f94 | ||
![]() |
cba2ca0dbd | ||
![]() |
5b0588f378 | ||
![]() |
95466e29be | ||
![]() |
59a4a56bfc | ||
![]() |
1bd748f79e | ||
![]() |
6700accfd3 | ||
![]() |
ed8a2e6166 | ||
![]() |
1dba010ea9 | ||
![]() |
51cec76c2b | ||
![]() |
91856f0423 | ||
![]() |
986870061d | ||
![]() |
53cbf063e3 | ||
![]() |
949b69e812 | ||
![]() |
6e8a0737b5 | ||
![]() |
d177ee2fc5 | ||
![]() |
e8cdb5619c | ||
![]() |
1f9497ad09 | ||
![]() |
54acae87ea | ||
![]() |
f284233f9a | ||
![]() |
28b273e798 | ||
![]() |
ac38a614e9 | ||
![]() |
a14df5aa5f | ||
![]() |
fa0782d729 | ||
![]() |
6934d24651 | ||
![]() |
36adb5e4d2 | ||
![]() |
312f4b8c6d | ||
![]() |
3d6afccae1 | ||
![]() |
936c876810 | ||
![]() |
b6471fba31 | ||
![]() |
15efcb4282 | ||
![]() |
604ff5df39 | ||
![]() |
85d720cefc | ||
![]() |
4560ccc1cd | ||
![]() |
00082ee8a5 | ||
![]() |
bbec8c5c1e | ||
![]() |
535aa1a2ee | ||
![]() |
6718944b0f | ||
![]() |
cb943a8718 | ||
![]() |
36c689388f | ||
![]() |
c5ca661b96 | ||
![]() |
2c947abf7b | ||
![]() |
b6ea481c23 | ||
![]() |
c7d74cf6c0 | ||
![]() |
ffc4d56918 | ||
![]() |
5505deb1c9 | ||
![]() |
3792613d2d | ||
![]() |
5f5f44e8e0 | ||
![]() |
cf26cc7c92 | ||
![]() |
877ede7735 | ||
![]() |
3be22e0620 | ||
![]() |
820f2699ca | ||
![]() |
7bb80d19b1 | ||
![]() |
a8f946e0b3 | ||
![]() |
19dfb960f1 | ||
![]() |
295e481552 | ||
![]() |
580b7ed020 | ||
![]() |
76bc976d3b | ||
![]() |
c4f51090ae | ||
![]() |
54369a00e6 | ||
![]() |
02afeb5bc0 | ||
![]() |
7a5886b976 | ||
![]() |
b447c809bd | ||
![]() |
0f845e9ba1 | ||
![]() |
8afec14376 | ||
![]() |
9310713da1 | ||
![]() |
9b3fd3d16b | ||
![]() |
c8bd6053c7 | ||
![]() |
152720f00e | ||
![]() |
8c5f28c2f0 | ||
![]() |
bd92ec3fea | ||
![]() |
9a5e7e42ef | ||
![]() |
db5d9f6dbb | ||
![]() |
33ee1cd85e | ||
![]() |
62f5c85238 | ||
![]() |
4affefc68d | ||
![]() |
062585e281 | ||
![]() |
e4a42155d3 | ||
![]() |
7a53caa7fb | ||
![]() |
861443c740 | ||
![]() |
7c1550cbe9 | ||
![]() |
f46ee0732f | ||
![]() |
1c89dd5776 | ||
![]() |
b9474e84a3 | ||
![]() |
4593b61ff5 | ||
![]() |
245791f79f | ||
![]() |
3a62220e87 | ||
![]() |
3ba2df7386 | ||
![]() |
96699459d1 | ||
![]() |
4b7caf2a5b | ||
![]() |
cb5eebb145 | ||
![]() |
b6121341b9 | ||
![]() |
a4c4e198d6 | ||
![]() |
2d19c0685b | ||
![]() |
61bb059c75 | ||
![]() |
66d533d038 | ||
![]() |
23d8ed7c01 | ||
![]() |
b1aef98220 | ||
![]() |
f77eca0006 | ||
![]() |
05b4b5fd06 | ||
![]() |
02707cf270 | ||
![]() |
4ff4cbcc41 | ||
![]() |
e298e3daa4 | ||
![]() |
11e9a20531 | ||
![]() |
05b9e6e43c | ||
![]() |
528758e962 | ||
![]() |
fd24b9552b | ||
![]() |
9ec14f13a1 | ||
![]() |
5f0040679d | ||
![]() |
5253669495 | ||
![]() |
7a76f1d22d | ||
![]() |
064a1e33e1 | ||
![]() |
ff8f4ea9fc | ||
![]() |
7cf9c2d6be | ||
![]() |
3e8d3320f7 | ||
![]() |
6dea67825a | ||
![]() |
1b23976aa2 | ||
![]() |
64fcee7e49 | ||
![]() |
a656762710 | ||
![]() |
4ed314d1e7 | ||
![]() |
d57b4770ed | ||
![]() |
0d9dfe7120 | ||
![]() |
442dcfe5b8 | ||
![]() |
ecf42ad7f5 | ||
![]() |
8849e84e1c | ||
![]() |
4ed6af67ac | ||
![]() |
8fde53cf31 | ||
![]() |
517eb42015 | ||
![]() |
13e375b281 | ||
![]() |
2056d81682 | ||
![]() |
5167f0e576 | ||
![]() |
109e0d8cb6 | ||
![]() |
e7662b11b5 | ||
![]() |
d3c56d3ab8 | ||
![]() |
e531bd6359 | ||
![]() |
53e5e4272e | ||
![]() |
e3c75289bc | ||
![]() |
4d57de5c06 | ||
![]() |
7330ea4946 | ||
![]() |
925f9cd168 | ||
![]() |
291597edb9 | ||
![]() |
a508824b0f | ||
![]() |
11806dc5cb | ||
![]() |
1e82f76596 | ||
![]() |
9c60343692 | ||
![]() |
610b17e1a1 | ||
![]() |
20365f8cb8 | ||
![]() |
8e22c009fd | ||
![]() |
b8e8609f5f | ||
![]() |
eaa8d0f15e | ||
![]() |
573ebe7462 | ||
![]() |
3014c3e42d | ||
![]() |
983e586c9c | ||
![]() |
090bbaa30f | ||
![]() |
80863476b9 | ||
![]() |
6c17718242 | ||
![]() |
c5345f45eb | ||
![]() |
a17ac59aef | ||
![]() |
8179adf38e | ||
![]() |
febfcd73c9 | ||
![]() |
f3f8d635d5 | ||
![]() |
0550ba91d3 | ||
![]() |
d032dc6b33 | ||
![]() |
c4a7c87d69 | ||
![]() |
2bde578a38 | ||
![]() |
495458c589 | ||
![]() |
d121518911 | ||
![]() |
f111c10b18 | ||
![]() |
956b55b55e | ||
![]() |
39724b991a | ||
![]() |
aa8aa83db8 | ||
![]() |
f7dfd59a5e | ||
![]() |
ab9e5875a2 | ||
![]() |
6294ad3ef0 | ||
![]() |
a5bfaa8a7d | ||
![]() |
a852407c88 | ||
![]() |
e79e8188a5 | ||
![]() |
e72b2ba985 | ||
![]() |
a8228ecd80 | ||
![]() |
227750e0ee | ||
![]() |
c99ced2a7d | ||
![]() |
c0218b2489 | ||
![]() |
580e57ddee | ||
![]() |
92111e09cf | ||
![]() |
709e314836 | ||
![]() |
211f09afbc | ||
![]() |
dce5dd5e71 | ||
![]() |
b10147f16b | ||
![]() |
752e7141c8 | ||
![]() |
7d40926367 | ||
![]() |
706f48bd25 | ||
![]() |
646a67b8bd | ||
![]() |
77d0105b4a | ||
![]() |
d029c46a76 | ||
![]() |
5f0f7653e0 | ||
![]() |
02240fac98 | ||
![]() |
cebde8f9f6 | ||
![]() |
427057dd1e | ||
![]() |
7b810c48a9 | ||
![]() |
72543a82e7 | ||
![]() |
4db40256d9 | ||
![]() |
fb5f647368 | ||
![]() |
e441d247ee | ||
![]() |
6d534b46c8 | ||
![]() |
c6d95cb904 | ||
![]() |
9122b8d935 | ||
![]() |
a157e20ed0 | ||
![]() |
34b9518cfe | ||
![]() |
47ff95e8d2 | ||
![]() |
6302b26c99 | ||
![]() |
dbb3f3accf | ||
![]() |
4f9b698586 | ||
![]() |
ac8545e0d1 | ||
![]() |
f87f9d0800 | ||
![]() |
a79e7843f2 | ||
![]() |
7e2acfc593 |
794 changed files with 107029 additions and 19085 deletions
|
@ -1,6 +0,0 @@
|
|||
demo/markdown-it.min.js
|
||||
demo/markdownlint-browser.js
|
||||
demo/markdownlint-browser.min.js
|
||||
demo/markdownlint-rule-helpers-browser.js
|
||||
demo/markdownlint-rule-helpers-browser.min.js
|
||||
example/typescript/type-check.js
|
228
.eslintrc.json
228
.eslintrc.json
|
@ -1,228 +0,0 @@
|
|||
{
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 2019
|
||||
},
|
||||
"env": {
|
||||
"node": true,
|
||||
"es6": true
|
||||
},
|
||||
"plugins": [
|
||||
"jsdoc",
|
||||
"node",
|
||||
"unicorn"
|
||||
],
|
||||
"extends": [
|
||||
"eslint:all",
|
||||
"plugin:jsdoc/recommended"
|
||||
],
|
||||
"settings": {
|
||||
"jsdoc": {
|
||||
"preferredTypes": {
|
||||
"object": "Object"
|
||||
}
|
||||
}
|
||||
},
|
||||
"reportUnusedDisableDirectives": true,
|
||||
"rules": {
|
||||
"array-bracket-spacing": ["error", "always"],
|
||||
"array-element-newline": "off",
|
||||
"capitalized-comments": "off",
|
||||
"complexity": "off",
|
||||
"dot-location": ["error", "property"],
|
||||
"func-style": ["error", "declaration"],
|
||||
"function-call-argument-newline": "off",
|
||||
"function-paren-newline": "off",
|
||||
"global-require": "off",
|
||||
"id-length": "off",
|
||||
"indent": ["error", 2, { "SwitchCase": 1 }],
|
||||
"linebreak-style": "off",
|
||||
"max-depth": "off",
|
||||
"max-lines": "off",
|
||||
"max-lines-per-function": "off",
|
||||
"max-params": ["error", 10],
|
||||
"max-statements": "off",
|
||||
"multiline-comment-style": ["error", "separate-lines"],
|
||||
"multiline-ternary": "off",
|
||||
"newline-per-chained-call": "off",
|
||||
"no-continue": "off",
|
||||
"no-empty-function": "off",
|
||||
"no-extra-parens": "off",
|
||||
"no-implicit-coercion": "off",
|
||||
"no-magic-numbers": "off",
|
||||
"no-nested-ternary": "off",
|
||||
"no-param-reassign": "off",
|
||||
"no-plusplus": "off",
|
||||
"no-sync": "off",
|
||||
"no-ternary": "off",
|
||||
"no-undefined": "off",
|
||||
"object-curly-spacing": ["error", "always"],
|
||||
"object-shorthand": "off",
|
||||
"one-var": "off",
|
||||
"operator-linebreak": ["error", "after"],
|
||||
"padded-blocks": "off",
|
||||
"prefer-arrow-callback": "off",
|
||||
"prefer-destructuring": "off",
|
||||
"prefer-named-capture-group": "off",
|
||||
"prefer-template": "off",
|
||||
"require-unicode-regexp": "off",
|
||||
"sort-keys": "off",
|
||||
"space-before-function-paren": ["error", "never"],
|
||||
"vars-on-top": "off",
|
||||
"wrap-regex": "off",
|
||||
|
||||
"jsdoc/check-examples": "error",
|
||||
"jsdoc/check-indentation": "error",
|
||||
"jsdoc/check-line-alignment": "error",
|
||||
"jsdoc/check-syntax": "error",
|
||||
"jsdoc/match-description": "error",
|
||||
"jsdoc/no-bad-blocks": "error",
|
||||
"jsdoc/no-defaults": "error",
|
||||
"jsdoc/require-description": "error",
|
||||
"jsdoc/require-description-complete-sentence": "error",
|
||||
|
||||
"node/handle-callback-err": "error",
|
||||
"node/no-callback-literal": "error",
|
||||
"node/no-exports-assign": "error",
|
||||
"node/no-extraneous-import": "error",
|
||||
"node/no-extraneous-require": "error",
|
||||
"node/no-missing-import": "error",
|
||||
"node/no-missing-require": "error",
|
||||
"node/no-new-require": "error",
|
||||
"node/no-path-concat": "error",
|
||||
"node/no-process-exit": "error",
|
||||
"node/no-unpublished-bin": "error",
|
||||
"node/no-unpublished-import": "error",
|
||||
"node/no-unpublished-require": "error",
|
||||
"node/no-unsupported-features/es-builtins": "error",
|
||||
"node/no-unsupported-features/es-syntax": "error",
|
||||
"node/no-unsupported-features/node-builtins": ["error", {
|
||||
"ignores": [
|
||||
"fs.promises"
|
||||
]
|
||||
}],
|
||||
"node/process-exit-as-throw": "error",
|
||||
"node/shebang": "error",
|
||||
"node/no-deprecated-api": "error",
|
||||
"node/callback-return": "error",
|
||||
"node/exports-style": "error",
|
||||
"node/file-extension-in-import": "error",
|
||||
"node/global-require": "off",
|
||||
"node/no-mixed-requires": "error",
|
||||
"node/no-process-env": "error",
|
||||
"node/no-restricted-import": "error",
|
||||
"node/no-restricted-require": "error",
|
||||
"node/no-sync": "off",
|
||||
"node/prefer-global/buffer": "error",
|
||||
"node/prefer-global/console": "error",
|
||||
"node/prefer-global/process": "error",
|
||||
"node/prefer-global/text-decoder": "error",
|
||||
"node/prefer-global/text-encoder": "error",
|
||||
"node/prefer-global/url-search-params": "error",
|
||||
"node/prefer-global/url": "error",
|
||||
"node/prefer-promises/dns": "error",
|
||||
"node/prefer-promises/fs": "off",
|
||||
|
||||
"unicorn/better-regex": "off",
|
||||
"unicorn/catch-error-name": "error",
|
||||
"unicorn/consistent-destructuring": "error",
|
||||
"unicorn/consistent-function-scoping": "off",
|
||||
"unicorn/custom-error-definition": "error",
|
||||
"unicorn/empty-brace-spaces": "error",
|
||||
"unicorn/error-message": "error",
|
||||
"unicorn/escape-case": "error",
|
||||
"unicorn/expiring-todo-comments": "error",
|
||||
"unicorn/explicit-length-check": "error",
|
||||
"unicorn/filename-case": "off",
|
||||
"unicorn/import-index": "error",
|
||||
"unicorn/import-style": "error",
|
||||
"unicorn/new-for-builtins": "error",
|
||||
"unicorn/no-abusive-eslint-disable": "error",
|
||||
"unicorn/no-array-callback-reference": "off",
|
||||
"unicorn/no-array-for-each": "off",
|
||||
"unicorn/no-array-push-push": "error",
|
||||
"unicorn/no-array-reduce": "error",
|
||||
"unicorn/no-console-spaces": "error",
|
||||
"unicorn/no-for-loop": "error",
|
||||
"unicorn/no-hex-escape": "error",
|
||||
"unicorn/no-instanceof-array": "error",
|
||||
"unicorn/no-keyword-prefix": "off",
|
||||
"unicorn/no-lonely-if": "error",
|
||||
"unicorn/no-nested-ternary": "error",
|
||||
"unicorn/no-new-array": "off",
|
||||
"unicorn/no-new-buffer": "error",
|
||||
"unicorn/no-null": "off",
|
||||
"unicorn/no-object-as-default-parameter": "error",
|
||||
"unicorn/no-process-exit": "error",
|
||||
"unicorn/no-this-assignment": "error",
|
||||
"unicorn/no-unreadable-array-destructuring": "error",
|
||||
"unicorn/no-unsafe-regex": "off",
|
||||
"unicorn/no-unused-properties": "error",
|
||||
"unicorn/no-useless-undefined": "error",
|
||||
"unicorn/no-zero-fractions": "error",
|
||||
"unicorn/number-literal-case": "error",
|
||||
"unicorn/numeric-separators-style": "error",
|
||||
"unicorn/prefer-add-event-listener": "error",
|
||||
"unicorn/prefer-array-find": "error",
|
||||
"unicorn/prefer-array-flat-map": "error",
|
||||
"unicorn/prefer-array-index-of": "error",
|
||||
"unicorn/prefer-array-some": "error",
|
||||
"unicorn/prefer-date-now": "error",
|
||||
"unicorn/prefer-default-parameters": "error",
|
||||
"unicorn/prefer-dom-node-append": "error",
|
||||
"unicorn/prefer-dom-node-dataset": "error",
|
||||
"unicorn/prefer-dom-node-remove": "error",
|
||||
"unicorn/prefer-dom-node-text-content": "error",
|
||||
"unicorn/prefer-includes": "error",
|
||||
"unicorn/prefer-keyboard-event-key": "error",
|
||||
"unicorn/prefer-math-trunc": "error",
|
||||
"unicorn/prefer-modern-dom-apis": "error",
|
||||
"unicorn/prefer-negative-index": "error",
|
||||
"unicorn/prefer-number-properties": "error",
|
||||
"unicorn/prefer-optional-catch-binding": "error",
|
||||
"unicorn/prefer-query-selector": "error",
|
||||
"unicorn/prefer-reflect-apply": "error",
|
||||
"unicorn/prefer-regexp-test": "error",
|
||||
"unicorn/prefer-set-has": "error",
|
||||
"unicorn/prefer-spread": "error",
|
||||
"unicorn/prefer-string-replace-all": "off",
|
||||
"unicorn/prefer-string-slice": "off",
|
||||
"unicorn/prefer-string-starts-ends-with": "error",
|
||||
"unicorn/prefer-string-trim-start-end": "error",
|
||||
"unicorn/prefer-ternary": "error",
|
||||
"unicorn/prefer-type-error": "error",
|
||||
"unicorn/prevent-abbreviations": "off",
|
||||
"unicorn/string-content": "error",
|
||||
"unicorn/throw-new-error": "error"
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
"files": [
|
||||
"demo/*.js"
|
||||
],
|
||||
"env": {
|
||||
"browser": true
|
||||
},
|
||||
"rules": {
|
||||
"jsdoc/require-jsdoc": "off",
|
||||
"unicorn/prefer-query-selector": "off",
|
||||
"unicorn/prefer-add-event-listener": "off",
|
||||
"no-console": "off",
|
||||
"no-shadow": "off",
|
||||
"no-var": "off"
|
||||
}
|
||||
},
|
||||
{
|
||||
"files": [
|
||||
"example/*.js"
|
||||
],
|
||||
"rules": {
|
||||
"node/no-missing-require": "off",
|
||||
"node/no-extraneous-require": "off",
|
||||
"no-console": "off",
|
||||
"no-invalid-this": "off",
|
||||
"no-shadow": "off",
|
||||
"object-property-newline": "off"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
1
.github/FUNDING.yml
vendored
Normal file
1
.github/FUNDING.yml
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
github: DavidAnson
|
1
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
1
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
blank_issues_enabled: false
|
40
.github/ISSUE_TEMPLATE/markdownlint-issue-template.md
vendored
Normal file
40
.github/ISSUE_TEMPLATE/markdownlint-issue-template.md
vendored
Normal file
|
@ -0,0 +1,40 @@
|
|||
---
|
||||
name: markdownlint issue template
|
||||
about: This template helps report issues with the markdownlint family of tools.
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
---
|
||||
|
||||
<!--
|
||||
|
||||
Thank you for taking the time to report an issue!
|
||||
|
||||
When deciding where to open an issue, please note there are multiple projects under the markdownlint umbrella:
|
||||
|
||||
- https://github.com/DavidAnson/markdownlint : This is the core JavaScript/Node.js library and is used by other tools. Most issues with implementation and rule behavior belong here.
|
||||
- https://github.com/igorshubovych/markdownlint-cli : This is the original CLI for markdownlint. Issues specific to CLI belong here.
|
||||
- https://github.com/DavidAnson/markdownlint-cli2 : This is a newer CLI for markdownlint and is used by other tools. Issues specific to CLI2 belong here.
|
||||
- https://github.com/DavidAnson/vscode-markdownlint : This is the Visual Studio Code extension for markdownlint. Issues specific to VS Code belong here.
|
||||
- https://github.com/DavidAnson/markdownlint-cli2-action : This is a GitHub Action for markdownlint. Issues specific to the Action belong here.
|
||||
- https://github.com/markdownlint/markdownlint : This is the original markdownlint implementation for Ruby. All Ruby-related issues belong here.
|
||||
|
||||
Before creating an issue, it's a good practice to search existing issues for something similar. If your issue has already been reported, please update the existing one with any new information. It's also good to review the documentation for any relevant details.
|
||||
|
||||
When describing an issue, the following information is helpful:
|
||||
|
||||
- What did you do?
|
||||
- What did you expect to happen?
|
||||
- What actually happened?
|
||||
- What messages or errors were there?
|
||||
- How can the issue be reproduced?
|
||||
- What version were you using?
|
||||
- What operating system were you using?
|
||||
|
||||
The simplest demonstration of a problem is the most helpful. Small examples can be pasted into the issue description. (Be sure to paste as code so GitHub doesn't render the example in Markdown.) For larger examples, linking to a repository or file is more appropriate.
|
||||
|
||||
Before proposing a new rule, please review the existing suggestions: https://github.com/DavidAnson/markdownlint/issues?q=is%3Aissue+is%3Aopen+label%3A%22new+rule%22
|
||||
|
||||
Thank you!
|
||||
|
||||
-->
|
13
.github/dependabot.yml
vendored
Normal file
13
.github/dependabot.yml
vendored
Normal file
|
@ -0,0 +1,13 @@
|
|||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "daily"
|
||||
target-branch: "next"
|
||||
- package-ecosystem: "npm"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "daily"
|
||||
target-branch: "next"
|
||||
versioning-strategy: "increase"
|
122
.github/dictionary.txt
vendored
Normal file
122
.github/dictionary.txt
vendored
Normal file
|
@ -0,0 +1,122 @@
|
|||
addin
|
||||
APIs
|
||||
async
|
||||
atx
|
||||
ATX
|
||||
atx_closed
|
||||
ATX-style
|
||||
autolink
|
||||
autolinks
|
||||
Autolinks
|
||||
axibase
|
||||
backtick
|
||||
backticks
|
||||
blockquote
|
||||
blockquotes
|
||||
Boostnote
|
||||
br
|
||||
br_spaces
|
||||
bundler
|
||||
changelog
|
||||
Changelog
|
||||
changelogs
|
||||
Changelogs
|
||||
CLI
|
||||
coc-markdownlint
|
||||
CodeQL
|
||||
CodiMD
|
||||
CommonMark
|
||||
config
|
||||
Config
|
||||
config.
|
||||
CVE-\d+-\d+
|
||||
docs-util
|
||||
ECMAScript
|
||||
ES2015
|
||||
ES6
|
||||
ESLint
|
||||
eslint-plugin-markdownlint
|
||||
first-line-h1
|
||||
flymake-markdownlint-cli2
|
||||
formatter
|
||||
fs
|
||||
GFM
|
||||
github
|
||||
globbing
|
||||
grunt-markdownlint
|
||||
h1
|
||||
h2
|
||||
html_elements
|
||||
JSDoc
|
||||
JSON
|
||||
JSONC
|
||||
kramdown
|
||||
linter
|
||||
LLMs
|
||||
Lombiq
|
||||
markdownlint
|
||||
markdownlint-cli
|
||||
markdownlint-cli2
|
||||
markdownlint-rule-helpers
|
||||
markdownlint-rule-search-replace
|
||||
matcher
|
||||
MD\d\d\d
|
||||
MD\d\d\d-MD\d\d\d
|
||||
mdl
|
||||
MDN
|
||||
minified
|
||||
MkDocs
|
||||
MSBuild
|
||||
namespace
|
||||
Neovim
|
||||
no-bare-urls
|
||||
no-blanks-blockquote
|
||||
no-inline-html
|
||||
no-missing-space-atx
|
||||
no-missing-space-closed-atx
|
||||
no-multiple-space-atx
|
||||
no-multiple-space-blockquote
|
||||
no-multiple-space-closed-atx
|
||||
non-JSON
|
||||
npm
|
||||
ol
|
||||
ol_multi
|
||||
ol-prefix
|
||||
pandoc
|
||||
Pandoc
|
||||
Params
|
||||
parsers
|
||||
pre-commit
|
||||
Reactable
|
||||
README
|
||||
reimplement
|
||||
Reimplement
|
||||
setext
|
||||
setext_with_atx
|
||||
setext_with_atx_closed
|
||||
setext-style
|
||||
single-h1
|
||||
sublist
|
||||
subpath
|
||||
Super-Linter
|
||||
TestCafe
|
||||
TOML
|
||||
trimLeft
|
||||
trimRight
|
||||
ul
|
||||
ul_single
|
||||
ul-indent
|
||||
ul-start-left
|
||||
ul-style
|
||||
unhandled
|
||||
unreferenced
|
||||
url
|
||||
v12
|
||||
V8
|
||||
vscode-markdownlint
|
||||
W3C
|
||||
webhint
|
||||
webhintio
|
||||
webpack
|
||||
whitespace
|
||||
YAML
|
29
.github/workflows/checkers.yml
vendored
Normal file
29
.github/workflows/checkers.yml
vendored
Normal file
|
@ -0,0 +1,29 @@
|
|||
name: Checkers
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches-ignore:
|
||||
- 'dependabot/**'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
|
||||
linkcheck:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: JustinBeckwith/linkinator-action@v1.11.0
|
||||
with:
|
||||
linksToSkip: '^https://github.com/ ^https://opensource.org/ ^https://unix.stackexchange.com/'
|
||||
paths: '*.md doc/*.md helpers/*.md'
|
||||
timeout: 60000
|
||||
|
||||
spellcheck:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: tbroadley/spellchecker-cli-action@v1
|
||||
with:
|
||||
dictionaries: '.github/dictionary.txt'
|
||||
files: '*.md doc/*.md helpers/*.md'
|
33
.github/workflows/ci.yml
vendored
33
.github/workflows/ci.yml
vendored
|
@ -3,32 +3,47 @@ name: CI
|
|||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches-ignore:
|
||||
- 'dependabot/**'
|
||||
schedule:
|
||||
- cron: '30 12 * * *'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [macos-latest, ubuntu-latest, windows-latest]
|
||||
node-version: [10.x, 12.x, 14.x, 15.x]
|
||||
node-version: [ 20, 22, 23 ]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v4
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v1
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- name: Install Dependencies
|
||||
run: npm install --no-package-lock
|
||||
- name: Run All Validations
|
||||
if: ${{ matrix.node-version != '10.x' && matrix.node-version != '12.x' }}
|
||||
- name: Run CI Tests
|
||||
run: npm run ci
|
||||
- name: Run Tests Only
|
||||
if: ${{ matrix.node-version == '10.x' || matrix.node-version == '12.x' }}
|
||||
run: npm run test
|
||||
|
||||
pnpm:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Use pnpm latest
|
||||
uses: pnpm/action-setup@v4
|
||||
with:
|
||||
version: latest
|
||||
- name: Use Node.js latest
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: latest
|
||||
- name: Install dependencies
|
||||
run: pnpm install
|
||||
- name: Run CI Tests
|
||||
run: npm test
|
||||
|
|
17
.github/workflows/codeql-analysis.yml
vendored
17
.github/workflows/codeql-analysis.yml
vendored
|
@ -3,14 +3,16 @@ name: "CodeQL"
|
|||
on:
|
||||
pull_request:
|
||||
push:
|
||||
schedule:
|
||||
- cron: '30 12 * * *'
|
||||
branches-ignore:
|
||||
- 'dependabot/**'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
security-events: write
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
|
@ -19,18 +21,13 @@ jobs:
|
|||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 2
|
||||
|
||||
- run: git checkout HEAD^2
|
||||
if: ${{ github.event_name == 'pull_request' }}
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v1
|
||||
uses: github/codeql-action/init@v3
|
||||
with:
|
||||
config-file: ./.github/codeql-config.yaml
|
||||
languages: ${{ matrix.language }}
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v1
|
||||
uses: github/codeql-action/analyze@v3
|
||||
|
|
14
.github/workflows/test-repos.yml
vendored
14
.github/workflows/test-repos.yml
vendored
|
@ -3,6 +3,8 @@ name: TestRepos
|
|||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches-ignore:
|
||||
- 'dependabot/**'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
|
@ -12,20 +14,18 @@ jobs:
|
|||
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest]
|
||||
node-version: [12.x]
|
||||
os: [ ubuntu-latest ]
|
||||
node-version: [ latest ]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v4
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v1
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- name: Install Dependencies
|
||||
run: npm install --no-package-lock
|
||||
- name: Clone Test Repos
|
||||
run: npm run clone-test-repos-large
|
||||
run: npm run clone-test-repos
|
||||
- name: Lint Test Repos
|
||||
run: npm run lint-test-repos
|
||||
- name: Run Extra Tests
|
||||
run: npm run test-extra
|
||||
|
|
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -1,10 +1,10 @@
|
|||
coverage
|
||||
demo/markdown-it.min.js
|
||||
demo/markdownlint-browser.js
|
||||
demo/markdownlint-browser.min.js
|
||||
demo/markdownlint-browser.min.js.LICENSE.txt
|
||||
demo/markdownlint-rule-helpers-browser.*
|
||||
node_modules
|
||||
!test/node_modules
|
||||
!test/rules/node_modules
|
||||
npm-debug.log
|
||||
test-repos
|
||||
.DS_Store
|
||||
|
|
|
@ -1,8 +1,67 @@
|
|||
{
|
||||
"line-length": false,
|
||||
"no-inline-html": {
|
||||
"allowed_elements": [
|
||||
"a"
|
||||
"code-block-style": {
|
||||
"style": "fenced"
|
||||
},
|
||||
"code-fence-style": {
|
||||
"style": "backtick"
|
||||
},
|
||||
"emphasis-style": {
|
||||
"style": "asterisk"
|
||||
},
|
||||
"extended-ascii": {
|
||||
"ascii-only": true
|
||||
},
|
||||
"fenced-code-language": {
|
||||
"allowed_languages": [
|
||||
"bash",
|
||||
"html",
|
||||
"javascript",
|
||||
"json",
|
||||
"markdown",
|
||||
"text"
|
||||
],
|
||||
"language_only": true
|
||||
},
|
||||
"heading-style": {
|
||||
"style": "atx"
|
||||
},
|
||||
"hr-style": {
|
||||
"style": "---"
|
||||
},
|
||||
"line-length": {
|
||||
"strict": true,
|
||||
"code_blocks": false
|
||||
},
|
||||
"link-image-style": {
|
||||
"collapsed": false,
|
||||
"shortcut": false,
|
||||
"url_inline": false
|
||||
},
|
||||
"no-duplicate-heading": {
|
||||
"siblings_only": true
|
||||
},
|
||||
"ol-prefix": {
|
||||
"style": "ordered"
|
||||
},
|
||||
"proper-names": {
|
||||
"code_blocks": false,
|
||||
"names": [
|
||||
"Cake.Markdownlint",
|
||||
"CommonMark",
|
||||
"JavaScript",
|
||||
"Markdown",
|
||||
"markdown-it",
|
||||
"markdownlint",
|
||||
"Node.js"
|
||||
]
|
||||
},
|
||||
"reference-links-images": {
|
||||
"shortcut_syntax": true
|
||||
},
|
||||
"strong-style": {
|
||||
"style": "asterisk"
|
||||
},
|
||||
"ul-style": {
|
||||
"style": "dash"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,13 +1,15 @@
|
|||
.eslintignore
|
||||
.eslintrc.json
|
||||
.github
|
||||
.markdownlint.json
|
||||
.npmrc
|
||||
.vscode
|
||||
coverage
|
||||
demo/*
|
||||
!demo/markdownlint-browser.js
|
||||
doc-build
|
||||
eslint.config.mjs
|
||||
example
|
||||
npm-debug.log
|
||||
schema/*.mjs
|
||||
scripts
|
||||
test
|
||||
test-repos
|
||||
|
|
2
.npmrc
2
.npmrc
|
@ -1 +1,3 @@
|
|||
engine-strict=true
|
||||
ignore-scripts=true
|
||||
package-lock=false
|
||||
|
|
505
CHANGELOG.md
Normal file
505
CHANGELOG.md
Normal file
|
@ -0,0 +1,505 @@
|
|||
# Changelog
|
||||
|
||||
## 0.38.0
|
||||
|
||||
- Add MD059/descriptive-link-text
|
||||
- Improve MD025/MD027/MD036/MD038/MD041/MD043/MD045/MD051/MD052
|
||||
- `markdown-it` parser no longer a production dependency (breaking change)
|
||||
- Add `markdownItFactory` option, remove `markdownItPlugins` option
|
||||
- Remove support for end-of-life Node version 18
|
||||
- Improve performance
|
||||
- Update dependencies
|
||||
|
||||
## 0.37.4
|
||||
|
||||
- Stop using `module.createRequire`, export `resolveModule`
|
||||
|
||||
## 0.37.3
|
||||
|
||||
- Tweak `package.json` dependencies to work with `pnpm`
|
||||
|
||||
## 0.37.2
|
||||
|
||||
- Add subpath imports for overriding default bundler behavior
|
||||
- Improve MD032
|
||||
|
||||
## 0.37.1
|
||||
|
||||
- Add support for "browser" condition (as used by webpack)
|
||||
|
||||
## 0.37.0
|
||||
|
||||
- Convert module to ECMAScript (breaking change)
|
||||
- <https://nodejs.org/docs/latest/api/esm.html>
|
||||
- <https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c>
|
||||
- Convert module to named exports (breaking change)
|
||||
|
||||
## 0.36.1
|
||||
|
||||
- Fix behavior of MD054
|
||||
|
||||
## 0.36.0
|
||||
|
||||
- Improve MD051
|
||||
- Move `applyFix` and `applyFixes` from helpers to core
|
||||
- Make `micromark` parser available to custom rules
|
||||
- Introduce `./micromark` helpers exports
|
||||
- Update custom/rule documentation
|
||||
- Improve performance
|
||||
- Update dependencies
|
||||
|
||||
## 0.35.0
|
||||
|
||||
- Add MD058/blanks-around-tables
|
||||
- Use `micromark` in MD001/MD003/MD009/MD010/MD013/MD014/MD019/MD021/MD023/
|
||||
MD024/MD025/MD039/MD042/MD043
|
||||
- Improve MD018/MD020/MD031/MD034/MD044
|
||||
- `markdown-it` parser no longer invoked by default
|
||||
- Add strict version of JSON schema
|
||||
- Improve performance
|
||||
- Update dependencies
|
||||
|
||||
## 0.34.0
|
||||
|
||||
- Use `micromark` in MD027/MD028/MD036/MD040/MD041/MD046/MD048
|
||||
- Improve MD013/MD034/MD049/MD050/MD051
|
||||
- Update custom rule requirements and documentation
|
||||
- Improve various TypeScript declarations
|
||||
- Update dependencies
|
||||
|
||||
## 0.33.0
|
||||
|
||||
- Add MD055/table-pipe-style, MD056/table-column-count
|
||||
- Improve MD005/MD007/MD024/MD026/MD038
|
||||
- Incorporate `micromark-extension-directive`
|
||||
- Improve JSON schema, document validation
|
||||
- Reduce size of browser script
|
||||
- Update dependencies
|
||||
|
||||
## 0.32.1
|
||||
|
||||
- Fix behavior of MD054
|
||||
|
||||
## 0.32.0
|
||||
|
||||
- Remove deprecated MD002/MD006
|
||||
- Remove rule aliases for "header"
|
||||
- Add MD054/link-image-style
|
||||
- Use `micromark` in MD005/MD007/MD030
|
||||
- Improve MD022/MD026/MD034/MD037/MD038/MD045/MD051
|
||||
- Improve JSON schema and related examples
|
||||
- Provide type declaration for Configuration object
|
||||
- Remove support for end-of-life Node version 16
|
||||
- Update dependencies
|
||||
|
||||
## 0.31.1
|
||||
|
||||
- Improve MD032/MD034
|
||||
- Update dependencies
|
||||
|
||||
## 0.31.0
|
||||
|
||||
- Improve MD032/MD037/MD043/MD044/MD051/MD052
|
||||
- Improve performance
|
||||
- Update dependencies
|
||||
|
||||
## 0.30.0
|
||||
|
||||
- Use `micromark` in MD022/MD026/MD032/MD037/MD045/MD051
|
||||
- Incorporate `micromark-extension-math` for math syntax
|
||||
- Allow custom rules to override information URL
|
||||
- Update dependencies
|
||||
|
||||
## 0.29.0
|
||||
|
||||
- Update `micromark` parser dependencies for better performance
|
||||
- Use `micromark` in MD049/MD050
|
||||
- Improve MD034/MD037/MD044/MD049/MD050
|
||||
- Support multiple parsers in demo page
|
||||
- Remove support for end-of-life Node version 14
|
||||
- Update dependencies
|
||||
|
||||
## 0.28.2
|
||||
|
||||
- Update dependencies for CVE-2023-2251
|
||||
|
||||
## 0.28.1
|
||||
|
||||
- Update dependencies
|
||||
|
||||
## 0.28.0
|
||||
|
||||
- Introduce `micromark` parser for better positional data (internal only)
|
||||
- Use `micromark` in MD013/MD033/MD034/MD035/MD038/MD044/MD052/MD053
|
||||
- Simplify file-based test cases
|
||||
- Unify browser script for demo page
|
||||
- Update dependencies
|
||||
|
||||
## 0.27.0
|
||||
|
||||
- Improve MD011/MD013/MD022/MD031/MD032/MD033/MD034/MD040/MD043/MD051/MD053
|
||||
- Generate/separate documentation
|
||||
- Improve documentation
|
||||
- Update dependencies
|
||||
|
||||
## 0.26.2
|
||||
|
||||
- Improve MD037/MD051/MD053
|
||||
|
||||
## 0.26.1
|
||||
|
||||
- Improve MD051
|
||||
|
||||
## 0.26.0
|
||||
|
||||
- Add MD051/MD052/MD053 for validating link fragments & reference
|
||||
links/images & link/image reference definitions (MD053 auto-fixable)
|
||||
- Improve MD010/MD031/MD035/MD039/MD042/MD044/MD049/MD050
|
||||
- Add `markdownlint-disable-line` inline comment
|
||||
- Support `~` paths in `readConfig/Sync`
|
||||
- Add `configParsers` option
|
||||
- Remove support for end-of-life Node version 12
|
||||
- Default `resultVersion` to 3
|
||||
- Update browser script to use ES2015
|
||||
- Simplify JSON schema
|
||||
- Address remaining CodeQL issues
|
||||
- Improve performance
|
||||
- Update dependencies
|
||||
|
||||
## 0.25.1
|
||||
|
||||
- Update dependencies for CVE-2022-21670
|
||||
|
||||
## 0.25.0
|
||||
|
||||
- Add MD049/MD050 for consistent emphasis/strong style (both auto-fixable)
|
||||
- Improve MD007/MD010/MD032/MD033/MD035/MD037/MD039
|
||||
- Support asynchronous custom rules
|
||||
- Improve performance
|
||||
- Improve CI process
|
||||
- Reduce dependencies
|
||||
- Update dependencies
|
||||
|
||||
## 0.24.0
|
||||
|
||||
- Remove support for end-of-life Node version 10
|
||||
- Add support for custom file system module
|
||||
- Improve MD010/MD011/MD037/MD043/MD044
|
||||
- Improve TypeScript declaration file and JSON schema
|
||||
- Update dependencies
|
||||
|
||||
## 0.23.1
|
||||
|
||||
- Work around lack of webpack support for dynamic calls to `require`(`.resolve`)
|
||||
|
||||
## 0.23.0
|
||||
|
||||
- Add comprehensive example `.markdownlint.jsonc`/`.markdownlint.yaml` files
|
||||
- Add fix information for MD004/ul-style
|
||||
- Improve MD018/MD019/MD020/MD021/MD037/MD041
|
||||
- Improve HTML comment handling
|
||||
- Update test runner and test suite
|
||||
- Update dependencies
|
||||
|
||||
## 0.22.0
|
||||
|
||||
- Allow `extends` in config to reference installed packages by name
|
||||
- Add `markdownlint-disable-next-line` inline comment
|
||||
- Support JSON front matter
|
||||
- Improve MD009/MD026/MD028/MD043
|
||||
- Update dependencies (including `markdown-it` to v12)
|
||||
|
||||
## 0.21.1
|
||||
|
||||
- Improve MD011/MD031
|
||||
- Export `getVersion` API
|
||||
|
||||
## 0.21.0
|
||||
|
||||
- Lint concurrently for better performance (async only)
|
||||
- Add Promise-based APIs
|
||||
- Update TypeScript declaration file
|
||||
- Hide `toString` on `LintResults`
|
||||
- Add ability to fix in browser demo
|
||||
- Allow custom rules in `.markdownlint.json` schema
|
||||
- Improve MD042/MD044
|
||||
- Improve documentation
|
||||
- Update dependencies
|
||||
|
||||
## 0.20.4
|
||||
|
||||
- Fix regression in MD037
|
||||
- Improve MD034/MD044
|
||||
- Improve documentation
|
||||
|
||||
## 0.20.3
|
||||
|
||||
- Fix regression in MD037
|
||||
- Improve MD044
|
||||
- Add automatic regression testing
|
||||
|
||||
## 0.20.2
|
||||
|
||||
- Fix regression in MD037
|
||||
- Improve MD038
|
||||
|
||||
## 0.20.1
|
||||
|
||||
- Fix regression in MD037
|
||||
|
||||
## 0.20.0
|
||||
|
||||
- Add `markdownlint-configure-file` inline comment
|
||||
- Reimplement MD037
|
||||
- Improve MD005/MD007/MD013/MD018/MD029/MD031/MD034/MD038/MD039
|
||||
- Improve HTML comment handling
|
||||
- Update dependencies
|
||||
|
||||
## 0.19.0
|
||||
|
||||
- Remove support for end-of-life Node version 8
|
||||
- Add fix information for MD005/list-indent
|
||||
- Improve MD007/MD013/MD014
|
||||
- Deprecate MD006/ul-start-left
|
||||
- Add rationale for every rule
|
||||
- Update test runner and code coverage
|
||||
- Add more JSDoc comments
|
||||
- Update dependencies
|
||||
|
||||
## 0.18.0
|
||||
|
||||
- Add MD048/code-fence-style
|
||||
- Add fix information for MD007/ul-indent
|
||||
- Add `markdownlint-disable-file`/`markdownlint-enable-file` inline comments
|
||||
- Add type declaration file (.d.ts) for TypeScript dependents
|
||||
- Update schema
|
||||
- Improve MD006/MD007/MD009/MD013/MD030
|
||||
- Update dependencies
|
||||
|
||||
## 0.17.2
|
||||
|
||||
- Improve MD020/MD033/MD044
|
||||
|
||||
## 0.17.1
|
||||
|
||||
- Fix handling of front matter by fix information
|
||||
|
||||
## 0.17.0
|
||||
|
||||
- Add `resultVersion` 3 to support fix information for default and custom rules
|
||||
- Add fix information for 24 rules
|
||||
- Update newline handling to match latest CommonMark specification
|
||||
- Improve MD014/MD037/MD039
|
||||
- Update dependencies
|
||||
|
||||
## 0.16.0
|
||||
|
||||
- Add custom rule sample for linting code
|
||||
- Improve MD026/MD031/MD033/MD038
|
||||
- Update dependencies
|
||||
|
||||
## 0.15.0
|
||||
|
||||
- Add `markdownlint-capture`/`markdownlint-restore` inline comments
|
||||
- Improve MD009/MD013/MD026/MD033/MD036
|
||||
- Update dependencies
|
||||
|
||||
## 0.14.2
|
||||
|
||||
- Improve MD047
|
||||
- Add `handleRuleFailures` option
|
||||
|
||||
## 0.14.1
|
||||
|
||||
- Improve MD033
|
||||
|
||||
## 0.14.0
|
||||
|
||||
- Remove support for end-of-life Node version 6
|
||||
- Introduce `markdownlint-rule-helpers`
|
||||
- Add MD046/MD047
|
||||
- Improve MD033/MD034/MD039
|
||||
- Improve custom rule validation and in-browser demo
|
||||
- Update dependencies
|
||||
|
||||
## 0.13.0
|
||||
|
||||
- Improve MD013/MD022/MD025/MD029/MD031/MD032/MD037/MD041
|
||||
- Deprecate MD002
|
||||
- Improve Pandoc YAML support
|
||||
- Update dependencies
|
||||
|
||||
## 0.12.0
|
||||
|
||||
- Add `information` link for custom rules
|
||||
- Add `markdownItPlugins` for extensibility
|
||||
- Improve MD023/MD032/MD038
|
||||
- Update dependencies
|
||||
|
||||
## 0.11.0
|
||||
|
||||
- Improve MD005/MD024/MD029/MD038
|
||||
- Improve custom rule example
|
||||
- Add `CONTRIBUTING.md`
|
||||
- Update dependencies
|
||||
|
||||
## 0.10.0
|
||||
|
||||
- Add support for non-JSON configuration files
|
||||
- Pass file/string name to custom rules
|
||||
- Update dependencies
|
||||
|
||||
## 0.9.0
|
||||
|
||||
- Remove support for end-of-life Node versions 0.10/0.12/4
|
||||
- Change "header" to "heading" per spec (non-breaking)
|
||||
- Improve MD003/MD009/MD041
|
||||
- Handle uncommon line-break characters
|
||||
- Refactor for ES6
|
||||
- Update dependencies
|
||||
|
||||
## 0.8.1
|
||||
|
||||
- Update item loop to be iterative
|
||||
- Improve MD014
|
||||
- Update dependencies
|
||||
|
||||
## 0.8.0
|
||||
|
||||
- Add support for using and authoring custom rules
|
||||
- Improve MD004/MD007/MD013
|
||||
- Add `engines` to `package.json`
|
||||
- Refactor
|
||||
- Update dependencies
|
||||
|
||||
## 0.7.0
|
||||
|
||||
- `resultVersion` defaults to 2 (breaking change)
|
||||
- Add MD045
|
||||
- Improve MD029
|
||||
- Remove `trimLeft`/`trimRight`
|
||||
- Split rules
|
||||
- Refactor
|
||||
- Update dependencies
|
||||
|
||||
## 0.6.4
|
||||
|
||||
- Improve MD029/MD042
|
||||
- Update dependencies
|
||||
|
||||
## 0.6.3
|
||||
|
||||
- Improve highlighting for MD020
|
||||
|
||||
## 0.6.2
|
||||
|
||||
- Improve MD013/MD027/MD034/MD037/MD038/MD041/MD044
|
||||
- Update dependencies
|
||||
|
||||
## 0.6.1
|
||||
|
||||
- Update `markdown-it` versioning
|
||||
- Exclude demo/test from publishing
|
||||
|
||||
## 0.6.0
|
||||
|
||||
- `resultVersion` defaults to 1 (breaking change)
|
||||
- Ignore HTML comments
|
||||
- TOML front matter
|
||||
- Fixes for MD044
|
||||
- Update dependencies
|
||||
|
||||
## 0.5.0
|
||||
|
||||
- Add shareable configuration
|
||||
- Add `noInlineConfig` option
|
||||
- Add `README.md` links
|
||||
- Fix MD030
|
||||
- Improve MD009/MD041
|
||||
- Update dependencies
|
||||
|
||||
## 0.4.1
|
||||
|
||||
- Fixes for MD038/front matter
|
||||
- Improvements to MD044
|
||||
- Update dependencies
|
||||
|
||||
## 0.4.0
|
||||
|
||||
- Add MD044
|
||||
- Enhance MD013/MD032/MD041/MD042/MD043
|
||||
- Fix for MD038
|
||||
- Update dependencies
|
||||
|
||||
## 0.3.1
|
||||
|
||||
- Fix regressions in MD032/MD038
|
||||
- Update dependencies
|
||||
|
||||
## 0.3.0
|
||||
|
||||
- More detailed error reporting with `resultVersion`
|
||||
- Enhance MD010/MD012/MD036
|
||||
- Fixes for MD027/MD029/MD030
|
||||
- Include JSON schema dependencies
|
||||
|
||||
## 0.2.0
|
||||
|
||||
- Add MD042/MD043
|
||||
- Enhance MD002/MD003/MD004/MD007/MD011/MD025/MD041
|
||||
- Update dependencies
|
||||
|
||||
## 0.1.1
|
||||
|
||||
- Fix bug handling HTML in tables
|
||||
- Reference `markdownlint-cli`
|
||||
|
||||
## 0.1.0
|
||||
|
||||
- Add aliases
|
||||
- Exceptions for MD033
|
||||
- Exclusions for MD013
|
||||
- Update dependencies
|
||||
|
||||
## 0.0.8
|
||||
|
||||
- Support disabling/enabling rules inline
|
||||
- Improve code fence
|
||||
- Update dependencies
|
||||
|
||||
## 0.0.7
|
||||
|
||||
- Add MD041
|
||||
- Improve MD003
|
||||
- Ignore front matter
|
||||
- Update dependencies
|
||||
|
||||
## 0.0.6
|
||||
|
||||
- Improve performance
|
||||
- Simplify in-browser
|
||||
- Update dependencies
|
||||
|
||||
## 0.0.5
|
||||
|
||||
- Add `strings` option to enable file-less scenarios
|
||||
- Add in-browser demo
|
||||
|
||||
## 0.0.4
|
||||
|
||||
- Add tests MD033-MD040
|
||||
- Update dependencies
|
||||
|
||||
## 0.0.3
|
||||
|
||||
- Add synchronous API
|
||||
- Improve documentation and code
|
||||
|
||||
## 0.0.2
|
||||
|
||||
- Improve documentation, tests, and code
|
||||
|
||||
## 0.0.1
|
||||
|
||||
- Initial release
|
||||
- Includes tests MD001-MD032
|
115
CONTRIBUTING.md
115
CONTRIBUTING.md
|
@ -1,51 +1,92 @@
|
|||
# Contributing
|
||||
|
||||
Interested in contributing? Great! Here are some suggestions to make it a good experience:
|
||||
Interested in contributing? Great! Here are some suggestions to make it a good
|
||||
experience:
|
||||
|
||||
Start by [opening an issue](https://github.com/DavidAnson/markdownlint/issues), whether to identify a problem or outline a change.
|
||||
That issue should be used to discuss the situation and agree on a plan of action before writing code or sending a pull request.
|
||||
Maybe the problem isn't really a problem, or maybe there are more things to consider.
|
||||
If so, it's best to realize that before spending time and effort writing code that may not get used.
|
||||
Start by [opening an issue](https://github.com/DavidAnson/markdownlint/issues),
|
||||
whether to identify a problem or outline a change. That issue should be used to
|
||||
discuss the situation and agree on a plan of action before writing code or
|
||||
sending a pull request. Maybe the problem isn't really a problem, or maybe there
|
||||
are more things to consider. If so, it's best to realize that before spending
|
||||
time and effort writing code that may not get used.
|
||||
|
||||
Match the coding style of the files you edit.
|
||||
Although everyone has their own preferences and opinions, a pull request is not the right forum to debate them.
|
||||
Match the coding style of the files you edit. Although everyone has their own
|
||||
preferences and opinions, a pull request is not the right forum to debate them.
|
||||
|
||||
Do not add new [`dependencies` to `package.json`](https://docs.npmjs.com/files/package.json#dependencies).
|
||||
The excellent Markdown parser [markdown-it](https://www.npmjs.com/package/markdown-it) is this project's one and only dependency.
|
||||
Do not add new [`dependencies` to `package.json`][dependencies]. The Markdown
|
||||
parser [`micromark`][micromark] (and its extensions) is this project's only
|
||||
dependency.
|
||||
|
||||
If developing a new rule, start by creating a [custom rule](doc/CustomRules.md) in its own project.
|
||||
Once written, published, and tested in real world scenarios, open an issue to consider adding it to this project.
|
||||
For rule ideas, see [issues tagged with the `new rule` label](https://github.com/DavidAnson/markdownlint/labels/new%20rule).
|
||||
Package versions for `dependencies` and `devDependencies` should be specified
|
||||
exactly (also known as "pinning"). The short explanation is that doing otherwise
|
||||
eventually leads to inconsistent behavior and broken functionality. (See [Why I
|
||||
pin dependency versions in Node.js packages][version-pinning] for a longer
|
||||
explanation.)
|
||||
|
||||
Add tests for all new/changed functionality.
|
||||
Test positive and negative scenarios.
|
||||
Try to break the new code now, or else it will get broken later.
|
||||
If developing a new rule, start by creating a [custom rule][custom-rules] in its
|
||||
own project. Once written, published, and tested in real world scenarios, open
|
||||
an issue to consider adding it to this project. For rule ideas, see [issues
|
||||
tagged with the `new rule` label][new-rule].
|
||||
|
||||
Run tests before sending a pull request via `npm test` in the [usual manner](https://docs.npmjs.com/misc/scripts).
|
||||
Tests should all pass on all platforms.
|
||||
The test runner is [tape](https://www.npmjs.com/package/tape) and test cases are located in `test/markdownlint-test*.js`.
|
||||
When running tests, `test/*.md` files are enumerated, linted, and fail if any violations are missing a corresponding `{MD###}` marker in the test file.
|
||||
For example, the line `### Heading {MD001}` is expected to trigger the rule `MD001`.
|
||||
For cases where the marker text can not be present on the same line, the syntax `{MD###:#}` can be used to include a line number.
|
||||
If `some-test.md` needs custom configuration, a `some-test.json` is used to provide a custom `options.config` for that scenario.
|
||||
Add tests for all new/changed functionality. Test positive and negative
|
||||
scenarios. Try to break the new code now, or else it will get broken later.
|
||||
|
||||
Lint before sending a pull request by running `npm run lint`.
|
||||
There should be no issues.
|
||||
Run tests before sending a pull request via `npm test` in the [usual
|
||||
manner][npm-scripts]. Tests should all pass on all platforms. The test runner is
|
||||
[AVA][ava] and test cases are located in `test/markdownlint-test*.js`. When
|
||||
running tests, `test/*.md` files are enumerated, linted, and fail if any
|
||||
violations are missing a corresponding `{MD###}` marker in the test file. For
|
||||
example, the line `### Heading {MD001}` is expected to trigger the rule `MD001`.
|
||||
For cases where the marker text can not be present on the same line, the syntax
|
||||
`{MD###:#}` can be used to include a line number. If `some-test.md` needs custom
|
||||
configuration, a `some-test.json` is used to provide a custom `options.config`
|
||||
for that scenario. Tests run by `markdownlint-test-scenarios.js` use [AVA's
|
||||
snapshot feature][ava-snapshots]. To update snapshots (for example, after
|
||||
modifying a test file), run `npm run update-snapshots` and include the updated
|
||||
files with the pull request.
|
||||
|
||||
Run a full continuous integration pass before sending a pull request via `npm run ci`.
|
||||
Code coverage should remain at 100%.
|
||||
Lint before sending a pull request by running `npm run lint`. There should be no
|
||||
issues.
|
||||
|
||||
Pull requests should contain a single commit.
|
||||
If necessary, squash multiple commits before creating the pull request and when making changes.
|
||||
(See [Git Tools - Rewriting History](https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History) for details.)
|
||||
Run a full continuous integration pass before sending a pull request via `npm
|
||||
run ci`. Code coverage should always be 100%. As part of a continuous
|
||||
integration run, generated files may get updated and fail the run - commit them
|
||||
to the repository and rerun continuous integration.
|
||||
|
||||
Open pull requests against the `next` branch.
|
||||
That's where the latest changes are staged for the next release.
|
||||
Include the text "(fixes #??)" at the end of the commit message so the pull request will be associated with the relevant issue.
|
||||
End commit messages with a period (`.`).
|
||||
Do not include `package-lock.json` in the pull request.
|
||||
Once accepted, the tag `fixed in next` will be added to the issue.
|
||||
When the commit is merged to the main branch during the release process, the issue will be closed automatically.
|
||||
(See [Closing issues using keywords](https://help.github.com/articles/closing-issues-using-keywords/) for details.)
|
||||
Pull requests should contain a single commit. If necessary, squash multiple
|
||||
commits before creating the pull request and when making changes. (See [Git
|
||||
Tools - Rewriting History][rewriting-history] for details.)
|
||||
|
||||
Open pull requests against the `next` branch. That's where the latest changes
|
||||
are staged for the next release. Include the text "(fixes #??)" at the end of
|
||||
the commit message so the pull request will be associated with the relevant
|
||||
issue. End commit messages with a period (`.`). Once accepted, the tag `fixed in
|
||||
next` will be added to the issue. When the commit is merged to the main branch
|
||||
during the release process, the issue will be closed automatically. (See
|
||||
[Closing issues using keywords][closing-keywords] for details.)
|
||||
|
||||
Please refrain from using slang or meaningless placeholder words. Sample content
|
||||
can be "text", "code", "heading", or the like. Sample URLs should use
|
||||
[example.com][example-com] which is safe for this purpose. Profanity is not
|
||||
allowed.
|
||||
|
||||
In order to maintain the permissive MIT license this project uses, all
|
||||
contributions must be your own and released under that license. Code you add
|
||||
should be an original work and should not be copied from elsewhere. Taking code
|
||||
from a different project, Stack Overflow, or the like is not allowed. The use of
|
||||
tools such as GitHub Copilot, ChatGPT, LLMs (large language models), etc. that
|
||||
incorporate code from other projects is not allowed.
|
||||
|
||||
Thank you!
|
||||
|
||||
[ava]: https://github.com/avajs/ava
|
||||
[ava-snapshots]: https://github.com/avajs/ava/blob/main/docs/04-snapshot-testing.md
|
||||
[closing-keywords]: https://help.github.com/articles/closing-issues-using-keywords/
|
||||
[custom-rules]: doc/CustomRules.md
|
||||
[dependencies]: https://docs.npmjs.com/files/package.json#dependencies
|
||||
[example-com]: https://en.wikipedia.org/wiki/Example.com
|
||||
[micromark]: https://www.npmjs.com/package/micromark
|
||||
[new-rule]: https://github.com/DavidAnson/markdownlint/labels/new%20rule
|
||||
[npm-scripts]: https://docs.npmjs.com/misc/scripts
|
||||
[rewriting-history]: https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History
|
||||
[version-pinning]: https://dlaa.me/blog/post/versionpinning
|
||||
|
|
2
LICENSE
2
LICENSE
|
@ -1,6 +1,6 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2015-2021 David Anson
|
||||
Copyright (c) David Anson
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
10
demo/browser-exports.mjs
Normal file
10
demo/browser-exports.mjs
Normal file
|
@ -0,0 +1,10 @@
|
|||
// @ts-check
|
||||
|
||||
export { applyFixes, getVersion } from "markdownlint";
|
||||
export { lint as lintSync } from "markdownlint/sync";
|
||||
export { compile, parse, postprocess, preprocess } from "micromark";
|
||||
export { directive, directiveHtml } from "micromark-extension-directive";
|
||||
export { gfmAutolinkLiteral, gfmAutolinkLiteralHtml } from "micromark-extension-gfm-autolink-literal";
|
||||
export { gfmFootnote, gfmFootnoteHtml } from "micromark-extension-gfm-footnote";
|
||||
export { gfmTable, gfmTableHtml } from "micromark-extension-gfm-table";
|
||||
export { math, mathHtml } from "micromark-extension-math";
|
|
@ -3,7 +3,7 @@
|
|||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<link href="default.css" rel="stylesheet" type="text/css"/>
|
||||
<link rel="shortcut icon" href="favicon.ico"/>
|
||||
<link href="favicon.svg" rel="icon" type="image/svg+xml"/>
|
||||
<meta name="description" content="Demo for markdownlint, a Node.js style checker and lint tool for Markdown/CommonMark files."/>
|
||||
<title>markdownlint demo</title>
|
||||
<base target="_blank"/>
|
||||
|
@ -30,12 +30,11 @@
|
|||
<div class="flex-fill"></div>
|
||||
<footer><a href="#" id="copyLink">Copy Link</a></footer>
|
||||
<div class="flex-fill"></div>
|
||||
<footer>Copyright © 2015-2021 by <a href="https://dlaa.me/">David Anson</a></footer>
|
||||
<footer>Copyright © <a href="https://dlaa.me/">David Anson</a></footer>
|
||||
</div>
|
||||
</div>
|
||||
<script src="markdown-it.min.js"></script>
|
||||
<script src="markdownlint-browser.min.js"></script>
|
||||
<script src="markdownlint-rule-helpers-browser.min.js"></script>
|
||||
<script src="default.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
105
demo/default.js
105
demo/default.js
|
@ -1,6 +1,11 @@
|
|||
"use strict";
|
||||
|
||||
(function main() {
|
||||
// Dependencies
|
||||
var markdownit = globalThis.markdownit;
|
||||
var markdownlint = globalThis.markdownlint;
|
||||
var micromark = markdownlint;
|
||||
|
||||
// DOM elements
|
||||
var markdown = document.getElementById("markdown");
|
||||
var markup = document.getElementById("markup");
|
||||
|
@ -11,7 +16,6 @@
|
|||
var copyLink = document.getElementById("copyLink");
|
||||
|
||||
// Variables
|
||||
var markdownit = window.markdownit({ "html": true });
|
||||
var newLineRe = /\r\n|\r|\n/;
|
||||
var hashPrefix = "%m";
|
||||
var allLintErrors = [];
|
||||
|
@ -27,12 +31,66 @@
|
|||
.replace(/>/g, ">");
|
||||
}
|
||||
|
||||
// Renders directive metadata
|
||||
function handleDirective(directive) {
|
||||
const content = directive.content;
|
||||
delete directive.content;
|
||||
if (content) {
|
||||
this.tag("<blockquote>");
|
||||
}
|
||||
this.tag("<code>");
|
||||
this.raw(this.encode(JSON.stringify(directive)));
|
||||
this.tag("</code>");
|
||||
this.raw(content);
|
||||
if (content) {
|
||||
this.tag("</blockquote>");
|
||||
}
|
||||
}
|
||||
|
||||
// Renders Markdown to HTML
|
||||
function render(markdown) {
|
||||
const match = /^\?renderer=([a-z-]+)$/.exec(globalThis.location.search);
|
||||
const renderer = match ? match[1] : "micromark";
|
||||
if (renderer === "markdown-it") {
|
||||
return markdownit({ "html": true }).render(markdown);
|
||||
} else if (renderer === "micromark") {
|
||||
const parseOptions = {
|
||||
"extensions": [
|
||||
micromark.directive(),
|
||||
micromark.gfmAutolinkLiteral(),
|
||||
micromark.gfmFootnote(),
|
||||
micromark.gfmTable(),
|
||||
micromark.math()
|
||||
]
|
||||
};
|
||||
const context = micromark.parse(parseOptions);
|
||||
const chunks = micromark.preprocess()(markdown, undefined, true);
|
||||
const events = micromark.postprocess(context.document().write(chunks));
|
||||
const compileOptions = {
|
||||
"allowDangerousHtml": true,
|
||||
"htmlExtensions": [
|
||||
micromark.directiveHtml({ "*": handleDirective }),
|
||||
micromark.gfmAutolinkLiteralHtml(),
|
||||
micromark.gfmFootnoteHtml(),
|
||||
micromark.gfmTableHtml(),
|
||||
micromark.mathHtml()
|
||||
]
|
||||
};
|
||||
try {
|
||||
return micromark.compile(compileOptions)(events);
|
||||
} catch (error) {
|
||||
return `[Exception: "${error}"]`;
|
||||
}
|
||||
}
|
||||
return `[Unsupported renderer "${renderer}"]`;
|
||||
}
|
||||
|
||||
// Handle input
|
||||
function onMarkdownInput() {
|
||||
// Markdown
|
||||
var content = markdown.value;
|
||||
// Markup
|
||||
markup.innerHTML = markdownit.render(content);
|
||||
markup.innerHTML = render(content);
|
||||
// Numbered
|
||||
var lines = content.split(newLineRe);
|
||||
var padding = lines.length.toString().replace(/\d/g, " ");
|
||||
|
@ -52,10 +110,9 @@
|
|||
"config": {
|
||||
"MD013": false
|
||||
},
|
||||
"handleRuleFailures": true,
|
||||
"resultVersion": 3
|
||||
"handleRuleFailures": true
|
||||
};
|
||||
allLintErrors = window.markdownlint.sync(options).content;
|
||||
allLintErrors = markdownlint.lintSync(options).content;
|
||||
violations.innerHTML = allLintErrors.map(function mapResult(result) {
|
||||
var ruleName = result.ruleNames.slice(0, 2).join(" / ");
|
||||
return "<em><a href='#line' target='" + result.lineNumber + "'>" +
|
||||
|
@ -73,9 +130,9 @@
|
|||
"\"</span>]" :
|
||||
"") +
|
||||
(result.fixInfo ?
|
||||
" [<a href='#fix' target='" +
|
||||
" [<a href='#fix' target=\"" +
|
||||
encodeURIComponent(JSON.stringify(result)) +
|
||||
"' class='detail'>Fix</a>]" :
|
||||
"\" class='detail'>Fix</a>]" :
|
||||
"");
|
||||
}).join("<br/>");
|
||||
}
|
||||
|
@ -90,12 +147,10 @@
|
|||
onMarkdownInput();
|
||||
} else {
|
||||
// Update from File object
|
||||
var reader = new FileReader();
|
||||
reader.onload = function onload(e) {
|
||||
markdown.value = e.target.result;
|
||||
source.text().then((text) => {
|
||||
markdown.value = text;
|
||||
onMarkdownInput();
|
||||
};
|
||||
reader.readAsText(source);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -127,8 +182,7 @@
|
|||
var errors = e.shiftKey ?
|
||||
allLintErrors :
|
||||
[ JSON.parse(decodeURIComponent(e.target.target)) ];
|
||||
var fixed =
|
||||
window.markdownlintRuleHelpers.applyFixes(markdown.value, errors);
|
||||
var fixed = markdownlint.applyFixes(markdown.value, errors);
|
||||
markdown.value = fixed;
|
||||
onMarkdownInput();
|
||||
e.preventDefault();
|
||||
|
@ -155,9 +209,9 @@
|
|||
|
||||
// Updates the URL hash and copies the URL to the clipboard
|
||||
function onCopyLinkClick(e) {
|
||||
window.location.hash = encodeURIComponent(hashPrefix + markdown.value);
|
||||
globalThis.location.hash = encodeURIComponent(hashPrefix + markdown.value);
|
||||
if (navigator.clipboard && navigator.clipboard.writeText) {
|
||||
navigator.clipboard.writeText(window.location).then(noop, noop);
|
||||
navigator.clipboard.writeText(globalThis.location).then(noop, noop);
|
||||
} else {
|
||||
/* eslint-disable-next-line no-alert */
|
||||
alert("Document URL updated, select and copy it now.");
|
||||
|
@ -166,8 +220,8 @@
|
|||
}
|
||||
|
||||
// Show library version
|
||||
document.getElementById("version").textContent =
|
||||
"(v" + window.markdownlint.getVersion() + ")";
|
||||
var version = markdownlint.getVersion();
|
||||
document.getElementById("version").textContent = "(v" + version + ")";
|
||||
|
||||
// Add event listeners
|
||||
document.body.addEventListener("dragover", onDragOver);
|
||||
|
@ -177,7 +231,6 @@
|
|||
violations.addEventListener("click", onViolationClick, true);
|
||||
copyLink.addEventListener("click", onCopyLinkClick);
|
||||
|
||||
/* eslint-disable max-len */
|
||||
markdown.value = [
|
||||
"## Introduction",
|
||||
"",
|
||||
|
@ -190,8 +243,7 @@
|
|||
"Content gets parsed and displayed in the upper-right box; rule violations (if any) show up in the lower-right box.",
|
||||
"Click a violation for information about it or click its line number to highlighted it in the lower-left box.",
|
||||
"",
|
||||
"> *Note*: [All rules](https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md) are enabled except [MD013/line-length](https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md#md013).",
|
||||
"> ([MD002/first-heading-h1](https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md#md002) and [MD006/ul-start-left](https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md#md006) are deprecated.)",
|
||||
"> *Note*: [All rules](https://github.com/DavidAnson/markdownlint/blob/v" + version + "/doc/Rules.md) are enabled except [MD013/line-length](https://github.com/DavidAnson/markdownlint/blob/v" + version + "/doc/md013.md).",
|
||||
"",
|
||||
"",
|
||||
"#### Resources",
|
||||
|
@ -205,17 +257,15 @@
|
|||
"[`markdownlint/Ruby`](https://github.com/markdownlint/markdownlint) for the inspiration and [`markdown-it`](https://github.com/markdown-it/markdown-it) for the parser and interactive demo idea!",
|
||||
""
|
||||
].join("\n");
|
||||
/* eslint-enable max-len */
|
||||
|
||||
// Update Markdown from hash (if present)
|
||||
if (window.location.hash) {
|
||||
if (globalThis.location.hash) {
|
||||
try {
|
||||
var decodedHash = decodeURIComponent(window.location.hash.substring(1));
|
||||
var decodedHash = decodeURIComponent(globalThis.location.hash.substring(1));
|
||||
if (hashPrefix === decodedHash.substring(0, hashPrefix.length)) {
|
||||
markdown.value = decodedHash.substring(hashPrefix.length);
|
||||
}
|
||||
/* eslint-disable-next-line unicorn/prefer-optional-catch-binding */
|
||||
} catch (error) {
|
||||
} catch {
|
||||
// Invalid
|
||||
}
|
||||
}
|
||||
|
@ -224,8 +274,7 @@
|
|||
try {
|
||||
/* eslint-disable-next-line no-new */
|
||||
new URL("https://example.com/");
|
||||
/* eslint-disable-next-line unicorn/prefer-optional-catch-binding */
|
||||
} catch (error) {
|
||||
} catch {
|
||||
markdown.value = [
|
||||
"# Sorry",
|
||||
"",
|
||||
|
|
13
demo/favicon.svg
Normal file
13
demo/favicon.svg
Normal file
|
@ -0,0 +1,13 @@
|
|||
<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
|
||||
<style>
|
||||
rect { stroke: black; stroke-width: 1; fill: white }
|
||||
path { stroke: black; stroke-linecap: round; stroke-linejoin: round; fill: none }
|
||||
</style>
|
||||
<rect x="0.5" y="0.5" width="15" height="15" rx= "1" ry="1"/>
|
||||
<path d="M 10.5,2.5 L 11.5,2.5 L 11.5,5.5 L 13,5.5 L 11,7.5 L 9,5.5 L 10.5,5.5 Z" style="fill:black"/>
|
||||
<path d="M 2.5 7.5 L 2.5 3 L 4.5 5 L 6.5 3 L 6.5 7.5"/>
|
||||
<path d="M 2.5,9.5 L 2.5,13.5 L 4,13.5"/>
|
||||
<path d="M 5.5,10 L 5.5,10 M 5.5,11.5 L 5.5,13.5"/>
|
||||
<path d="M 7.5,13.5 L 7.5,12 L 8 11.5 L 9 11.5 L 9.5,12 L 9.5,13.5"/>
|
||||
<path d="M 12,13.5 L 12,10 M 11,11.5 L 13,11.5"/>
|
||||
</svg>
|
After Width: | Height: | Size: 681 B |
File diff suppressed because it is too large
Load diff
|
@ -1,10 +0,0 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"allowJs": true,
|
||||
"outDir": "unused",
|
||||
"resolveJsonModule": true
|
||||
},
|
||||
"include": [
|
||||
"../lib/*.js"
|
||||
]
|
||||
}
|
|
@ -1,83 +0,0 @@
|
|||
// @ts-check
|
||||
|
||||
"use strict";
|
||||
|
||||
const path = require("path");
|
||||
const webpack = require("webpack");
|
||||
|
||||
function config(options) {
|
||||
const { entry, filename, mode, packageJson } = options;
|
||||
const { name, version, homepage, license } = packageJson;
|
||||
return {
|
||||
"devtool": false,
|
||||
"entry": entry,
|
||||
"externals": {
|
||||
"markdown-it": "markdownit"
|
||||
},
|
||||
"mode": mode,
|
||||
"module": {
|
||||
"rules": [
|
||||
{
|
||||
"test": /.js$/,
|
||||
"use": [
|
||||
{
|
||||
"loader": "ts-loader",
|
||||
"options": {
|
||||
"configFile": path.resolve(__dirname, "tsconfig.json")
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"name": name,
|
||||
"output": {
|
||||
"filename": filename,
|
||||
"library": name.replace(/(-\w)/g, (m) => m.slice(1).toUpperCase()),
|
||||
"path": __dirname
|
||||
},
|
||||
"plugins": [
|
||||
new webpack.BannerPlugin({
|
||||
"banner": `${name} ${version} ${homepage} @license ${license}`
|
||||
}),
|
||||
new webpack.DefinePlugin({
|
||||
"process.env.NODE_DEBUG": false
|
||||
})
|
||||
],
|
||||
"resolve": {
|
||||
"fallback": {
|
||||
"fs": false,
|
||||
"os": false,
|
||||
"path": false,
|
||||
"util": false
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
module.exports = [
|
||||
config({
|
||||
"entry": "../lib/markdownlint.js",
|
||||
"filename": "markdownlint-browser.js",
|
||||
"mode": "development",
|
||||
"packageJson": require("../package.json")
|
||||
}),
|
||||
config({
|
||||
"entry": "../lib/markdownlint.js",
|
||||
"filename": "markdownlint-browser.min.js",
|
||||
"mode": "production",
|
||||
"packageJson": require("../package.json")
|
||||
}),
|
||||
config({
|
||||
"entry": "../helpers/helpers.js",
|
||||
"filename": "markdownlint-rule-helpers-browser.js",
|
||||
"mode": "development",
|
||||
"packageJson": require("../helpers/package.json")
|
||||
}),
|
||||
config({
|
||||
"entry": "../helpers/helpers.js",
|
||||
"filename": "markdownlint-rule-helpers-browser.min.js",
|
||||
"mode": "production",
|
||||
"packageJson": require("../helpers/package.json")
|
||||
})
|
||||
];
|
81
demo/webpack.config.mjs
Normal file
81
demo/webpack.config.mjs
Normal file
|
@ -0,0 +1,81 @@
|
|||
// @ts-check
|
||||
|
||||
import webpack from "webpack";
|
||||
import TerserPlugin from "terser-webpack-plugin";
|
||||
import { __dirname, importWithTypeJson } from "../test/esm-helpers.mjs";
|
||||
const libraryPackageJson = await importWithTypeJson(import.meta, "../package.json");
|
||||
|
||||
// eslint-disable-next-line jsdoc/require-jsdoc
|
||||
function config(options) {
|
||||
const { entry, filename, mode, optimization, packageJson } = options;
|
||||
const { name, version, homepage, license } = packageJson;
|
||||
return {
|
||||
"devtool": false,
|
||||
"entry": entry,
|
||||
"externals": {
|
||||
"markdown-it": "markdownit"
|
||||
},
|
||||
"mode": mode,
|
||||
"name": name,
|
||||
"optimization": optimization,
|
||||
"output": {
|
||||
"filename": filename,
|
||||
"library": {
|
||||
"name": name.replace(/(-\w)/g, (m) => m.slice(1).toUpperCase()),
|
||||
"type": "var"
|
||||
},
|
||||
"path": __dirname(import.meta)
|
||||
},
|
||||
"plugins": [
|
||||
new webpack.BannerPlugin({
|
||||
"banner": `${name} ${version} ${homepage} @license ${license}`
|
||||
})
|
||||
],
|
||||
"ignoreWarnings": [
|
||||
{
|
||||
"message": /(asset|entrypoint) size limit/
|
||||
},
|
||||
{
|
||||
"message": /dependencies cannot be statically extracted/
|
||||
},
|
||||
{
|
||||
"message": /lazy load some parts of your application/
|
||||
}
|
||||
]
|
||||
};
|
||||
}
|
||||
|
||||
const modeDevelopment = {
|
||||
"mode": "development"
|
||||
};
|
||||
const modeProduction = {
|
||||
"mode": "production",
|
||||
"optimization": {
|
||||
"minimizer": [
|
||||
new TerserPlugin({
|
||||
"extractComments": false,
|
||||
"terserOptions": {
|
||||
"compress": {
|
||||
"passes": 2
|
||||
}
|
||||
}
|
||||
})
|
||||
]
|
||||
}
|
||||
};
|
||||
const entryLibrary = {
|
||||
"entry": "./browser-exports.mjs",
|
||||
"packageJson": libraryPackageJson
|
||||
};
|
||||
export default [
|
||||
config({
|
||||
...entryLibrary,
|
||||
...modeDevelopment,
|
||||
"filename": "markdownlint-browser.js"
|
||||
}),
|
||||
config({
|
||||
...entryLibrary,
|
||||
...modeProduction,
|
||||
"filename": "markdownlint-browser.min.js"
|
||||
})
|
||||
];
|
6
doc-build/.markdownlint.jsonc
Normal file
6
doc-build/.markdownlint.jsonc
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"extends": "../.markdownlint.json",
|
||||
|
||||
// Headings are added by the "build-docs" script (build-rules.mjs)
|
||||
"first-line-heading": false
|
||||
}
|
117
doc-build/build-rules.mjs
Normal file
117
doc-build/build-rules.mjs
Normal file
|
@ -0,0 +1,117 @@
|
|||
import { readFile, writeFile } from "node:fs/promises";
|
||||
import { EOL } from "node:os";
|
||||
import rules from "../lib/rules.mjs";
|
||||
import { newLineRe } from "../helpers/helpers.cjs";
|
||||
import { deprecatedRuleNames, fixableRuleNames } from "../lib/constants.mjs";
|
||||
|
||||
const maxLineLength = 80;
|
||||
|
||||
const pathFor = (relativePath) => new URL(relativePath, import.meta.url);
|
||||
const inCode = (items) => items.map((item) => `\`${item}\``);
|
||||
const sortedComma = (items) => items.sort().join(", ");
|
||||
const linesFrom = (text) => text.split(newLineRe);
|
||||
const wrapListItem = (line) => {
|
||||
const wrappedLines = [];
|
||||
let remainingLine = line;
|
||||
while (remainingLine.length > maxLineLength) {
|
||||
let index = maxLineLength - 1;
|
||||
while (remainingLine[index] !== " ") {
|
||||
index--;
|
||||
}
|
||||
wrappedLines.push(remainingLine.slice(0, index + 1).trimEnd());
|
||||
remainingLine = " " + remainingLine.slice(index + 1).trimStart();
|
||||
}
|
||||
wrappedLines.push(remainingLine);
|
||||
return wrappedLines;
|
||||
};
|
||||
|
||||
// import { default as schema } from "file.json" assert { type: "json" };
|
||||
const importJson =
|
||||
async(file) => JSON.parse(await readFile(pathFor(file)));
|
||||
const schema = await importJson("../schema/markdownlint-config-schema.json");
|
||||
|
||||
const lines = [];
|
||||
|
||||
const heading = await readFile(pathFor("./heading.md"), "utf8");
|
||||
lines.push(...linesFrom(heading));
|
||||
|
||||
for (const rule of rules) {
|
||||
const name = rule.names[0];
|
||||
const deprecated = deprecatedRuleNames.includes(name);
|
||||
const decorator = deprecated ? "~~" : "";
|
||||
lines.push(
|
||||
`<a name="${name.toLowerCase()}"></a>`,
|
||||
""
|
||||
);
|
||||
const section = [];
|
||||
section.push(
|
||||
`## ${decorator}\`${name}\` - ${rule.description}${decorator}`,
|
||||
""
|
||||
);
|
||||
if (deprecated) {
|
||||
section.push(
|
||||
"> This rule is deprecated and provided for backward-compatibility",
|
||||
""
|
||||
);
|
||||
}
|
||||
section.push(
|
||||
`Tags: ${sortedComma(inCode(rule.tags))}`,
|
||||
"",
|
||||
`Aliases: ${sortedComma(inCode(rule.names.slice(1)))}`,
|
||||
""
|
||||
);
|
||||
const ruleData = schema.properties[name];
|
||||
if (ruleData.properties) {
|
||||
section.push(
|
||||
"Parameters:",
|
||||
""
|
||||
);
|
||||
for (const property of Object.keys(ruleData.properties).sort()) {
|
||||
const propData = ruleData.properties[property];
|
||||
const propType = [ propData.type ]
|
||||
.flat()
|
||||
.map((type) => ((type === "array") ? `${propData.items.type}[]` : type))
|
||||
.join("|");
|
||||
const defaultValue = Array.isArray(propData.default) ?
|
||||
JSON.stringify(propData.default) :
|
||||
propData.default;
|
||||
const allValues = propData.enum?.sort();
|
||||
const listItem = `- \`${property}\`: ${propData.description} (` +
|
||||
`\`${propType}\`, default \`${defaultValue}\`` +
|
||||
(propData.enum ?
|
||||
`, values ${allValues.map((value) => `\`${value}\``).join(" / ")}` :
|
||||
""
|
||||
) +
|
||||
")";
|
||||
section.push(...wrapListItem(listItem));
|
||||
}
|
||||
section.push(
|
||||
""
|
||||
);
|
||||
}
|
||||
if (fixableRuleNames.includes(name)) {
|
||||
section.push(
|
||||
"Fixable: Some violations can be fixed by tooling",
|
||||
""
|
||||
);
|
||||
}
|
||||
const contents =
|
||||
// eslint-disable-next-line no-await-in-loop
|
||||
await readFile(pathFor(`./${name.toLowerCase()}.md`), "utf8");
|
||||
section.push(...linesFrom(contents));
|
||||
|
||||
// eslint-disable-next-line no-await-in-loop
|
||||
await writeFile(
|
||||
pathFor(`../doc/${name.toLowerCase()}.md`),
|
||||
section.join(EOL).slice(1),
|
||||
"utf8"
|
||||
);
|
||||
|
||||
lines.push(...section);
|
||||
}
|
||||
|
||||
const footing = await readFile(pathFor("./footing.md"), "utf8");
|
||||
lines.push(...linesFrom(footing));
|
||||
|
||||
const content = lines.join(EOL);
|
||||
await writeFile(pathFor("../doc/Rules.md"), content, "utf8");
|
7
doc-build/footing.md
Normal file
7
doc-build/footing.md
Normal file
|
@ -0,0 +1,7 @@
|
|||
<!-- markdownlint-configure-file {
|
||||
"no-inline-html": {
|
||||
"allowed_elements": [
|
||||
"a"
|
||||
]
|
||||
}
|
||||
} -->
|
5
doc-build/heading.md
Normal file
5
doc-build/heading.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
# Rules
|
||||
|
||||
This document contains a description of all rules, what they are checking for,
|
||||
as well as examples of documents that break the rule and corrected
|
||||
versions of the examples.
|
31
doc-build/md001.md
Normal file
31
doc-build/md001.md
Normal file
|
@ -0,0 +1,31 @@
|
|||
This rule is triggered when you skip heading levels in a Markdown document, for
|
||||
example:
|
||||
|
||||
```markdown
|
||||
# Heading 1
|
||||
|
||||
### Heading 3
|
||||
|
||||
We skipped out a 2nd level heading in this document
|
||||
```
|
||||
|
||||
When using multiple heading levels, nested headings should increase by only one
|
||||
level at a time:
|
||||
|
||||
```markdown
|
||||
# Heading 1
|
||||
|
||||
## Heading 2
|
||||
|
||||
### Heading 3
|
||||
|
||||
#### Heading 4
|
||||
|
||||
## Another Heading 2
|
||||
|
||||
### Another Heading 3
|
||||
```
|
||||
|
||||
Rationale: Headings represent the structure of a document and can be confusing
|
||||
when skipped - especially for accessibility scenarios. More information:
|
||||
<https://www.w3.org/WAI/tutorials/page-structure/headings/>.
|
47
doc-build/md003.md
Normal file
47
doc-build/md003.md
Normal file
|
@ -0,0 +1,47 @@
|
|||
This rule is triggered when different heading styles are used in the same
|
||||
document:
|
||||
|
||||
```markdown
|
||||
# ATX style H1
|
||||
|
||||
## Closed ATX style H2 ##
|
||||
|
||||
Setext style H1
|
||||
===============
|
||||
```
|
||||
|
||||
To fix the issue, use consistent heading styles throughout the document:
|
||||
|
||||
```markdown
|
||||
# ATX style H1
|
||||
|
||||
## ATX style H2
|
||||
```
|
||||
|
||||
The `setext_with_atx` and `setext_with_atx_closed` settings allow ATX-style
|
||||
headings of level 3 or more in documents with setext-style headings (which only
|
||||
support level 1 and 2 headings):
|
||||
|
||||
```markdown
|
||||
Setext style H1
|
||||
===============
|
||||
|
||||
Setext style H2
|
||||
---------------
|
||||
|
||||
### ATX style H3
|
||||
```
|
||||
|
||||
Note: The configured heading style can be a specific style to require (`atx`,
|
||||
`atx_closed`, `setext`, `setext_with_atx`, `setext_with_atx_closed`), or can
|
||||
require that all heading styles match the first heading style via `consistent`.
|
||||
|
||||
Note: The placement of a horizontal rule directly below a line of text can
|
||||
trigger this rule by turning that text into a level 2 setext-style heading:
|
||||
|
||||
```markdown
|
||||
A line of text followed by a horizontal rule becomes a heading
|
||||
---
|
||||
```
|
||||
|
||||
Rationale: Consistent formatting makes it easier to understand a document.
|
37
doc-build/md004.md
Normal file
37
doc-build/md004.md
Normal file
|
@ -0,0 +1,37 @@
|
|||
This rule is triggered when the symbols used in the document for unordered
|
||||
list items do not match the configured unordered list style:
|
||||
|
||||
```markdown
|
||||
* Item 1
|
||||
+ Item 2
|
||||
- Item 3
|
||||
```
|
||||
|
||||
To fix this issue, use the configured style for list items throughout the
|
||||
document:
|
||||
|
||||
```markdown
|
||||
* Item 1
|
||||
* Item 2
|
||||
* Item 3
|
||||
```
|
||||
|
||||
The configured list style can ensure all list styling is a specific symbol
|
||||
(`asterisk`, `plus`, `dash`), ensure each sublist has a consistent symbol that
|
||||
differs from its parent list (`sublist`), or ensure all list styles match the
|
||||
first list style (`consistent`).
|
||||
|
||||
For example, the following is valid for the `sublist` style because the
|
||||
outer-most indent uses asterisk, the middle indent uses plus, and the inner-most
|
||||
indent uses dash:
|
||||
|
||||
```markdown
|
||||
* Item 1
|
||||
+ Item 2
|
||||
- Item 3
|
||||
+ Item 4
|
||||
* Item 4
|
||||
+ Item 5
|
||||
```
|
||||
|
||||
Rationale: Consistent formatting makes it easier to understand a document.
|
45
doc-build/md005.md
Normal file
45
doc-build/md005.md
Normal file
|
@ -0,0 +1,45 @@
|
|||
This rule is triggered when list items are parsed as being at the same level,
|
||||
but don't have the same indentation:
|
||||
|
||||
```markdown
|
||||
* Item 1
|
||||
* Nested Item 1
|
||||
* Nested Item 2
|
||||
* A misaligned item
|
||||
```
|
||||
|
||||
Usually, this rule will be triggered because of a typo. Correct the indentation
|
||||
for the list to fix it:
|
||||
|
||||
```markdown
|
||||
* Item 1
|
||||
* Nested Item 1
|
||||
* Nested Item 2
|
||||
* Nested Item 3
|
||||
```
|
||||
|
||||
Sequentially-ordered list markers are usually left-aligned such that all items
|
||||
have the same starting column:
|
||||
|
||||
```markdown
|
||||
...
|
||||
8. Item
|
||||
9. Item
|
||||
10. Item
|
||||
11. Item
|
||||
...
|
||||
```
|
||||
|
||||
This rule also supports right-alignment of list markers such that all items have
|
||||
the same ending column:
|
||||
|
||||
```markdown
|
||||
...
|
||||
8. Item
|
||||
9. Item
|
||||
10. Item
|
||||
11. Item
|
||||
...
|
||||
```
|
||||
|
||||
Rationale: Violations of this rule can lead to improperly rendered content.
|
36
doc-build/md007.md
Normal file
36
doc-build/md007.md
Normal file
|
@ -0,0 +1,36 @@
|
|||
This rule is triggered when list items are not indented by the configured
|
||||
number of spaces (default: 2).
|
||||
|
||||
Example:
|
||||
|
||||
```markdown
|
||||
* List item
|
||||
* Nested list item indented by 3 spaces
|
||||
```
|
||||
|
||||
Corrected Example:
|
||||
|
||||
```markdown
|
||||
* List item
|
||||
* Nested list item indented by 2 spaces
|
||||
```
|
||||
|
||||
Note: This rule applies to a sublist only if its parent lists are all also
|
||||
unordered (otherwise, extra indentation of ordered lists interferes with the
|
||||
rule).
|
||||
|
||||
The `start_indented` parameter allows the first level of lists to be indented by
|
||||
the configured number of spaces rather than starting at zero. The `start_indent`
|
||||
parameter allows the first level of lists to be indented by a different number
|
||||
of spaces than the rest (ignored when `start_indented` is not set).
|
||||
|
||||
Rationale: Indenting by 2 spaces allows the content of a nested list to be in
|
||||
line with the start of the content of the parent list when a single space is
|
||||
used after the list marker. Indenting by 4 spaces is consistent with code blocks
|
||||
and simpler for editors to implement. Additionally, this can be a compatibility
|
||||
issue for other Markdown parsers, which require 4-space indents. More
|
||||
information: [Markdown Style Guide][markdown-style-guide].
|
||||
|
||||
Note: See [Prettier.md](Prettier.md) for compatibility information.
|
||||
|
||||
[markdown-style-guide]: https://cirosantilli.com/markdown-style-guide#indentation-of-content-inside-lists
|
36
doc-build/md009.md
Normal file
36
doc-build/md009.md
Normal file
|
@ -0,0 +1,36 @@
|
|||
This rule is triggered on any lines that end with unexpected whitespace. To fix
|
||||
this, remove the trailing space from the end of the line.
|
||||
|
||||
Note: Trailing space is allowed in indented and fenced code blocks because some
|
||||
languages require it.
|
||||
|
||||
The `br_spaces` parameter allows an exception to this rule for a specific number
|
||||
of trailing spaces, typically used to insert an explicit line break. The default
|
||||
value allows 2 spaces to indicate a hard break (\<br> element).
|
||||
|
||||
Note: You must set `br_spaces` to a value >= 2 for this parameter to take
|
||||
effect. Setting `br_spaces` to 1 behaves the same as 0, disallowing any trailing
|
||||
spaces.
|
||||
|
||||
By default, this rule will not trigger when the allowed number of spaces is
|
||||
used, even when it doesn't create a hard break (for example, at the end of a
|
||||
paragraph). To report such instances as well, set the `strict` parameter to
|
||||
`true`.
|
||||
|
||||
```markdown
|
||||
Text text text
|
||||
text[2 spaces]
|
||||
```
|
||||
|
||||
Using spaces to indent blank lines inside a list item is usually not necessary,
|
||||
but some parsers require it. Set the `list_item_empty_lines` parameter to `true`
|
||||
to allow this (even when `strict` is `true`):
|
||||
|
||||
```markdown
|
||||
- list item text
|
||||
[2 spaces]
|
||||
list item text
|
||||
```
|
||||
|
||||
Rationale: Except when being used to create a line break, trailing whitespace
|
||||
has no purpose and does not affect the rendering of content.
|
41
doc-build/md010.md
Normal file
41
doc-build/md010.md
Normal file
|
@ -0,0 +1,41 @@
|
|||
This rule is triggered by any lines that contain hard tab characters instead
|
||||
of using spaces for indentation. To fix this, replace any hard tab characters
|
||||
with spaces instead.
|
||||
|
||||
Example:
|
||||
|
||||
<!-- markdownlint-disable no-hard-tabs -->
|
||||
|
||||
```markdown
|
||||
Some text
|
||||
|
||||
* hard tab character used to indent the list item
|
||||
```
|
||||
|
||||
<!-- markdownlint-restore -->
|
||||
|
||||
Corrected example:
|
||||
|
||||
```markdown
|
||||
Some text
|
||||
|
||||
* Spaces used to indent the list item instead
|
||||
```
|
||||
|
||||
You have the option to exclude this rule for code blocks and spans. To do so,
|
||||
set the `code_blocks` parameter to `false`. Code blocks and spans are included
|
||||
by default since handling of tabs by Markdown tools can be inconsistent (e.g.,
|
||||
using 4 vs. 8 spaces).
|
||||
|
||||
When code blocks are scanned (e.g., by default or if `code_blocks` is `true`),
|
||||
the `ignore_code_languages` parameter can be set to a list of languages that
|
||||
should be ignored (i.e., hard tabs will be allowed, though not required). This
|
||||
makes it easier for documents to include code for languages that require hard
|
||||
tabs.
|
||||
|
||||
By default, violations of this rule are fixed by replacing the tab with 1 space
|
||||
character. To use a different number of spaces, set the `spaces_per_tab`
|
||||
parameter to the desired value.
|
||||
|
||||
Rationale: Hard tabs are often rendered inconsistently by different editors and
|
||||
can be harder to work with than spaces.
|
22
doc-build/md011.md
Normal file
22
doc-build/md011.md
Normal file
|
@ -0,0 +1,22 @@
|
|||
This rule is triggered when text that appears to be a link is encountered, but
|
||||
where the syntax appears to have been reversed (the `[]` and `()` are
|
||||
reversed):
|
||||
|
||||
```markdown
|
||||
(Incorrect link syntax)[https://www.example.com/]
|
||||
```
|
||||
|
||||
To fix this, swap the `[]` and `()` around:
|
||||
|
||||
```markdown
|
||||
[Correct link syntax](https://www.example.com/)
|
||||
```
|
||||
|
||||
Note: [Markdown Extra](https://en.wikipedia.org/wiki/Markdown_Extra)-style
|
||||
footnotes do not trigger this rule:
|
||||
|
||||
```markdown
|
||||
For (example)[^1]
|
||||
```
|
||||
|
||||
Rationale: Reversed links are not rendered as usable links.
|
26
doc-build/md012.md
Normal file
26
doc-build/md012.md
Normal file
|
@ -0,0 +1,26 @@
|
|||
This rule is triggered when there are multiple consecutive blank lines in the
|
||||
document:
|
||||
|
||||
```markdown
|
||||
Some text here
|
||||
|
||||
|
||||
Some more text here
|
||||
```
|
||||
|
||||
To fix this, delete the offending lines:
|
||||
|
||||
```markdown
|
||||
Some text here
|
||||
|
||||
Some more text here
|
||||
```
|
||||
|
||||
Note: this rule will not be triggered if there are multiple consecutive blank
|
||||
lines inside code blocks.
|
||||
|
||||
Note: The `maximum` parameter can be used to configure the maximum number of
|
||||
consecutive blank lines.
|
||||
|
||||
Rationale: Except in a code block, blank lines serve no purpose and do not
|
||||
affect the rendering of content.
|
39
doc-build/md013.md
Normal file
39
doc-build/md013.md
Normal file
|
@ -0,0 +1,39 @@
|
|||
This rule is triggered when there are lines that are longer than the
|
||||
configured `line_length` (default: 80 characters). To fix this, split the line
|
||||
up into multiple lines. To set a different maximum length for headings, use
|
||||
`heading_line_length`. To set a different maximum length for code blocks, use
|
||||
`code_block_line_length`
|
||||
|
||||
This rule has an exception when there is no whitespace beyond the configured
|
||||
line length. This allows you to include items such as long URLs without being
|
||||
forced to break them in the middle. To disable this exception, set the `strict`
|
||||
parameter to `true` and an issue will be reported when any line is too long. To
|
||||
warn for lines that are too long and could be fixed but allow long lines
|
||||
without spaces, set the `stern` parameter to `true`.
|
||||
|
||||
For example (assuming normal behavior):
|
||||
|
||||
```markdown
|
||||
IF THIS LINE IS THE MAXIMUM LENGTH
|
||||
This line is okay because there are-no-spaces-beyond-that-length
|
||||
This line is a violation because there are spaces beyond that length
|
||||
This-line-is-okay-because-there-are-no-spaces-anywhere-within
|
||||
```
|
||||
|
||||
In `strict` mode, the last three lines above are all violations. In `stern`
|
||||
mode, the middle two lines above are both violations, but the last is okay.
|
||||
|
||||
You have the option to exclude this rule for code blocks, tables, or headings.
|
||||
To do so, set the `code_blocks`, `tables`, or `headings` parameter(s) to false.
|
||||
|
||||
Code blocks are included in this rule by default since it is often a
|
||||
requirement for document readability, and tentatively compatible with code
|
||||
rules. Still, some languages do not lend themselves to short lines.
|
||||
|
||||
Lines with link/image reference definitions and standalone lines (i.e., not part
|
||||
of a paragraph) with only a link/image (possibly using (strong) emphasis) are
|
||||
always exempted from this rule (even in `strict` mode) because there is often no
|
||||
way to split such lines without breaking the URL.
|
||||
|
||||
Rationale: Extremely long lines can be difficult to work with in some editors.
|
||||
More information: <https://cirosantilli.com/markdown-style-guide#line-wrapping>.
|
46
doc-build/md014.md
Normal file
46
doc-build/md014.md
Normal file
|
@ -0,0 +1,46 @@
|
|||
This rule is triggered when there are code blocks showing shell commands to be
|
||||
typed, and *all* of the shell commands are preceded by dollar signs ($):
|
||||
|
||||
<!-- markdownlint-disable commands-show-output -->
|
||||
|
||||
```markdown
|
||||
$ ls
|
||||
$ cat foo
|
||||
$ less bar
|
||||
```
|
||||
|
||||
<!-- markdownlint-restore -->
|
||||
|
||||
The dollar signs are unnecessary in this situation, and should not be
|
||||
included:
|
||||
|
||||
```markdown
|
||||
ls
|
||||
cat foo
|
||||
less bar
|
||||
```
|
||||
|
||||
Showing output for commands preceded by dollar signs does not trigger this rule:
|
||||
|
||||
```markdown
|
||||
$ ls
|
||||
foo bar
|
||||
$ cat foo
|
||||
Hello world
|
||||
$ cat bar
|
||||
baz
|
||||
```
|
||||
|
||||
Because some commands do not produce output, it is not a violation if *some*
|
||||
commands do not have output:
|
||||
|
||||
```markdown
|
||||
$ mkdir test
|
||||
mkdir: created directory 'test'
|
||||
$ ls test
|
||||
```
|
||||
|
||||
Rationale: It is easier to copy/paste and less noisy if the dollar signs
|
||||
are omitted when they are not needed. See
|
||||
<https://cirosantilli.com/markdown-style-guide#dollar-signs-in-shell-code>
|
||||
for more information.
|
19
doc-build/md018.md
Normal file
19
doc-build/md018.md
Normal file
|
@ -0,0 +1,19 @@
|
|||
This rule is triggered when spaces are missing after the hash characters
|
||||
in an atx style heading:
|
||||
|
||||
```markdown
|
||||
#Heading 1
|
||||
|
||||
##Heading 2
|
||||
```
|
||||
|
||||
To fix this, separate the heading text from the hash character by a single
|
||||
space:
|
||||
|
||||
```markdown
|
||||
# Heading 1
|
||||
|
||||
## Heading 2
|
||||
```
|
||||
|
||||
Rationale: Violations of this rule can lead to improperly rendered content.
|
20
doc-build/md019.md
Normal file
20
doc-build/md019.md
Normal file
|
@ -0,0 +1,20 @@
|
|||
This rule is triggered when more than one space is used to separate the
|
||||
heading text from the hash characters in an atx style heading:
|
||||
|
||||
```markdown
|
||||
# Heading 1
|
||||
|
||||
## Heading 2
|
||||
```
|
||||
|
||||
To fix this, separate the heading text from the hash character by a single
|
||||
space:
|
||||
|
||||
```markdown
|
||||
# Heading 1
|
||||
|
||||
## Heading 2
|
||||
```
|
||||
|
||||
Rationale: Extra space has no purpose and does not affect the rendering of
|
||||
content.
|
21
doc-build/md020.md
Normal file
21
doc-build/md020.md
Normal file
|
@ -0,0 +1,21 @@
|
|||
This rule is triggered when spaces are missing inside the hash characters
|
||||
in a closed atx style heading:
|
||||
|
||||
```markdown
|
||||
#Heading 1#
|
||||
|
||||
##Heading 2##
|
||||
```
|
||||
|
||||
To fix this, separate the heading text from the hash character by a single
|
||||
space:
|
||||
|
||||
```markdown
|
||||
# Heading 1 #
|
||||
|
||||
## Heading 2 ##
|
||||
```
|
||||
|
||||
Note: this rule will fire if either side of the heading is missing spaces.
|
||||
|
||||
Rationale: Violations of this rule can lead to improperly rendered content.
|
23
doc-build/md021.md
Normal file
23
doc-build/md021.md
Normal file
|
@ -0,0 +1,23 @@
|
|||
This rule is triggered when more than one space is used to separate the
|
||||
heading text from the hash characters in a closed atx style heading:
|
||||
|
||||
```markdown
|
||||
# Heading 1 #
|
||||
|
||||
## Heading 2 ##
|
||||
```
|
||||
|
||||
To fix this, separate the heading text from the hash character by a single
|
||||
space:
|
||||
|
||||
```markdown
|
||||
# Heading 1 #
|
||||
|
||||
## Heading 2 ##
|
||||
```
|
||||
|
||||
Note: this rule will fire if either side of the heading contains multiple
|
||||
spaces.
|
||||
|
||||
Rationale: Extra space has no purpose and does not affect the rendering of
|
||||
content.
|
39
doc-build/md022.md
Normal file
39
doc-build/md022.md
Normal file
|
@ -0,0 +1,39 @@
|
|||
This rule is triggered when headings (any style) are either not preceded or not
|
||||
followed by at least one blank line:
|
||||
|
||||
```markdown
|
||||
# Heading 1
|
||||
Some text
|
||||
|
||||
Some more text
|
||||
## Heading 2
|
||||
```
|
||||
|
||||
To fix this, ensure that all headings have a blank line both before and after
|
||||
(except where the heading is at the beginning or end of the document):
|
||||
|
||||
```markdown
|
||||
# Heading 1
|
||||
|
||||
Some text
|
||||
|
||||
Some more text
|
||||
|
||||
## Heading 2
|
||||
```
|
||||
|
||||
The `lines_above` and `lines_below` parameters can be used to specify a
|
||||
different number of blank lines (including `0`) above or below each heading.
|
||||
If the value `-1` is used for either parameter, any number of blank lines is
|
||||
allowed. To customize the number of lines above or below each heading level
|
||||
individually, specify a `number[]` where values correspond to heading levels
|
||||
1-6 (in order).
|
||||
|
||||
Notes: If `lines_above` or `lines_below` are configured to require more than one
|
||||
blank line, [MD012/no-multiple-blanks](md012.md) should also be customized. This
|
||||
rule checks for *at least* as many blank lines as specified; any extra blank
|
||||
lines are ignored.
|
||||
|
||||
Rationale: Aside from aesthetic reasons, some parsers, including `kramdown`,
|
||||
will not parse headings that don't have a blank line before, and will parse them
|
||||
as regular text.
|
25
doc-build/md023.md
Normal file
25
doc-build/md023.md
Normal file
|
@ -0,0 +1,25 @@
|
|||
This rule is triggered when a heading is indented by one or more spaces:
|
||||
|
||||
```markdown
|
||||
Some text
|
||||
|
||||
# Indented heading
|
||||
```
|
||||
|
||||
To fix this, ensure that all headings start at the beginning of the line:
|
||||
|
||||
```markdown
|
||||
Some text
|
||||
|
||||
# Heading
|
||||
```
|
||||
|
||||
Note that scenarios like block quotes "indent" the start of the line, so the
|
||||
following is also correct:
|
||||
|
||||
```markdown
|
||||
> # Heading in Block Quote
|
||||
```
|
||||
|
||||
Rationale: Headings that don't start at the beginning of the line will not be
|
||||
parsed as headings, and will instead appear as regular text.
|
34
doc-build/md024.md
Normal file
34
doc-build/md024.md
Normal file
|
@ -0,0 +1,34 @@
|
|||
This rule is triggered if there are multiple headings in the document that have
|
||||
the same text:
|
||||
|
||||
```markdown
|
||||
# Some text
|
||||
|
||||
## Some text
|
||||
```
|
||||
|
||||
To fix this, ensure that the content of each heading is different:
|
||||
|
||||
```markdown
|
||||
# Some text
|
||||
|
||||
## Some more text
|
||||
```
|
||||
|
||||
If the parameter `siblings_only` is set to `true`, duplication is allowed for
|
||||
headings with different parents (as is common in changelogs):
|
||||
|
||||
```markdown
|
||||
# Change log
|
||||
|
||||
## 1.0.0
|
||||
|
||||
### Features
|
||||
|
||||
## 2.0.0
|
||||
|
||||
### Features
|
||||
```
|
||||
|
||||
Rationale: Some Markdown parsers generate anchors for headings based on the
|
||||
heading name; headings with the same content can cause problems with that.
|
37
doc-build/md025.md
Normal file
37
doc-build/md025.md
Normal file
|
@ -0,0 +1,37 @@
|
|||
This rule is triggered when a top-level heading is in use (the first line of
|
||||
the file is an h1 heading), and more than one h1 heading is in use in the
|
||||
document:
|
||||
|
||||
```markdown
|
||||
# Top level heading
|
||||
|
||||
# Another top-level heading
|
||||
```
|
||||
|
||||
To fix, structure your document so there is a single h1 heading that is
|
||||
the title for the document. Subsequent headings must be
|
||||
lower-level headings (h2, h3, etc.):
|
||||
|
||||
```markdown
|
||||
# Title
|
||||
|
||||
## Heading
|
||||
|
||||
## Another heading
|
||||
```
|
||||
|
||||
Note: The `level` parameter can be used to change the top-level (ex: to h2) in
|
||||
cases where an h1 is added externally.
|
||||
|
||||
If [YAML](https://en.wikipedia.org/wiki/YAML) front matter is present and
|
||||
contains a `title` property (commonly used with blog posts), this rule treats
|
||||
that as a top level heading and will report a violation for any subsequent
|
||||
top-level headings. To use a different property name in the front matter,
|
||||
specify the text of a regular expression via the `front_matter_title` parameter.
|
||||
To disable the use of front matter by this rule, specify `""` for
|
||||
`front_matter_title`.
|
||||
|
||||
Rationale: A top-level heading is an h1 on the first line of the file, and
|
||||
serves as the title for the document. If this convention is in use, then there
|
||||
can not be more than one title for the document, and the entire document should
|
||||
be contained within this heading.
|
28
doc-build/md026.md
Normal file
28
doc-build/md026.md
Normal file
|
@ -0,0 +1,28 @@
|
|||
This rule is triggered on any heading that has one of the specified normal or
|
||||
full-width punctuation characters as the last character in the line:
|
||||
|
||||
```markdown
|
||||
# This is a heading.
|
||||
```
|
||||
|
||||
To fix this, remove the trailing punctuation:
|
||||
|
||||
```markdown
|
||||
# This is a heading
|
||||
```
|
||||
|
||||
Note: The `punctuation` parameter can be used to specify what characters count
|
||||
as punctuation at the end of a heading. For example, you can change it to
|
||||
`".,;:"` to allow headings that end with an exclamation point. `?` is
|
||||
allowed by default because of how common it is in headings of FAQ-style
|
||||
documents. Setting the `punctuation` parameter to `""` allows all characters -
|
||||
and is equivalent to disabling the rule.
|
||||
|
||||
Note: The trailing semicolon of [HTML entity references][html-entity-references]
|
||||
like `©`, `©`, and `©` is ignored by this rule.
|
||||
|
||||
Rationale: Headings are not meant to be full sentences. More information:
|
||||
[Punctuation at the end of headers][end-punctuation].
|
||||
|
||||
[end-punctuation]: https://cirosantilli.com/markdown-style-guide#punctuation-at-the-end-of-headers
|
||||
[html-entity-references]: https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references
|
20
doc-build/md027.md
Normal file
20
doc-build/md027.md
Normal file
|
@ -0,0 +1,20 @@
|
|||
This rule is triggered when blockquotes have more than one space after the
|
||||
blockquote (`>`) symbol:
|
||||
|
||||
```markdown
|
||||
> This is a blockquote with bad indentation
|
||||
> there should only be one.
|
||||
```
|
||||
|
||||
To fix, remove any extraneous space:
|
||||
|
||||
```markdown
|
||||
> This is a blockquote with correct
|
||||
> indentation.
|
||||
```
|
||||
|
||||
Inferring intended list indentation within a blockquote can be challenging;
|
||||
setting the `list_items` parameter to `false` disables this rule for ordered
|
||||
and unordered list items.
|
||||
|
||||
Rationale: Consistent formatting makes it easier to understand a document.
|
34
doc-build/md028.md
Normal file
34
doc-build/md028.md
Normal file
|
@ -0,0 +1,34 @@
|
|||
This rule is triggered when two blockquote blocks are separated by nothing
|
||||
except for a blank line:
|
||||
|
||||
```markdown
|
||||
> This is a blockquote
|
||||
> which is immediately followed by
|
||||
|
||||
> this blockquote. Unfortunately
|
||||
> In some parsers, these are treated as the same blockquote.
|
||||
```
|
||||
|
||||
To fix this, ensure that any blockquotes that are right next to each other
|
||||
have some text in between:
|
||||
|
||||
```markdown
|
||||
> This is a blockquote.
|
||||
|
||||
And Jimmy also said:
|
||||
|
||||
> This too is a blockquote.
|
||||
```
|
||||
|
||||
Alternatively, if they are supposed to be the same quote, then add the
|
||||
blockquote symbol at the beginning of the blank line:
|
||||
|
||||
```markdown
|
||||
> This is a blockquote.
|
||||
>
|
||||
> This is the same blockquote.
|
||||
```
|
||||
|
||||
Rationale: Some Markdown parsers will treat two blockquotes separated by one
|
||||
or more blank lines as the same blockquote, while others will treat them as
|
||||
separate blockquotes.
|
87
doc-build/md029.md
Normal file
87
doc-build/md029.md
Normal file
|
@ -0,0 +1,87 @@
|
|||
This rule is triggered for ordered lists that do not either start with '1.' or
|
||||
do not have a prefix that increases in numerical order (depending on the
|
||||
configured style). The less-common pattern of using '0.' as a first prefix or
|
||||
for all prefixes is also supported.
|
||||
|
||||
Example valid list if the style is configured as 'one':
|
||||
|
||||
```markdown
|
||||
1. Do this.
|
||||
1. Do that.
|
||||
1. Done.
|
||||
```
|
||||
|
||||
Examples of valid lists if the style is configured as 'ordered':
|
||||
|
||||
```markdown
|
||||
1. Do this.
|
||||
2. Do that.
|
||||
3. Done.
|
||||
```
|
||||
|
||||
```markdown
|
||||
0. Do this.
|
||||
1. Do that.
|
||||
2. Done.
|
||||
```
|
||||
|
||||
All three examples are valid when the style is configured as 'one_or_ordered'.
|
||||
|
||||
Example valid list if the style is configured as 'zero':
|
||||
|
||||
```markdown
|
||||
0. Do this.
|
||||
0. Do that.
|
||||
0. Done.
|
||||
```
|
||||
|
||||
Example invalid list for all styles:
|
||||
|
||||
```markdown
|
||||
1. Do this.
|
||||
3. Done.
|
||||
```
|
||||
|
||||
This rule supports 0-prefixing ordered list items for uniform indentation:
|
||||
|
||||
```markdown
|
||||
...
|
||||
08. Item
|
||||
09. Item
|
||||
10. Item
|
||||
11. Item
|
||||
...
|
||||
```
|
||||
|
||||
Note: This rule will report violations for cases like the following where an
|
||||
improperly-indented code block (or similar) appears between two list items and
|
||||
"breaks" the list in two:
|
||||
|
||||
<!-- markdownlint-disable code-fence-style -->
|
||||
|
||||
~~~markdown
|
||||
1. First list
|
||||
|
||||
```text
|
||||
Code block
|
||||
```
|
||||
|
||||
1. Second list
|
||||
~~~
|
||||
|
||||
The fix is to indent the code block so it becomes part of the preceding list
|
||||
item as intended:
|
||||
|
||||
~~~markdown
|
||||
1. First list
|
||||
|
||||
```text
|
||||
Code block
|
||||
```
|
||||
|
||||
2. Still first list
|
||||
~~~
|
||||
|
||||
<!-- markdownlint-restore -->
|
||||
|
||||
Rationale: Consistent formatting makes it easier to understand a document.
|
64
doc-build/md030.md
Normal file
64
doc-build/md030.md
Normal file
|
@ -0,0 +1,64 @@
|
|||
This rule checks for the number of spaces between a list marker (e.g. '`-`',
|
||||
'`*`', '`+`' or '`1.`') and the text of the list item.
|
||||
|
||||
The number of spaces checked for depends on the document style in use, but the
|
||||
default is 1 space after any list marker:
|
||||
|
||||
```markdown
|
||||
* Foo
|
||||
* Bar
|
||||
* Baz
|
||||
|
||||
1. Foo
|
||||
1. Bar
|
||||
1. Baz
|
||||
|
||||
1. Foo
|
||||
* Bar
|
||||
1. Baz
|
||||
```
|
||||
|
||||
A document style may change the number of spaces after unordered list items
|
||||
and ordered list items independently, as well as based on whether the content
|
||||
of every item in the list consists of a single paragraph or multiple
|
||||
paragraphs (including sub-lists and code blocks).
|
||||
|
||||
For example, the style guide at
|
||||
<https://cirosantilli.com/markdown-style-guide#spaces-after-list-marker>
|
||||
specifies that 1 space after the list marker should be used if every item in
|
||||
the list fits within a single paragraph, but to use 2 or 3 spaces (for ordered
|
||||
and unordered lists respectively) if there are multiple paragraphs of content
|
||||
inside the list:
|
||||
|
||||
```markdown
|
||||
* Foo
|
||||
* Bar
|
||||
* Baz
|
||||
```
|
||||
|
||||
vs.
|
||||
|
||||
```markdown
|
||||
* Foo
|
||||
|
||||
Second paragraph
|
||||
|
||||
* Bar
|
||||
```
|
||||
|
||||
or
|
||||
|
||||
```markdown
|
||||
1. Foo
|
||||
|
||||
Second paragraph
|
||||
|
||||
1. Bar
|
||||
```
|
||||
|
||||
To fix this, ensure the correct number of spaces are used after the list marker
|
||||
for your selected document style.
|
||||
|
||||
Rationale: Violations of this rule can lead to improperly rendered content.
|
||||
|
||||
Note: See [Prettier.md](Prettier.md) for compatibility information.
|
38
doc-build/md031.md
Normal file
38
doc-build/md031.md
Normal file
|
@ -0,0 +1,38 @@
|
|||
This rule is triggered when fenced code blocks are either not preceded or not
|
||||
followed by a blank line:
|
||||
|
||||
````markdown
|
||||
Some text
|
||||
```
|
||||
Code block
|
||||
```
|
||||
|
||||
```
|
||||
Another code block
|
||||
```
|
||||
Some more text
|
||||
````
|
||||
|
||||
To fix this, ensure that all fenced code blocks have a blank line both before
|
||||
and after (except where the block is at the beginning or end of the document):
|
||||
|
||||
````markdown
|
||||
Some text
|
||||
|
||||
```
|
||||
Code block
|
||||
```
|
||||
|
||||
```
|
||||
Another code block
|
||||
```
|
||||
|
||||
Some more text
|
||||
````
|
||||
|
||||
Set the `list_items` parameter to `false` to disable this rule for list items.
|
||||
Disabling this behavior for lists can be useful if it is necessary to create a
|
||||
[tight](https://spec.commonmark.org/0.29/#tight) list containing a code fence.
|
||||
|
||||
Rationale: Aside from aesthetic reasons, some parsers, including kramdown, will
|
||||
not parse fenced code blocks that don't have blank lines before and after them.
|
47
doc-build/md032.md
Normal file
47
doc-build/md032.md
Normal file
|
@ -0,0 +1,47 @@
|
|||
This rule is triggered when lists (of any kind) are either not preceded or not
|
||||
followed by a blank line:
|
||||
|
||||
```markdown
|
||||
Some text
|
||||
* List item
|
||||
* List item
|
||||
|
||||
1. List item
|
||||
2. List item
|
||||
***
|
||||
```
|
||||
|
||||
In the first case above, text immediately precedes the unordered list. In the
|
||||
second case above, a thematic break immediately follows the ordered list. To fix
|
||||
violations of this rule, ensure that all lists have a blank line both before and
|
||||
after (except when the list is at the very beginning or end of the document):
|
||||
|
||||
```markdown
|
||||
Some text
|
||||
|
||||
* List item
|
||||
* List item
|
||||
|
||||
1. List item
|
||||
2. List item
|
||||
|
||||
***
|
||||
```
|
||||
|
||||
Note that the following case is **not** a violation of this rule:
|
||||
|
||||
```markdown
|
||||
1. List item
|
||||
More item 1
|
||||
2. List item
|
||||
More item 2
|
||||
```
|
||||
|
||||
Although it is not indented, the text "More item 2" is referred to as a
|
||||
[lazy continuation line][lazy-continuation] and considered part of the second
|
||||
list item.
|
||||
|
||||
Rationale: In addition to aesthetic reasons, some parsers, including kramdown,
|
||||
will not parse lists that don't have blank lines before and after them.
|
||||
|
||||
[lazy-continuation]: https://spec.commonmark.org/0.30/#lazy-continuation-line
|
17
doc-build/md033.md
Normal file
17
doc-build/md033.md
Normal file
|
@ -0,0 +1,17 @@
|
|||
This rule is triggered whenever raw HTML is used in a Markdown document:
|
||||
|
||||
```markdown
|
||||
<h1>Inline HTML heading</h1>
|
||||
```
|
||||
|
||||
To fix this, use 'pure' Markdown instead of including raw HTML:
|
||||
|
||||
```markdown
|
||||
# Markdown heading
|
||||
```
|
||||
|
||||
Note: To allow specific HTML elements, use the `allowed_elements` parameter.
|
||||
|
||||
Rationale: Raw HTML is allowed in Markdown, but this rule is included for
|
||||
those who want their documents to only include "pure" Markdown, or for those
|
||||
who are rendering Markdown documents into something other than HTML.
|
47
doc-build/md034.md
Normal file
47
doc-build/md034.md
Normal file
|
@ -0,0 +1,47 @@
|
|||
This rule is triggered whenever a URL or email address appears without
|
||||
surrounding angle brackets:
|
||||
|
||||
```markdown
|
||||
For more info, visit https://www.example.com/ or email user@example.com.
|
||||
```
|
||||
|
||||
To fix this, add angle brackets around the URL or email address:
|
||||
|
||||
```markdown
|
||||
For more info, visit <https://www.example.com/> or email <user@example.com>.
|
||||
```
|
||||
|
||||
If a URL or email address contains non-ASCII characters, it may be not be
|
||||
handled as intended even when angle brackets are present. In such cases,
|
||||
[percent-encoding](https://en.m.wikipedia.org/wiki/Percent-encoding) can be used
|
||||
to comply with the required syntax for URL and email.
|
||||
|
||||
Note: To include a bare URL or email without it being converted into a link,
|
||||
wrap it in a code span:
|
||||
|
||||
```markdown
|
||||
Not a clickable link: `https://www.example.com`
|
||||
```
|
||||
|
||||
Note: The following scenario does not trigger this rule because it could be a
|
||||
shortcut link:
|
||||
|
||||
```markdown
|
||||
[https://www.example.com]
|
||||
```
|
||||
|
||||
Note: The following syntax triggers this rule because the nested link could be
|
||||
a shortcut link (which takes precedence):
|
||||
|
||||
```markdown
|
||||
[text [shortcut] text](https://example.com)
|
||||
```
|
||||
|
||||
To avoid this, escape both inner brackets:
|
||||
|
||||
```markdown
|
||||
[link \[text\] link](https://example.com)
|
||||
```
|
||||
|
||||
Rationale: Without angle brackets, a bare URL or email isn't converted into a
|
||||
link by some Markdown parsers.
|
27
doc-build/md035.md
Normal file
27
doc-build/md035.md
Normal file
|
@ -0,0 +1,27 @@
|
|||
This rule is triggered when inconsistent styles of horizontal rules are used
|
||||
in the document:
|
||||
|
||||
```markdown
|
||||
---
|
||||
|
||||
- - -
|
||||
|
||||
***
|
||||
|
||||
* * *
|
||||
|
||||
****
|
||||
```
|
||||
|
||||
To fix this, use the same horizontal rule everywhere:
|
||||
|
||||
```markdown
|
||||
---
|
||||
|
||||
---
|
||||
```
|
||||
|
||||
The configured style can ensure all horizontal rules use a specific string or it
|
||||
can ensure all horizontal rules match the first horizontal rule (`consistent`).
|
||||
|
||||
Rationale: Consistent formatting makes it easier to understand a document.
|
35
doc-build/md036.md
Normal file
35
doc-build/md036.md
Normal file
|
@ -0,0 +1,35 @@
|
|||
This check looks for instances where emphasized (i.e. bold or italic) text is
|
||||
used to separate sections, where a heading should be used instead:
|
||||
|
||||
```markdown
|
||||
**My document**
|
||||
|
||||
Lorem ipsum dolor sit amet...
|
||||
|
||||
_Another section_
|
||||
|
||||
Consectetur adipiscing elit, sed do eiusmod.
|
||||
```
|
||||
|
||||
To fix this, use Markdown headings instead of emphasized text to denote
|
||||
sections:
|
||||
|
||||
```markdown
|
||||
# My document
|
||||
|
||||
Lorem ipsum dolor sit amet...
|
||||
|
||||
## Another section
|
||||
|
||||
Consectetur adipiscing elit, sed do eiusmod.
|
||||
```
|
||||
|
||||
Note: This rule looks for single-line paragraphs that consist entirely
|
||||
of emphasized text. It won't fire on emphasis used within regular text,
|
||||
multi-line emphasized paragraphs, or paragraphs ending in punctuation
|
||||
(normal or full-width). Similarly to rule MD026, you can configure what
|
||||
characters are recognized as punctuation.
|
||||
|
||||
Rationale: Using emphasis instead of a heading prevents tools from inferring
|
||||
the structure of a document. More information:
|
||||
<https://cirosantilli.com/markdown-style-guide#emphasis-vs-headers>.
|
29
doc-build/md037.md
Normal file
29
doc-build/md037.md
Normal file
|
@ -0,0 +1,29 @@
|
|||
This rule is triggered when emphasis markers (bold, italic) are used, but they
|
||||
have spaces between the markers and the text:
|
||||
|
||||
```markdown
|
||||
Here is some ** bold ** text.
|
||||
|
||||
Here is some * italic * text.
|
||||
|
||||
Here is some more __ bold __ text.
|
||||
|
||||
Here is some more _ italic _ text.
|
||||
```
|
||||
|
||||
To fix this, remove the spaces around the emphasis markers:
|
||||
|
||||
```markdown
|
||||
Here is some **bold** text.
|
||||
|
||||
Here is some *italic* text.
|
||||
|
||||
Here is some more __bold__ text.
|
||||
|
||||
Here is some more _italic_ text.
|
||||
```
|
||||
|
||||
Rationale: Emphasis is only parsed as such when the asterisks/underscores
|
||||
aren't surrounded by spaces. This rule attempts to detect where
|
||||
they were surrounded by spaces, but it appears that emphasized text was
|
||||
intended by the author.
|
44
doc-build/md038.md
Normal file
44
doc-build/md038.md
Normal file
|
@ -0,0 +1,44 @@
|
|||
This rule is triggered for code spans containing content with unnecessary space
|
||||
next to the beginning or ending backticks:
|
||||
|
||||
```markdown
|
||||
`some text `
|
||||
|
||||
` some text`
|
||||
|
||||
` some text `
|
||||
```
|
||||
|
||||
To fix this, remove the extra space characters from the beginning and ending:
|
||||
|
||||
```markdown
|
||||
`some text`
|
||||
```
|
||||
|
||||
Note: A single leading *and* trailing space is allowed by the specification and
|
||||
trimmed by the parser to support code spans that begin or end with a backtick:
|
||||
|
||||
```markdown
|
||||
`` `backticks` ``
|
||||
|
||||
`` backtick` ``
|
||||
```
|
||||
|
||||
Note: When single-space padding is present in the input, it will be preserved
|
||||
(even if unnecessary):
|
||||
|
||||
```markdown
|
||||
` code `
|
||||
```
|
||||
|
||||
Note: Code spans containing only spaces are allowed by the specification and are
|
||||
also preserved:
|
||||
|
||||
```markdown
|
||||
` `
|
||||
|
||||
` `
|
||||
```
|
||||
|
||||
Rationale: Violations of this rule are usually unintentional and can lead to
|
||||
improperly-rendered content.
|
13
doc-build/md039.md
Normal file
13
doc-build/md039.md
Normal file
|
@ -0,0 +1,13 @@
|
|||
This rule is triggered on links that have spaces surrounding the link text:
|
||||
|
||||
```markdown
|
||||
[ a link ](https://www.example.com/)
|
||||
```
|
||||
|
||||
To fix this, remove the spaces surrounding the link text:
|
||||
|
||||
```markdown
|
||||
[a link](https://www.example.com/)
|
||||
```
|
||||
|
||||
Rationale: Consistent formatting makes it easier to understand a document.
|
41
doc-build/md040.md
Normal file
41
doc-build/md040.md
Normal file
|
@ -0,0 +1,41 @@
|
|||
This rule is triggered when fenced code blocks are used, but a language isn't
|
||||
specified:
|
||||
|
||||
````markdown
|
||||
```
|
||||
#!/bin/bash
|
||||
echo Hello world
|
||||
```
|
||||
````
|
||||
|
||||
To fix this, add a language specifier to the code block:
|
||||
|
||||
````markdown
|
||||
```bash
|
||||
#!/bin/bash
|
||||
echo Hello world
|
||||
```
|
||||
````
|
||||
|
||||
To display a code block without syntax highlighting, use:
|
||||
|
||||
````markdown
|
||||
```text
|
||||
Plain text in a code block
|
||||
```
|
||||
````
|
||||
|
||||
You can configure the `allowed_languages` parameter to specify a list of
|
||||
languages code blocks could use. Languages are case sensitive. The default value
|
||||
is `[]` which means any language specifier is valid.
|
||||
|
||||
You can prevent extra data from being present in the info string of fenced code
|
||||
blocks. To do so, set the `language_only` parameter to `true`.
|
||||
|
||||
<!-- markdownlint-disable-next-line no-space-in-code -->
|
||||
Info strings with leading/trailing whitespace (ex: `js `) or other content (ex:
|
||||
`ruby startline=3`) will trigger this rule.
|
||||
|
||||
Rationale: Specifying a language improves content rendering by using the
|
||||
correct syntax highlighting for code. More information:
|
||||
<https://cirosantilli.com/markdown-style-guide#option-code-fenced>.
|
50
doc-build/md041.md
Normal file
50
doc-build/md041.md
Normal file
|
@ -0,0 +1,50 @@
|
|||
This rule is intended to ensure documents have a title and is triggered when
|
||||
the first line in a document is not a top-level ([HTML][HTML] `h1`) heading:
|
||||
|
||||
```markdown
|
||||
This is a document without a heading
|
||||
```
|
||||
|
||||
To fix this, add a top-level heading to the beginning of the document:
|
||||
|
||||
```markdown
|
||||
# Document Heading
|
||||
|
||||
This is a document with a top-level heading
|
||||
```
|
||||
|
||||
Because it is common for projects on GitHub to use an image for the heading of
|
||||
`README.md` and that pattern is not well-supported by Markdown, HTML headings
|
||||
are also permitted by this rule. For example:
|
||||
|
||||
```markdown
|
||||
<h1 align="center"><img src="https://placekitten.com/300/150"/></h1>
|
||||
|
||||
This is a document with a top-level HTML heading
|
||||
```
|
||||
|
||||
In some cases, a document's title heading may be preceded by text like a table
|
||||
of contents. This is not ideal for accessibility, but can be allowed by setting
|
||||
the `allow_preamble` parameter to `true`.
|
||||
|
||||
```markdown
|
||||
This is a document with preamble text
|
||||
|
||||
# Document Heading
|
||||
```
|
||||
|
||||
If [YAML][YAML] front matter is present and contains a `title` property
|
||||
(commonly used with blog posts), this rule will not report a violation. To use a
|
||||
different property name in the front matter, specify the text of a [regular
|
||||
expression][RegExp] via the `front_matter_title` parameter. To disable the use
|
||||
of front matter by this rule, specify `""` for `front_matter_title`.
|
||||
|
||||
The `level` parameter can be used to change the top-level heading (ex: to `h2`)
|
||||
in cases where an `h1` is added externally.
|
||||
|
||||
Rationale: The top-level heading often acts as the title of a document. More
|
||||
information: <https://cirosantilli.com/markdown-style-guide#top-level-header>.
|
||||
|
||||
[HTML]: https://en.wikipedia.org/wiki/HTML
|
||||
[RegExp]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_expressions
|
||||
[YAML]: https://en.wikipedia.org/wiki/YAML
|
26
doc-build/md042.md
Normal file
26
doc-build/md042.md
Normal file
|
@ -0,0 +1,26 @@
|
|||
This rule is triggered when an empty link is encountered:
|
||||
|
||||
```markdown
|
||||
[an empty link]()
|
||||
```
|
||||
|
||||
To fix the violation, provide a destination for the link:
|
||||
|
||||
```markdown
|
||||
[a valid link](https://example.com/)
|
||||
```
|
||||
|
||||
Empty fragments will trigger this rule:
|
||||
|
||||
```markdown
|
||||
[an empty fragment](#)
|
||||
```
|
||||
|
||||
But non-empty fragments will not:
|
||||
|
||||
```markdown
|
||||
[a valid fragment](#fragment)
|
||||
```
|
||||
|
||||
Rationale: Empty links do not lead anywhere and therefore don't function as
|
||||
links.
|
76
doc-build/md043.md
Normal file
76
doc-build/md043.md
Normal file
|
@ -0,0 +1,76 @@
|
|||
This rule is triggered when the headings in a file do not match the array of
|
||||
headings passed to the rule. It can be used to enforce a standard heading
|
||||
structure for a set of files.
|
||||
|
||||
To require exactly the following structure:
|
||||
|
||||
```markdown
|
||||
# Heading
|
||||
## Item
|
||||
### Detail
|
||||
```
|
||||
|
||||
Set the `headings` parameter to:
|
||||
|
||||
```json
|
||||
[
|
||||
"# Heading",
|
||||
"## Item",
|
||||
"### Detail"
|
||||
]
|
||||
```
|
||||
|
||||
To allow optional headings as with the following structure:
|
||||
|
||||
```markdown
|
||||
# Heading
|
||||
## Item
|
||||
### Detail (optional)
|
||||
## Foot
|
||||
### Notes (optional)
|
||||
```
|
||||
|
||||
Use the special value `"*"` meaning "zero or more unspecified headings" or the
|
||||
special value `"+"` meaning "one or more unspecified headings" and set the
|
||||
`headings` parameter to:
|
||||
|
||||
```json
|
||||
[
|
||||
"# Heading",
|
||||
"## Item",
|
||||
"*",
|
||||
"## Foot",
|
||||
"*"
|
||||
]
|
||||
```
|
||||
|
||||
To allow a single required heading to vary as with a project name:
|
||||
|
||||
```markdown
|
||||
# Project Name
|
||||
## Description
|
||||
## Examples
|
||||
```
|
||||
|
||||
Use the special value `"?"` meaning "exactly one unspecified heading":
|
||||
|
||||
```json
|
||||
[
|
||||
"?",
|
||||
"## Description",
|
||||
"## Examples"
|
||||
]
|
||||
```
|
||||
|
||||
When an error is detected, this rule outputs the line number of the first
|
||||
problematic heading (otherwise, it outputs the last line number of the file).
|
||||
|
||||
Note that while the `headings` parameter uses the "## Text" ATX heading style
|
||||
for simplicity, a file may use any supported heading style.
|
||||
|
||||
By default, the case of headings in the document is not required to match that
|
||||
of `headings`. To require that case match exactly, set the `match_case`
|
||||
parameter to `true`.
|
||||
|
||||
Rationale: Projects may wish to enforce a consistent document structure across
|
||||
a set of similar content.
|
31
doc-build/md044.md
Normal file
31
doc-build/md044.md
Normal file
|
@ -0,0 +1,31 @@
|
|||
This rule is triggered when any of the strings in the `names` array do not have
|
||||
the specified capitalization. It can be used to enforce a standard letter case
|
||||
for the names of projects and products.
|
||||
|
||||
For example, the language "JavaScript" is usually written with both the 'J' and
|
||||
'S' capitalized - though sometimes the 's' or 'j' appear in lower-case. To
|
||||
enforce the proper capitalization, specify the desired letter case in the
|
||||
`names` array:
|
||||
|
||||
```json
|
||||
[
|
||||
"JavaScript"
|
||||
]
|
||||
```
|
||||
|
||||
Sometimes a proper name is capitalized differently in certain contexts. In such
|
||||
cases, add both forms to the `names` array:
|
||||
|
||||
```json
|
||||
[
|
||||
"GitHub",
|
||||
"github.com"
|
||||
]
|
||||
```
|
||||
|
||||
Set the `code_blocks` parameter to `false` to disable this rule for code blocks
|
||||
and spans. Set the `html_elements` parameter to `false` to disable this rule
|
||||
for HTML elements and attributes (such as when using a proper name as part of
|
||||
a path for `a`/`href` or `img`/`src`).
|
||||
|
||||
Rationale: Incorrect capitalization of proper names is usually a mistake.
|
42
doc-build/md045.md
Normal file
42
doc-build/md045.md
Normal file
|
@ -0,0 +1,42 @@
|
|||
This rule reports a violation when an image is missing alternate text (alt text)
|
||||
information.
|
||||
|
||||
Alternate text is commonly specified inline as:
|
||||
|
||||
```markdown
|
||||

|
||||
```
|
||||
|
||||
Or with reference syntax as:
|
||||
|
||||
```markdown
|
||||
![Alternate text][ref]
|
||||
|
||||
...
|
||||
|
||||
[ref]: image.jpg "Optional title"
|
||||
```
|
||||
|
||||
Or with HTML as:
|
||||
|
||||
```html
|
||||
<img src="image.jpg" alt="Alternate text" />
|
||||
```
|
||||
|
||||
Note: If the [HTML `aria-hidden` attribute][aria-hidden] is used to hide the
|
||||
image from assistive technology, this rule does not report a violation:
|
||||
|
||||
```html
|
||||
<img src="image.jpg" aria-hidden="true" />
|
||||
```
|
||||
|
||||
Guidance for writing alternate text is available from the [W3C][w3c],
|
||||
[Wikipedia][wikipedia], and [other locations][phase2technology].
|
||||
|
||||
Rationale: Alternate text is important for accessibility and describes the
|
||||
content of an image for people who may not be able to see it.
|
||||
|
||||
[aria-hidden]: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-hidden
|
||||
[phase2technology]: https://www.phase2technology.com/blog/no-more-excuses
|
||||
[w3c]: https://www.w3.org/WAI/alt/
|
||||
[wikipedia]: https://en.wikipedia.org/wiki/Alt_attribute
|
29
doc-build/md046.md
Normal file
29
doc-build/md046.md
Normal file
|
@ -0,0 +1,29 @@
|
|||
This rule is triggered when unwanted or different code block styles are used in
|
||||
the same document.
|
||||
|
||||
In the default configuration this rule reports a violation for the following
|
||||
document:
|
||||
|
||||
<!-- markdownlint-disable code-block-style -->
|
||||
|
||||
Some text.
|
||||
|
||||
# Indented code
|
||||
|
||||
More text.
|
||||
|
||||
```ruby
|
||||
# Fenced code
|
||||
```
|
||||
|
||||
More text.
|
||||
|
||||
<!-- markdownlint-restore -->
|
||||
|
||||
To fix violations of this rule, use a consistent style (either indenting or code
|
||||
fences).
|
||||
|
||||
The configured code block style can be specific (`fenced`, `indented`) or can
|
||||
require all code blocks match the first code block (`consistent`).
|
||||
|
||||
Rationale: Consistent formatting makes it easier to understand a document.
|
26
doc-build/md047.md
Normal file
26
doc-build/md047.md
Normal file
|
@ -0,0 +1,26 @@
|
|||
This rule is triggered when there is not a single newline character at the end
|
||||
of a file.
|
||||
|
||||
An example that triggers the rule:
|
||||
|
||||
```markdown
|
||||
# Heading
|
||||
|
||||
This file ends without a newline.[EOF]
|
||||
```
|
||||
|
||||
To fix the violation, add a newline character to the end of the file:
|
||||
|
||||
```markdown
|
||||
# Heading
|
||||
|
||||
This file ends with a newline.
|
||||
[EOF]
|
||||
```
|
||||
|
||||
Rationale: Some programs have trouble with files that do not end with a newline.
|
||||
|
||||
More information: [What's the point in adding a new line to the end of a
|
||||
file?][stack-exchange]
|
||||
|
||||
[stack-exchange]: https://unix.stackexchange.com/questions/18743/whats-the-point-in-adding-a-new-line-to-the-end-of-a-file
|
31
doc-build/md048.md
Normal file
31
doc-build/md048.md
Normal file
|
@ -0,0 +1,31 @@
|
|||
This rule is triggered when the symbols used in the document for fenced code
|
||||
blocks do not match the configured code fence style:
|
||||
|
||||
````markdown
|
||||
```ruby
|
||||
# Fenced code
|
||||
```
|
||||
|
||||
~~~ruby
|
||||
# Fenced code
|
||||
~~~
|
||||
````
|
||||
|
||||
To fix this issue, use the configured code fence style throughout the
|
||||
document:
|
||||
|
||||
````markdown
|
||||
```ruby
|
||||
# Fenced code
|
||||
```
|
||||
|
||||
```ruby
|
||||
# Fenced code
|
||||
```
|
||||
````
|
||||
|
||||
The configured code fence style can be a specific symbol to use (`backtick`,
|
||||
`tilde`) or it can require all code fences match the first code fence
|
||||
(`consistent`).
|
||||
|
||||
Rationale: Consistent formatting makes it easier to understand a document.
|
23
doc-build/md049.md
Normal file
23
doc-build/md049.md
Normal file
|
@ -0,0 +1,23 @@
|
|||
This rule is triggered when the symbols used in the document for emphasis do not
|
||||
match the configured emphasis style:
|
||||
|
||||
```markdown
|
||||
*Text*
|
||||
_Text_
|
||||
```
|
||||
|
||||
To fix this issue, use the configured emphasis style throughout the document:
|
||||
|
||||
```markdown
|
||||
*Text*
|
||||
*Text*
|
||||
```
|
||||
|
||||
The configured emphasis style can be a specific symbol to use (`asterisk`,
|
||||
`underscore`) or can require all emphasis matches the first emphasis
|
||||
(`consistent`).
|
||||
|
||||
Note: Emphasis within a word is restricted to `asterisk` in order to avoid
|
||||
unwanted emphasis for words containing internal underscores like_this_one.
|
||||
|
||||
Rationale: Consistent formatting makes it easier to understand a document.
|
22
doc-build/md050.md
Normal file
22
doc-build/md050.md
Normal file
|
@ -0,0 +1,22 @@
|
|||
This rule is triggered when the symbols used in the document for strong do not
|
||||
match the configured strong style:
|
||||
|
||||
```markdown
|
||||
**Text**
|
||||
__Text__
|
||||
```
|
||||
|
||||
To fix this issue, use the configured strong style throughout the document:
|
||||
|
||||
```markdown
|
||||
**Text**
|
||||
**Text**
|
||||
```
|
||||
|
||||
The configured strong style can be a specific symbol to use (`asterisk`,
|
||||
`underscore`) or can require all strong matches the first strong (`consistent`).
|
||||
|
||||
Note: Emphasis within a word is restricted to `asterisk` in order to avoid
|
||||
unwanted emphasis for words containing internal underscores like__this__one.
|
||||
|
||||
Rationale: Consistent formatting makes it easier to understand a document.
|
98
doc-build/md051.md
Normal file
98
doc-build/md051.md
Normal file
|
@ -0,0 +1,98 @@
|
|||
This rule is triggered when a link fragment does not match any of the fragments
|
||||
that are automatically generated for headings in a document:
|
||||
|
||||
```markdown
|
||||
# Heading Name
|
||||
|
||||
[Link](#fragment)
|
||||
```
|
||||
|
||||
To fix this issue, change the link fragment to reference an existing heading's
|
||||
generated name (see below):
|
||||
|
||||
```markdown
|
||||
# Heading Name
|
||||
|
||||
[Link](#heading-name)
|
||||
```
|
||||
|
||||
For consistency, this rule requires fragments to exactly match the [GitHub
|
||||
heading algorithm][github-heading-algorithm] which converts letters to
|
||||
lowercase. Therefore, the following example is reported as a violation:
|
||||
|
||||
```markdown
|
||||
# Heading Name
|
||||
|
||||
[Link](#Heading-Name)
|
||||
```
|
||||
|
||||
To ignore case when comparing fragments with heading names, the `ignore_case`
|
||||
parameter can be set to `true`. In this configuration, the previous example is
|
||||
not reported as a violation.
|
||||
|
||||
Alternatively, some platforms allow the syntax `{#named-anchor}` to be used
|
||||
within a heading to provide a specific name (consisting of only lower-case
|
||||
letters, numbers, `-`, and `_`):
|
||||
|
||||
```markdown
|
||||
# Heading Name {#custom-name}
|
||||
|
||||
[Link](#custom-name)
|
||||
```
|
||||
|
||||
Alternatively, any HTML tag with an `id` attribute or an `a` tag with a `name`
|
||||
attribute can be used to define a fragment:
|
||||
|
||||
```markdown
|
||||
<a id="bookmark"></a>
|
||||
|
||||
[Link](#bookmark)
|
||||
```
|
||||
|
||||
An `a` tag can be useful in scenarios where a heading is not appropriate or for
|
||||
control over the text of the fragment identifier.
|
||||
|
||||
[HTML links to `#top` scroll to the top of a document][html-top-fragment]. This
|
||||
rule allows that syntax (using lower-case for consistency):
|
||||
|
||||
```markdown
|
||||
[Link](#top)
|
||||
```
|
||||
|
||||
This rule also recognizes the custom fragment syntax used by GitHub to highlight
|
||||
[specific content in a document][github-linking-to-content].
|
||||
|
||||
For example, this link to line 20:
|
||||
|
||||
```markdown
|
||||
[Link](#L20)
|
||||
```
|
||||
|
||||
And this link to content starting within line 19 running into line 21:
|
||||
|
||||
```markdown
|
||||
[Link](#L19C5-L21C11)
|
||||
```
|
||||
|
||||
Some Markdown generators dynamically create and insert headings when building
|
||||
documents, for example by combining a fixed prefix like `figure-` and an
|
||||
incrementing numeric counter. To ignore such generated fragments, set the
|
||||
`ignored_pattern` [regular expression][RegEx] parameter to a pattern that
|
||||
matches (e.g., `^figure-`).
|
||||
|
||||
Rationale: [GitHub section links][github-section-links] are created
|
||||
automatically for every heading when Markdown content is displayed on GitHub.
|
||||
This makes it easy to link directly to different sections within a document.
|
||||
However, section links change if headings are renamed or removed. This rule
|
||||
helps identify broken section links within a document.
|
||||
|
||||
Section links are **not** part of the CommonMark specification. This rule
|
||||
enforces the [GitHub heading algorithm][github-heading-algorithm] which is:
|
||||
convert heading to lowercase, remove punctuation, convert spaces to dashes,
|
||||
append an incrementing integer as needed for uniqueness.
|
||||
|
||||
[github-section-links]: https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#section-links
|
||||
[github-heading-algorithm]: https://github.com/gjtorikian/html-pipeline/blob/f13a1534cb650ba17af400d1acd3a22c28004c09/lib/html/pipeline/toc_filter.rb
|
||||
[github-linking-to-content]: https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/creating-a-permanent-link-to-a-code-snippet#linking-to-markdown#linking-to-markdown
|
||||
[html-top-fragment]: https://html.spec.whatwg.org/multipage/browsing-the-web.html#scrolling-to-a-fragment
|
||||
[RegEx]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_expressions
|
41
doc-build/md052.md
Normal file
41
doc-build/md052.md
Normal file
|
@ -0,0 +1,41 @@
|
|||
Links and images in Markdown can provide the link destination or image source
|
||||
at the time of use or can define it elsewhere and use a label for reference.
|
||||
The reference format is convenient for keeping paragraph text clutter-free
|
||||
and makes it easy to reuse the same URL in multiple places.
|
||||
|
||||
There are three kinds of reference links and images:
|
||||
|
||||
```markdown
|
||||
Full: [text][label]
|
||||
Collapsed: [label][]
|
||||
Shortcut: [label]
|
||||
|
||||
Full: ![text][image]
|
||||
Collapsed: ![image][]
|
||||
Shortcut: ![image]
|
||||
|
||||
[label]: https://example.com/label
|
||||
[image]: https://example.com/image
|
||||
```
|
||||
|
||||
A link or image renders correctly when the corresponding label is defined, but
|
||||
displays as text with brackets when the label is not present. By default, this
|
||||
rule warns of undefined labels for "full" and "collapsed" reference syntax but
|
||||
not for "shortcut" syntax because it is ambiguous.
|
||||
|
||||
The text `[example]` could be a shortcut link or the text "example" in brackets,
|
||||
so "shortcut" syntax is ignored by default. To include "shortcut" syntax, set
|
||||
the `include_shortcut` parameter to `true`. Note that doing so produces warnings
|
||||
for *all* text in the document that *could* be a shortcut. If bracketed text is
|
||||
intentional, brackets can be escaped with the `\` character: `\[example\]`.
|
||||
|
||||
If there are link labels that are deliberately unreferenced, they can be ignored
|
||||
by setting the `ignored_labels` parameter to the list of strings to ignore. The
|
||||
default value of this parameter ignores the checkbox syntax used by
|
||||
[GitHub Flavored Markdown task list items][gfm-tasklist]:
|
||||
|
||||
```markdown
|
||||
- [x] Checked task list item
|
||||
```
|
||||
|
||||
[gfm-tasklist]: https://github.github.com/gfm/#task-list-items-extension-
|
26
doc-build/md053.md
Normal file
26
doc-build/md053.md
Normal file
|
@ -0,0 +1,26 @@
|
|||
Links and images in Markdown can provide the link destination or image source
|
||||
at the time of use or can use a label to reference a definition elsewhere in
|
||||
the document. The latter reference format is convenient for keeping paragraph
|
||||
text clutter-free and makes it easy to reuse the same URL in multiple places.
|
||||
|
||||
Because link and image reference definitions are located separately from
|
||||
where they are used, there are two scenarios where a definition can be
|
||||
unnecessary:
|
||||
|
||||
1. If a label is not referenced by any link or image in a document, that
|
||||
definition is unused and can be deleted.
|
||||
2. If a label is defined multiple times in a document, the first definition is
|
||||
used and the others can be deleted.
|
||||
|
||||
This rule considers a reference definition to be used if any link or image
|
||||
reference has the corresponding label. The "full", "collapsed", and "shortcut"
|
||||
formats are all supported.
|
||||
|
||||
If there are reference definitions that are deliberately unreferenced, they can
|
||||
be ignored by setting the `ignored_definitions` parameter to the list of strings
|
||||
to ignore. The default value of this parameter ignores the following convention
|
||||
for adding non-HTML comments to Markdown:
|
||||
|
||||
```markdown
|
||||
[//]: # (This behaves like a comment)
|
||||
```
|
81
doc-build/md054.md
Normal file
81
doc-build/md054.md
Normal file
|
@ -0,0 +1,81 @@
|
|||
Links and images in Markdown can provide the link destination or image source at
|
||||
the time of use or can use a label to reference a definition elsewhere in the
|
||||
document. The three reference formats are convenient for keeping paragraph text
|
||||
clutter-free and make it easy to reuse the same URL in multiple places.
|
||||
|
||||
By default, this rule allows all link/image styles.
|
||||
|
||||
Setting the `autolink` parameter to `false` disables autolinks:
|
||||
|
||||
```markdown
|
||||
<https://example.com>
|
||||
```
|
||||
|
||||
Setting the `inline` parameter to `false` disables inline links and images:
|
||||
|
||||
```markdown
|
||||
[link](https://example.com)
|
||||
|
||||

|
||||
```
|
||||
|
||||
Setting the `full` parameter to `false` disables full reference links and
|
||||
images:
|
||||
|
||||
```markdown
|
||||
[link][url]
|
||||
|
||||
![image][url]
|
||||
|
||||
[url]: https://example.com
|
||||
```
|
||||
|
||||
Setting the `collapsed` parameter to `false` disables collapsed reference links
|
||||
and images:
|
||||
|
||||
```markdown
|
||||
[url][]
|
||||
|
||||
![url][]
|
||||
|
||||
[url]: https://example.com
|
||||
```
|
||||
|
||||
Setting the `shortcut` parameter to `false` disables shortcut reference links
|
||||
and images:
|
||||
|
||||
```markdown
|
||||
[url]
|
||||
|
||||
![url]
|
||||
|
||||
[url]: https://example.com
|
||||
```
|
||||
|
||||
To fix violations of this rule, change the link or image to use an allowed
|
||||
style. This rule can automatically fix violations when a link or image can be
|
||||
converted to the `inline` style (preferred) or a link can be converted to the
|
||||
`autolink` style (which does not support images and must be an absolute URL).
|
||||
This rule does *not* fix scenarios that require converting a link or image to
|
||||
the `full`, `collapsed`, or `shortcut` reference styles because that involves
|
||||
naming the reference and determining where to insert it in the document.
|
||||
|
||||
Setting the `url_inline` parameter to `false` prevents the use of inline links
|
||||
with the same absolute URL text/destination and no title because such links can
|
||||
be converted to autolinks:
|
||||
|
||||
```markdown
|
||||
[https://example.com](https://example.com)
|
||||
```
|
||||
|
||||
To fix `url_inline` violations, use the simpler autolink syntax instead:
|
||||
|
||||
```markdown
|
||||
<https://example.com>
|
||||
```
|
||||
|
||||
Rationale: Consistent formatting makes it easier to understand a document.
|
||||
Autolinks are concise, but appear as URLs which can be long and confusing.
|
||||
Inline links and images can include descriptive text, but take up more space in
|
||||
Markdown form. Reference links and images can be easier to read and manipulate
|
||||
in Markdown form, but require a separate link reference definition.
|
43
doc-build/md055.md
Normal file
43
doc-build/md055.md
Normal file
|
@ -0,0 +1,43 @@
|
|||
This rule is triggered when a [GitHub Flavored Markdown table][gfm-table-055]
|
||||
is inconsistent about its use of leading and trailing pipe characters (`|`).
|
||||
|
||||
By default (`consistent` style), the header row of the first table in a document
|
||||
is used to determine the style that is enforced for every table in the document.
|
||||
A specific style can be used instead (`leading_and_trailing`, `leading_only`,
|
||||
`no_leading_or_trailing`, `trailing_only`).
|
||||
|
||||
This table's header row has leading and trailing pipes, but its delimiter row is
|
||||
missing the trailing pipe and its first row of cells is missing the leading
|
||||
pipe:
|
||||
|
||||
```markdown
|
||||
| Header | Header |
|
||||
| ------ | ------
|
||||
Cell | Cell |
|
||||
```
|
||||
|
||||
To fix these issues, make sure there is a pipe character at the beginning and
|
||||
end of every row:
|
||||
|
||||
```markdown
|
||||
| Header | Header |
|
||||
| ------ | ------ |
|
||||
| Cell | Cell |
|
||||
```
|
||||
|
||||
Note that text immediately following a table (i.e., not separated by an empty
|
||||
line) is treated as part of the table (per the specification) and may also
|
||||
trigger this rule:
|
||||
|
||||
```markdown
|
||||
| Header | Header |
|
||||
| ------ | ------ |
|
||||
| Cell | Cell |
|
||||
This text is part of the table
|
||||
```
|
||||
|
||||
Rationale: Some parsers have difficulty with tables that are missing their
|
||||
leading or trailing pipe characters. The use of leading/trailing pipes can also
|
||||
help provide visual clarity.
|
||||
|
||||
[gfm-table-055]: https://github.github.com/gfm/#tables-extension-
|
31
doc-build/md056.md
Normal file
31
doc-build/md056.md
Normal file
|
@ -0,0 +1,31 @@
|
|||
This rule is triggered when a [GitHub Flavored Markdown table][gfm-table-056]
|
||||
does not have the same number of cells in every row.
|
||||
|
||||
This table's second data row has too few cells and its third data row has too
|
||||
many cells:
|
||||
|
||||
```markdown
|
||||
| Header | Header |
|
||||
| ------ | ------ |
|
||||
| Cell | Cell |
|
||||
| Cell |
|
||||
| Cell | Cell | Cell |
|
||||
```
|
||||
|
||||
To fix these issues, ensure every row has the same number of cells:
|
||||
|
||||
```markdown
|
||||
| Header | Header |
|
||||
| ------ | ------ |
|
||||
| Cell | Cell |
|
||||
| Cell | Cell |
|
||||
| Cell | Cell |
|
||||
```
|
||||
|
||||
Note that a table's header row and its delimiter row must have the same number
|
||||
of cells or it will not be recognized as a table (per specification).
|
||||
|
||||
Rationale: Extra cells in a row are usually not shown, so their data is lost.
|
||||
Missing cells in a row create holes in the table and suggest an omission.
|
||||
|
||||
[gfm-table-056]: https://github.github.com/gfm/#tables-extension-
|
40
doc-build/md058.md
Normal file
40
doc-build/md058.md
Normal file
|
@ -0,0 +1,40 @@
|
|||
This rule is triggered when tables are either not preceded or not followed by a
|
||||
blank line:
|
||||
|
||||
```markdown
|
||||
Some text
|
||||
| Header | Header |
|
||||
| ------ | ------ |
|
||||
| Cell | Cell |
|
||||
> Blockquote
|
||||
```
|
||||
|
||||
To fix violations of this rule, ensure that all tables have a blank line both
|
||||
before and after (except when the table is at the very beginning or end of the
|
||||
document):
|
||||
|
||||
```markdown
|
||||
Some text
|
||||
|
||||
| Header | Header |
|
||||
| ------ | ------ |
|
||||
| Cell | Cell |
|
||||
|
||||
> Blockquote
|
||||
```
|
||||
|
||||
Note that text immediately following a table (i.e., not separated by an empty
|
||||
line) is treated as part of the table (per the specification) and will not
|
||||
trigger this rule:
|
||||
|
||||
```markdown
|
||||
| Header | Header |
|
||||
| ------ | ------ |
|
||||
| Cell | Cell |
|
||||
This text is part of the table and the next line is blank
|
||||
|
||||
Some text
|
||||
```
|
||||
|
||||
Rationale: In addition to aesthetic reasons, some parsers will incorrectly parse
|
||||
tables that don't have blank lines before and after them.
|
19
doc-build/md059.md
Normal file
19
doc-build/md059.md
Normal file
|
@ -0,0 +1,19 @@
|
|||
This rule is triggered when a link has generic text like `[click here](...)` or
|
||||
`[link](...)`.
|
||||
|
||||
Link text should be descriptive and communicate the purpose of the link (e.g.,
|
||||
`[Download the budget document](...)` or `[CommonMark Specification](...)`).
|
||||
This is especially important for screen readers which sometimes present links
|
||||
without context.
|
||||
|
||||
By default, this rule prohibits a small number of common English words/phrases.
|
||||
To customize that list of words/phrases, set the `prohibited_texts` parameter to
|
||||
an `Array` of `string`s.
|
||||
|
||||
Note: For languages other than English, use the `prohibited_texts` parameter to
|
||||
customize the list for that language. It is *not* a goal for this rule to have
|
||||
translations for every language.
|
||||
|
||||
Note: This rule checks Markdown links; HTML links are ignored.
|
||||
|
||||
More information: <https://webaim.org/techniques/hypertext/>
|
|
@ -1,315 +1,194 @@
|
|||
# Custom Rules
|
||||
|
||||
In addition to its built-in rules, `markdownlint` lets you enhance the linting experience by passing a list of custom rules using the
|
||||
[`options.customRules` property](../README.md#optionscustomrules).
|
||||
Custom rules can do everything the built-in rules can and are defined inline or imported from another package
|
||||
([keyword `markdownlint-rule` on npm](https://www.npmjs.com/search?q=keywords:markdownlint-rule)).
|
||||
Custom rules can be disabled, enabled, and customized using the same syntax as built-in rules.
|
||||
In addition to its built-in rules, `markdownlint` lets you enhance the linting
|
||||
experience by passing an array of custom rules using the [`options.customRules`
|
||||
property][options-custom-rules]. Custom rules can do everything the built-in
|
||||
rules can and are defined inline or imported from another package ([keyword
|
||||
`markdownlint-rule` on npm][markdownlint-rule]). When defined by a file or
|
||||
package, the export can be a single rule object (see below) or an array of them.
|
||||
Custom rules can be disabled, enabled, and customized using the same syntax as
|
||||
built-in rules.
|
||||
|
||||
## Implementing Simple Rules
|
||||
|
||||
For simple requirements like disallowing certain characters or patterns,
|
||||
the community-developed
|
||||
[markdownlint-rule-search-replace][markdownlint-rule-search-replace]
|
||||
plug-in can be used. This plug-in allows anyone to create a set of simple
|
||||
text-replacement rules without needing to write code.
|
||||
|
||||
[markdownlint-rule-search-replace]: https://www.npmjs.com/package/markdownlint-rule-search-replace
|
||||
|
||||
## Authoring
|
||||
|
||||
Rules are defined by a name (or multiple names), a description, an optional link to more information, one or more tags, and a function that implements
|
||||
the rule's behavior.
|
||||
That function is called once for each file/string input and is passed the parsed input and a function to log any violations.
|
||||
Rules are defined by a name (or multiple names), a description, an optional link
|
||||
to more information, one or more tags, and a function that implements the rule's
|
||||
behavior. That function is called once for each file/string input and is passed
|
||||
the parsed input and a function to log any violations.
|
||||
|
||||
A simple rule implementation looks like:
|
||||
Custom rules can (should) operate on a structured set of tokens based on the
|
||||
[`micromark`][micromark] `parser` (this is preferred). Alternatively, custom
|
||||
rules can operate on a structured set of tokens based on the
|
||||
[`markdown-it`][markdown-it] `parser` (legacy support). Finally, custom rules
|
||||
can operate directly on text with the `none` `parser`.
|
||||
|
||||
```js
|
||||
A simple rule implementation using the `micromark` parser to report a violation
|
||||
for any use of blockquotes might look like:
|
||||
|
||||
```javascript
|
||||
/** @type {import("markdownlint").Rule} */
|
||||
module.exports = {
|
||||
"names": [ "any-blockquote" ],
|
||||
"names": [ "any-blockquote-micromark" ],
|
||||
"description": "Rule that reports an error for any blockquote",
|
||||
"information": new URL("https://example.com/rules/any-blockquote"),
|
||||
"tags": [ "test" ],
|
||||
"function": function rule(params, onError) {
|
||||
params.tokens.filter(function filterToken(token) {
|
||||
return token.type === "blockquote_open";
|
||||
}).forEach(function forToken(blockquote) {
|
||||
var lines = blockquote.map[1] - blockquote.map[0];
|
||||
"parser": "micromark",
|
||||
"function": (params, onError) => {
|
||||
const blockquotes = params.parsers.micromark.tokens
|
||||
.filter((token) => token.type === "blockQuote");
|
||||
for (const blockquote of blockquotes) {
|
||||
const lines = blockquote.endLine - blockquote.startLine + 1;
|
||||
onError({
|
||||
"lineNumber": blockquote.lineNumber,
|
||||
"lineNumber": blockquote.startLine,
|
||||
"detail": "Blockquote spans " + lines + " line(s).",
|
||||
"context": blockquote.line.substr(0, 7)
|
||||
});
|
||||
"context": params.lines[blockquote.startLine - 1]
|
||||
});
|
||||
}
|
||||
};
|
||||
```
|
||||
|
||||
A rule is implemented as an `Object` with one optional and four required properties:
|
||||
|
||||
- `names` is a required `Array` of `String` values that identify the rule in output messages and config.
|
||||
- `description` is a required `String` value that describes the rule in output messages.
|
||||
- `information` is an optional (absolute) `URL` of a link to more information about the rule.
|
||||
- `tags` is a required `Array` of `String` values that groups related rules for easier customization.
|
||||
- `function` is a required synchronous `Function` that implements the rule and is passed two parameters:
|
||||
- `params` is an `Object` with properties that describe the content being analyzed:
|
||||
- `name` is a `String` that identifies the input file/string.
|
||||
- `tokens` is an `Array` of [`markdown-it` `Token` objects](https://markdown-it.github.io/markdown-it/#Token)
|
||||
with added `line` and `lineNumber` properties.
|
||||
- `lines` is an `Array` of `String` values corresponding to the lines of the input file/string.
|
||||
- `frontMatterLines` is an `Array` of `String` values corresponding to any front matter (not present in `lines`).
|
||||
- `config` is an `Object` corresponding to the rule's entry in `options.config` (if present).
|
||||
- `onError` is a function that takes a single `Object` parameter with one required and four optional properties:
|
||||
- `lineNumber` is a required `Number` specifying the 1-based line number of the error.
|
||||
- `details` is an optional `String` with information about what caused the error.
|
||||
- `context` is an optional `String` with relevant text surrounding the error location.
|
||||
- `range` is an optional `Array` with two `Number` values identifying the 1-based column and length of the error.
|
||||
- `fixInfo` is an optional `Object` with information about how to fix the error (all properties are optional, but
|
||||
at least one of `deleteCount` and `insertText` should be present; when applying a fix, the delete should be
|
||||
performed before the insert):
|
||||
- `lineNumber` is an optional `Number` specifying the 1-based line number of the edit.
|
||||
- `editColumn` is an optional `Number` specifying the 1-based column number of the edit.
|
||||
- `deleteCount` is an optional `Number` specifying the number of characters to delete (the value `-1` is used to delete the line).
|
||||
- `insertText` is an optional `String` specifying the text to insert. `\n` is the platform-independent way to add
|
||||
a line break; line breaks should be added at the beginning of a line instead of at the end).
|
||||
|
||||
The collection of helper functions shared by the built-in rules is available for use by custom rules in the
|
||||
[markdownlint-rule-helpers package](https://www.npmjs.com/package/markdownlint-rule-helpers).
|
||||
|
||||
## Examples
|
||||
|
||||
- [Simple rules used by the project's test cases](../test/rules)
|
||||
- [Code for all `markdownlint` built-in rules](../lib)
|
||||
- [Package configuration for publishing to npm](../test/rules/npm)
|
||||
- Packages should export a single rule object or an `Array` of rule objects
|
||||
- [Custom rules from the Microsoft/vscode-docs-authoring repository](https://github.com/microsoft/vscode-docs-authoring/tree/master/packages/docs-linting/markdownlint-custom-rules)
|
||||
- [Custom rules from the axibase/docs-util repository](https://github.com/axibase/docs-util/tree/master/linting-rules)
|
||||
- [Custom rules from the webhintio/hint repository](https://github.com/webhintio/hint/blob/master/scripts/lint-markdown.js)
|
||||
|
||||
## References
|
||||
|
||||
- [CommonMark documentation and specification](https://commonmark.org/)
|
||||
- [`markdown-it` Markdown parser project page](https://github.com/markdown-it/markdown-it)
|
||||
|
||||
## Params
|
||||
|
||||
The Markdown document:
|
||||
|
||||
```markdown
|
||||
# Title
|
||||
|
||||
Text *text* text.
|
||||
```
|
||||
|
||||
Yields the `params` object:
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "doc/example.md",
|
||||
"tokens": [
|
||||
{
|
||||
"type": "heading_open",
|
||||
"tag": "h1",
|
||||
"attrs": null,
|
||||
"map": [ 0, 1 ],
|
||||
"nesting": 1,
|
||||
"level": 0,
|
||||
"children": null,
|
||||
"content": "",
|
||||
"markup": "#",
|
||||
"info": "",
|
||||
"meta": null,
|
||||
"block": true,
|
||||
"hidden": false,
|
||||
"line": "# Title",
|
||||
"lineNumber": 1
|
||||
},
|
||||
{
|
||||
"type": "inline",
|
||||
"tag": "",
|
||||
"attrs": null,
|
||||
"map": [ 0, 1 ],
|
||||
"nesting": 0,
|
||||
"level": 1,
|
||||
"children": [
|
||||
{
|
||||
"type": "text",
|
||||
"tag": "",
|
||||
"attrs": null,
|
||||
"map": null,
|
||||
"nesting": 0,
|
||||
"level": 0,
|
||||
"children": null,
|
||||
"content": "Title",
|
||||
"markup": "",
|
||||
"info": "",
|
||||
"meta": null,
|
||||
"block": false,
|
||||
"hidden": false,
|
||||
"lineNumber": 1,
|
||||
"line": "# Title"
|
||||
}
|
||||
],
|
||||
"content": "Title",
|
||||
"markup": "",
|
||||
"info": "",
|
||||
"meta": null,
|
||||
"block": true,
|
||||
"hidden": false,
|
||||
"line": "# Title",
|
||||
"lineNumber": 1
|
||||
},
|
||||
{
|
||||
"type": "heading_close",
|
||||
"tag": "h1",
|
||||
"attrs": null,
|
||||
"map": null,
|
||||
"nesting": -1,
|
||||
"level": 0,
|
||||
"children": null,
|
||||
"content": "",
|
||||
"markup": "#",
|
||||
"info": "",
|
||||
"meta": null,
|
||||
"block": true,
|
||||
"hidden": false
|
||||
},
|
||||
{
|
||||
"type": "paragraph_open",
|
||||
"tag": "p",
|
||||
"attrs": null,
|
||||
"map": [ 2, 3 ],
|
||||
"nesting": 1,
|
||||
"level": 0,
|
||||
"children": null,
|
||||
"content": "",
|
||||
"markup": "",
|
||||
"info": "",
|
||||
"meta": null,
|
||||
"block": true,
|
||||
"hidden": false,
|
||||
"line": "Text *text* text.",
|
||||
"lineNumber": 3
|
||||
},
|
||||
{
|
||||
"type": "inline",
|
||||
"tag": "",
|
||||
"attrs": null,
|
||||
"map": [ 2, 3 ],
|
||||
"nesting": 0,
|
||||
"level": 1,
|
||||
"children": [
|
||||
{
|
||||
"type": "text",
|
||||
"tag": "",
|
||||
"attrs": null,
|
||||
"map": null,
|
||||
"nesting": 0,
|
||||
"level": 0,
|
||||
"children": null,
|
||||
"content": "Text ",
|
||||
"markup": "",
|
||||
"info": "",
|
||||
"meta": null,
|
||||
"block": false,
|
||||
"hidden": false,
|
||||
"lineNumber": 3,
|
||||
"line": "Text *text* text."
|
||||
},
|
||||
{
|
||||
"type": "em_open",
|
||||
"tag": "em",
|
||||
"attrs": null,
|
||||
"map": null,
|
||||
"nesting": 1,
|
||||
"level": 1,
|
||||
"children": null,
|
||||
"content": "",
|
||||
"markup": "*",
|
||||
"info": "",
|
||||
"meta": null,
|
||||
"block": false,
|
||||
"hidden": false,
|
||||
"lineNumber": 3,
|
||||
"line": "Text *text* text."
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"tag": "",
|
||||
"attrs": null,
|
||||
"map": null,
|
||||
"nesting": 0,
|
||||
"level": 1,
|
||||
"children": null,
|
||||
"content": "text",
|
||||
"markup": "",
|
||||
"info": "",
|
||||
"meta": null,
|
||||
"block": false,
|
||||
"hidden": false,
|
||||
"lineNumber": 3,
|
||||
"line": "Text *text* text."
|
||||
},
|
||||
{
|
||||
"type": "em_close",
|
||||
"tag": "em",
|
||||
"attrs": null,
|
||||
"map": null,
|
||||
"nesting": -1,
|
||||
"level": 0,
|
||||
"children": null,
|
||||
"content": "",
|
||||
"markup": "*",
|
||||
"info": "",
|
||||
"meta": null,
|
||||
"block": false,
|
||||
"hidden": false,
|
||||
"lineNumber": 3,
|
||||
"line": "Text *text* text."
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"tag": "",
|
||||
"attrs": null,
|
||||
"map": null,
|
||||
"nesting": 0,
|
||||
"level": 0,
|
||||
"children": null,
|
||||
"content": " text.",
|
||||
"markup": "",
|
||||
"info": "",
|
||||
"meta": null,
|
||||
"block": false,
|
||||
"hidden": false,
|
||||
"lineNumber": 3,
|
||||
"line": "Text *text* text."
|
||||
}
|
||||
],
|
||||
"content": "Text *text* text.",
|
||||
"markup": "",
|
||||
"info": "",
|
||||
"meta": null,
|
||||
"block": true,
|
||||
"hidden": false,
|
||||
"line": "Text *text* text.",
|
||||
"lineNumber": 3
|
||||
},
|
||||
{
|
||||
"type": "paragraph_close",
|
||||
"tag": "p",
|
||||
"attrs": null,
|
||||
"map": null,
|
||||
"nesting": -1,
|
||||
"level": 0,
|
||||
"children": null,
|
||||
"content": "",
|
||||
"markup": "",
|
||||
"info": "",
|
||||
"meta": null,
|
||||
"block": true,
|
||||
"hidden": false
|
||||
}
|
||||
],
|
||||
"lines": [
|
||||
"# Title",
|
||||
"",
|
||||
"Text *text* text.",
|
||||
""
|
||||
],
|
||||
"frontMatterLines": [],
|
||||
"config": {
|
||||
"customValue1": "abc",
|
||||
"customValue2": 123
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
That same rule implemented using the `markdown-it` parser might look like:
|
||||
|
||||
```javascript
|
||||
/** @type {import("markdownlint").Rule} */
|
||||
module.exports = {
|
||||
"names": [ "any-blockquote-markdown-it" ],
|
||||
"description": "Rule that reports an error for any blockquote",
|
||||
"information": new URL("https://example.com/rules/any-blockquote"),
|
||||
"tags": [ "test" ],
|
||||
"parser": "markdownit",
|
||||
"function": (params, onError) => {
|
||||
const blockquotes = params.parsers.markdownit.tokens
|
||||
.filter((token) => token.type === "blockquote_open");
|
||||
for (const blockquote of blockquotes) {
|
||||
const [ startIndex, endIndex ] = blockquote.map;
|
||||
const lines = endIndex - startIndex;
|
||||
onError({
|
||||
"lineNumber": blockquote.lineNumber,
|
||||
"detail": "Blockquote spans " + lines + " line(s).",
|
||||
"context": blockquote.line
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
A rule is implemented as an `Object`:
|
||||
|
||||
- `names` is a required `Array` of `String` values that identify the rule in
|
||||
output messages and config.
|
||||
- `description` is a required `String` value that describes the rule in output
|
||||
messages.
|
||||
- `information` is an optional (absolute) `URL` of a link to more information
|
||||
about the rule.
|
||||
- `tags` is a required `Array` of `String` values that groups related rules for
|
||||
easier customization.
|
||||
- `parser` is a required `String` value `"markdownit" | "micromark" | "none"`
|
||||
that specifies the parser data used via `params.parsers` (see below).
|
||||
- `asynchronous` is an optional `Boolean` value that indicates whether the rule
|
||||
returns a `Promise` and runs asynchronously.
|
||||
- `function` is a required `Function` that implements the rule and is passed two
|
||||
parameters:
|
||||
- `params` is an `Object` with properties that describe the content being
|
||||
analyzed:
|
||||
- `name` is a `String` that identifies the input file/string.
|
||||
- `parsers` is an `Object` with properties corresponding to the value of
|
||||
`parser` in the rule definition (see above).
|
||||
- `markdownit` is an `Object` that provides access to output from the
|
||||
[`markdown-it`][markdown-it] parser.
|
||||
- `tokens` is an `Array` of [`markdown-it` `Token`s][markdown-it-token]
|
||||
with added `line` and `lineNumber` properties. (This property was
|
||||
previously on the `params` object.)
|
||||
- `micromark` is an `Object` that provides access to output from the
|
||||
[`micromark`][micromark] parser.
|
||||
- `tokens` is an `Array` of [`MicromarkToken`][micromark-token] objects.
|
||||
- Samples for both `tokens` are available via [test snapshots][tokens].
|
||||
- `lines` is an `Array` of `String` values corresponding to the lines of the
|
||||
input file/string.
|
||||
- `frontMatterLines` is an `Array` of `String` values corresponding to any
|
||||
front matter (not present in `lines`).
|
||||
- `config` is an `Object` corresponding to the rule's entry in
|
||||
`options.config` (if present).
|
||||
- `version` is a `String` that corresponds to the version of `markdownlint`
|
||||
- `onError` is a function that takes a single `Object` parameter with one
|
||||
required and four optional properties:
|
||||
- `lineNumber` is a required `Number` specifying the 1-based line number of
|
||||
the error.
|
||||
- `detail` is an optional `String` with information about what caused the
|
||||
error.
|
||||
- `context` is an optional `String` with relevant text surrounding the error
|
||||
location.
|
||||
- `information` is an optional (absolute) `URL` of a link to override the
|
||||
same-named value provided by the rule definition. (Uncommon)
|
||||
- `range` is an optional `Array` with two `Number` values identifying the
|
||||
1-based column and length of the error.
|
||||
- `fixInfo` is an optional `Object` with information about how to fix the
|
||||
error (all properties are optional, but at least one of `deleteCount` and
|
||||
`insertText` should be present; when applying a fix, the delete should be
|
||||
performed before the insert):
|
||||
- `lineNumber` is an optional `Number` specifying the 1-based line number
|
||||
of the edit.
|
||||
- `editColumn` is an optional `Number` specifying the 1-based column
|
||||
number of the edit.
|
||||
- `deleteCount` is an optional `Number` specifying the number of
|
||||
characters to delete (the value `-1` is used to delete the line).
|
||||
- `insertText` is an optional `String` specifying the text to insert. `\n`
|
||||
is the platform-independent way to add a line break; line breaks should
|
||||
be added at the beginning of a line instead of at the end.
|
||||
|
||||
The collection of helper functions shared by the built-in rules is available for
|
||||
use by custom rules in the [markdownlint-rule-helpers package][rule-helpers].
|
||||
|
||||
### Asynchronous Rules
|
||||
|
||||
If a rule needs to perform asynchronous operations (such as fetching a network
|
||||
resource), it can specify the value `true` for its `asynchronous` property.
|
||||
Asynchronous rules should return a `Promise` from their `function`
|
||||
implementation that is resolved when the rule completes. (The value passed to
|
||||
`resolve(...)` is ignored.) Linting violations from asynchronous rules are
|
||||
reported via the `onError` function just like for synchronous rules.
|
||||
|
||||
**Note**: Asynchronous rules cannot be referenced in a synchronous calling
|
||||
context (i.e., `import { lint } from "markdownlint/sync"`). Attempting to do so
|
||||
throws an exception.
|
||||
|
||||
## Examples
|
||||
|
||||
- [Simple rules used by the project's test cases][test-rules]
|
||||
- [Code for all `markdownlint` built-in rules][lib]
|
||||
- [Complete example rule including npm configuration][extended-ascii]
|
||||
- [Custom rules from the github/docs repository][github-docs]
|
||||
- [Custom rules from the electron/lint-roller repository][electron]
|
||||
- [Custom rules from the webhintio/hint repository][hint]
|
||||
|
||||
## References
|
||||
|
||||
- [CommonMark documentation and specification][commonmark]
|
||||
- [`markdown-it` Markdown parser project page][markdown-it]
|
||||
|
||||
[commonmark]: https://commonmark.org/
|
||||
[electron]: https://github.com/electron/lint-roller/tree/main/markdownlint-rules
|
||||
[extended-ascii]: https://github.com/DavidAnson/markdownlint-rule-extended-ascii
|
||||
[github-docs]: https://github.com/github/docs/tree/main/src/content-linter/lib/linting-rules
|
||||
[hint]: https://github.com/webhintio/hint/blob/main/scripts/lint-markdown.js
|
||||
[lib]: ../lib
|
||||
[markdown-it]: https://github.com/markdown-it/markdown-it
|
||||
[markdown-it-token]: https://markdown-it.github.io/markdown-it/#Token
|
||||
[markdownlint-rule]: https://www.npmjs.com/search?q=keywords:markdownlint-rule
|
||||
[micromark]: https://github.com/micromark/micromark
|
||||
[micromark-token]: ../lib/markdownlint.d.mts
|
||||
[rule-helpers]: https://www.npmjs.com/package/markdownlint-rule-helpers
|
||||
[options-custom-rules]: ../README.md#optionscustomrules
|
||||
[test-rules]: ../test/rules
|
||||
[tokens]: ../test/snapshots/markdownlint-test-custom-rules.mjs.md
|
||||
|
|
27
doc/Prettier.md
Normal file
27
doc/Prettier.md
Normal file
|
@ -0,0 +1,27 @@
|
|||
# Using `markdownlint` with Prettier
|
||||
|
||||
[`Prettier`](https://prettier.io) is a popular code formatter.
|
||||
For the most part, Prettier works seamlessly with `markdownlint`.
|
||||
|
||||
You can `extend` the [`prettier.json`](../style/prettier.json) style to disable
|
||||
all `markdownlint` rules that overlap with Prettier.
|
||||
|
||||
Other scenarios are documented below.
|
||||
|
||||
## List item indentation
|
||||
|
||||
The default settings of `markdownlint` and `Prettier` are compatible and don't
|
||||
result in any linting violations. If `Prettier` is used with `--tab-width` set
|
||||
to `4` (vs. `2`), the following `markdownlint` configuration can be used:
|
||||
|
||||
```json
|
||||
{
|
||||
"list-marker-space": {
|
||||
"ul_multi": 3,
|
||||
"ul_single": 3
|
||||
},
|
||||
"ul-indent": {
|
||||
"indent": 4
|
||||
}
|
||||
}
|
||||
```
|
20
doc/ReleaseProcess.md
Normal file
20
doc/ReleaseProcess.md
Normal file
|
@ -0,0 +1,20 @@
|
|||
# Release Process
|
||||
|
||||
The `markdownlint` library has some related dependencies that are updated along
|
||||
with it. To prevent possible regressions from having a widespread impact, these
|
||||
releases are separated by a few days to provide an opportunity to find issues.
|
||||
|
||||
1. [`markdownlint`][markdownlint]
|
||||
2. [`markdownlint-cli2`][markdownlint-cli2]
|
||||
3. [`markdownlint-cli2-action`][markdownlint-cli2-action]
|
||||
4. [`vscode-markdownlint`][vscode-markdownlint]
|
||||
5. [`markdownlint-cli`][markdownlint-cli]
|
||||
|
||||
This sequence is not strict and may be adjusted based on the content of the
|
||||
release and the scope of feature work in each dependency.
|
||||
|
||||
[markdownlint]: https://github.com/DavidAnson/markdownlint
|
||||
[markdownlint-cli2]: https://github.com/DavidAnson/markdownlint-cli2
|
||||
[markdownlint-cli2-action]: https://github.com/marketplace/actions/markdownlint-cli2-action
|
||||
[vscode-markdownlint]: https://marketplace.visualstudio.com/items?itemName=DavidAnson.vscode-markdownlint
|
||||
[markdownlint-cli]: https://github.com/igorshubovych/markdownlint-cli
|
1606
doc/Rules.md
1606
doc/Rules.md
File diff suppressed because it is too large
Load diff
37
doc/md001.md
Normal file
37
doc/md001.md
Normal file
|
@ -0,0 +1,37 @@
|
|||
# `MD001` - Heading levels should only increment by one level at a time
|
||||
|
||||
Tags: `headings`
|
||||
|
||||
Aliases: `heading-increment`
|
||||
|
||||
This rule is triggered when you skip heading levels in a Markdown document, for
|
||||
example:
|
||||
|
||||
```markdown
|
||||
# Heading 1
|
||||
|
||||
### Heading 3
|
||||
|
||||
We skipped out a 2nd level heading in this document
|
||||
```
|
||||
|
||||
When using multiple heading levels, nested headings should increase by only one
|
||||
level at a time:
|
||||
|
||||
```markdown
|
||||
# Heading 1
|
||||
|
||||
## Heading 2
|
||||
|
||||
### Heading 3
|
||||
|
||||
#### Heading 4
|
||||
|
||||
## Another Heading 2
|
||||
|
||||
### Another Heading 3
|
||||
```
|
||||
|
||||
Rationale: Headings represent the structure of a document and can be confusing
|
||||
when skipped - especially for accessibility scenarios. More information:
|
||||
<https://www.w3.org/WAI/tutorials/page-structure/headings/>.
|
59
doc/md003.md
Normal file
59
doc/md003.md
Normal file
|
@ -0,0 +1,59 @@
|
|||
# `MD003` - Heading style
|
||||
|
||||
Tags: `headings`
|
||||
|
||||
Aliases: `heading-style`
|
||||
|
||||
Parameters:
|
||||
|
||||
- `style`: Heading style (`string`, default `consistent`, values `atx` /
|
||||
`atx_closed` / `consistent` / `setext` / `setext_with_atx` /
|
||||
`setext_with_atx_closed`)
|
||||
|
||||
This rule is triggered when different heading styles are used in the same
|
||||
document:
|
||||
|
||||
```markdown
|
||||
# ATX style H1
|
||||
|
||||
## Closed ATX style H2 ##
|
||||
|
||||
Setext style H1
|
||||
===============
|
||||
```
|
||||
|
||||
To fix the issue, use consistent heading styles throughout the document:
|
||||
|
||||
```markdown
|
||||
# ATX style H1
|
||||
|
||||
## ATX style H2
|
||||
```
|
||||
|
||||
The `setext_with_atx` and `setext_with_atx_closed` settings allow ATX-style
|
||||
headings of level 3 or more in documents with setext-style headings (which only
|
||||
support level 1 and 2 headings):
|
||||
|
||||
```markdown
|
||||
Setext style H1
|
||||
===============
|
||||
|
||||
Setext style H2
|
||||
---------------
|
||||
|
||||
### ATX style H3
|
||||
```
|
||||
|
||||
Note: The configured heading style can be a specific style to require (`atx`,
|
||||
`atx_closed`, `setext`, `setext_with_atx`, `setext_with_atx_closed`), or can
|
||||
require that all heading styles match the first heading style via `consistent`.
|
||||
|
||||
Note: The placement of a horizontal rule directly below a line of text can
|
||||
trigger this rule by turning that text into a level 2 setext-style heading:
|
||||
|
||||
```markdown
|
||||
A line of text followed by a horizontal rule becomes a heading
|
||||
---
|
||||
```
|
||||
|
||||
Rationale: Consistent formatting makes it easier to understand a document.
|
50
doc/md004.md
Normal file
50
doc/md004.md
Normal file
|
@ -0,0 +1,50 @@
|
|||
# `MD004` - Unordered list style
|
||||
|
||||
Tags: `bullet`, `ul`
|
||||
|
||||
Aliases: `ul-style`
|
||||
|
||||
Parameters:
|
||||
|
||||
- `style`: List style (`string`, default `consistent`, values `asterisk` /
|
||||
`consistent` / `dash` / `plus` / `sublist`)
|
||||
|
||||
Fixable: Some violations can be fixed by tooling
|
||||
|
||||
This rule is triggered when the symbols used in the document for unordered
|
||||
list items do not match the configured unordered list style:
|
||||
|
||||
```markdown
|
||||
* Item 1
|
||||
+ Item 2
|
||||
- Item 3
|
||||
```
|
||||
|
||||
To fix this issue, use the configured style for list items throughout the
|
||||
document:
|
||||
|
||||
```markdown
|
||||
* Item 1
|
||||
* Item 2
|
||||
* Item 3
|
||||
```
|
||||
|
||||
The configured list style can ensure all list styling is a specific symbol
|
||||
(`asterisk`, `plus`, `dash`), ensure each sublist has a consistent symbol that
|
||||
differs from its parent list (`sublist`), or ensure all list styles match the
|
||||
first list style (`consistent`).
|
||||
|
||||
For example, the following is valid for the `sublist` style because the
|
||||
outer-most indent uses asterisk, the middle indent uses plus, and the inner-most
|
||||
indent uses dash:
|
||||
|
||||
```markdown
|
||||
* Item 1
|
||||
+ Item 2
|
||||
- Item 3
|
||||
+ Item 4
|
||||
* Item 4
|
||||
+ Item 5
|
||||
```
|
||||
|
||||
Rationale: Consistent formatting makes it easier to understand a document.
|
53
doc/md005.md
Normal file
53
doc/md005.md
Normal file
|
@ -0,0 +1,53 @@
|
|||
# `MD005` - Inconsistent indentation for list items at the same level
|
||||
|
||||
Tags: `bullet`, `indentation`, `ul`
|
||||
|
||||
Aliases: `list-indent`
|
||||
|
||||
Fixable: Some violations can be fixed by tooling
|
||||
|
||||
This rule is triggered when list items are parsed as being at the same level,
|
||||
but don't have the same indentation:
|
||||
|
||||
```markdown
|
||||
* Item 1
|
||||
* Nested Item 1
|
||||
* Nested Item 2
|
||||
* A misaligned item
|
||||
```
|
||||
|
||||
Usually, this rule will be triggered because of a typo. Correct the indentation
|
||||
for the list to fix it:
|
||||
|
||||
```markdown
|
||||
* Item 1
|
||||
* Nested Item 1
|
||||
* Nested Item 2
|
||||
* Nested Item 3
|
||||
```
|
||||
|
||||
Sequentially-ordered list markers are usually left-aligned such that all items
|
||||
have the same starting column:
|
||||
|
||||
```markdown
|
||||
...
|
||||
8. Item
|
||||
9. Item
|
||||
10. Item
|
||||
11. Item
|
||||
...
|
||||
```
|
||||
|
||||
This rule also supports right-alignment of list markers such that all items have
|
||||
the same ending column:
|
||||
|
||||
```markdown
|
||||
...
|
||||
8. Item
|
||||
9. Item
|
||||
10. Item
|
||||
11. Item
|
||||
...
|
||||
```
|
||||
|
||||
Rationale: Violations of this rule can lead to improperly rendered content.
|
52
doc/md007.md
Normal file
52
doc/md007.md
Normal file
|
@ -0,0 +1,52 @@
|
|||
# `MD007` - Unordered list indentation
|
||||
|
||||
Tags: `bullet`, `indentation`, `ul`
|
||||
|
||||
Aliases: `ul-indent`
|
||||
|
||||
Parameters:
|
||||
|
||||
- `indent`: Spaces for indent (`integer`, default `2`)
|
||||
- `start_indent`: Spaces for first level indent (when start_indented is set)
|
||||
(`integer`, default `2`)
|
||||
- `start_indented`: Whether to indent the first level of the list (`boolean`,
|
||||
default `false`)
|
||||
|
||||
Fixable: Some violations can be fixed by tooling
|
||||
|
||||
This rule is triggered when list items are not indented by the configured
|
||||
number of spaces (default: 2).
|
||||
|
||||
Example:
|
||||
|
||||
```markdown
|
||||
* List item
|
||||
* Nested list item indented by 3 spaces
|
||||
```
|
||||
|
||||
Corrected Example:
|
||||
|
||||
```markdown
|
||||
* List item
|
||||
* Nested list item indented by 2 spaces
|
||||
```
|
||||
|
||||
Note: This rule applies to a sublist only if its parent lists are all also
|
||||
unordered (otherwise, extra indentation of ordered lists interferes with the
|
||||
rule).
|
||||
|
||||
The `start_indented` parameter allows the first level of lists to be indented by
|
||||
the configured number of spaces rather than starting at zero. The `start_indent`
|
||||
parameter allows the first level of lists to be indented by a different number
|
||||
of spaces than the rest (ignored when `start_indented` is not set).
|
||||
|
||||
Rationale: Indenting by 2 spaces allows the content of a nested list to be in
|
||||
line with the start of the content of the parent list when a single space is
|
||||
used after the list marker. Indenting by 4 spaces is consistent with code blocks
|
||||
and simpler for editors to implement. Additionally, this can be a compatibility
|
||||
issue for other Markdown parsers, which require 4-space indents. More
|
||||
information: [Markdown Style Guide][markdown-style-guide].
|
||||
|
||||
Note: See [Prettier.md](Prettier.md) for compatibility information.
|
||||
|
||||
[markdown-style-guide]: https://cirosantilli.com/markdown-style-guide#indentation-of-content-inside-lists
|
51
doc/md009.md
Normal file
51
doc/md009.md
Normal file
|
@ -0,0 +1,51 @@
|
|||
# `MD009` - Trailing spaces
|
||||
|
||||
Tags: `whitespace`
|
||||
|
||||
Aliases: `no-trailing-spaces`
|
||||
|
||||
Parameters:
|
||||
|
||||
- `br_spaces`: Spaces for line break (`integer`, default `2`)
|
||||
- `list_item_empty_lines`: Allow spaces for empty lines in list items
|
||||
(`boolean`, default `false`)
|
||||
- `strict`: Include unnecessary breaks (`boolean`, default `false`)
|
||||
|
||||
Fixable: Some violations can be fixed by tooling
|
||||
|
||||
This rule is triggered on any lines that end with unexpected whitespace. To fix
|
||||
this, remove the trailing space from the end of the line.
|
||||
|
||||
Note: Trailing space is allowed in indented and fenced code blocks because some
|
||||
languages require it.
|
||||
|
||||
The `br_spaces` parameter allows an exception to this rule for a specific number
|
||||
of trailing spaces, typically used to insert an explicit line break. The default
|
||||
value allows 2 spaces to indicate a hard break (\<br> element).
|
||||
|
||||
Note: You must set `br_spaces` to a value >= 2 for this parameter to take
|
||||
effect. Setting `br_spaces` to 1 behaves the same as 0, disallowing any trailing
|
||||
spaces.
|
||||
|
||||
By default, this rule will not trigger when the allowed number of spaces is
|
||||
used, even when it doesn't create a hard break (for example, at the end of a
|
||||
paragraph). To report such instances as well, set the `strict` parameter to
|
||||
`true`.
|
||||
|
||||
```markdown
|
||||
Text text text
|
||||
text[2 spaces]
|
||||
```
|
||||
|
||||
Using spaces to indent blank lines inside a list item is usually not necessary,
|
||||
but some parsers require it. Set the `list_item_empty_lines` parameter to `true`
|
||||
to allow this (even when `strict` is `true`):
|
||||
|
||||
```markdown
|
||||
- list item text
|
||||
[2 spaces]
|
||||
list item text
|
||||
```
|
||||
|
||||
Rationale: Except when being used to create a line break, trailing whitespace
|
||||
has no purpose and does not affect the rendering of content.
|
56
doc/md010.md
Normal file
56
doc/md010.md
Normal file
|
@ -0,0 +1,56 @@
|
|||
# `MD010` - Hard tabs
|
||||
|
||||
Tags: `hard_tab`, `whitespace`
|
||||
|
||||
Aliases: `no-hard-tabs`
|
||||
|
||||
Parameters:
|
||||
|
||||
- `code_blocks`: Include code blocks (`boolean`, default `true`)
|
||||
- `ignore_code_languages`: Fenced code languages to ignore (`string[]`, default
|
||||
`[]`)
|
||||
- `spaces_per_tab`: Number of spaces for each hard tab (`integer`, default `1`)
|
||||
|
||||
Fixable: Some violations can be fixed by tooling
|
||||
|
||||
This rule is triggered by any lines that contain hard tab characters instead
|
||||
of using spaces for indentation. To fix this, replace any hard tab characters
|
||||
with spaces instead.
|
||||
|
||||
Example:
|
||||
|
||||
<!-- markdownlint-disable no-hard-tabs -->
|
||||
|
||||
```markdown
|
||||
Some text
|
||||
|
||||
* hard tab character used to indent the list item
|
||||
```
|
||||
|
||||
<!-- markdownlint-restore -->
|
||||
|
||||
Corrected example:
|
||||
|
||||
```markdown
|
||||
Some text
|
||||
|
||||
* Spaces used to indent the list item instead
|
||||
```
|
||||
|
||||
You have the option to exclude this rule for code blocks and spans. To do so,
|
||||
set the `code_blocks` parameter to `false`. Code blocks and spans are included
|
||||
by default since handling of tabs by Markdown tools can be inconsistent (e.g.,
|
||||
using 4 vs. 8 spaces).
|
||||
|
||||
When code blocks are scanned (e.g., by default or if `code_blocks` is `true`),
|
||||
the `ignore_code_languages` parameter can be set to a list of languages that
|
||||
should be ignored (i.e., hard tabs will be allowed, though not required). This
|
||||
makes it easier for documents to include code for languages that require hard
|
||||
tabs.
|
||||
|
||||
By default, violations of this rule are fixed by replacing the tab with 1 space
|
||||
character. To use a different number of spaces, set the `spaces_per_tab`
|
||||
parameter to the desired value.
|
||||
|
||||
Rationale: Hard tabs are often rendered inconsistently by different editors and
|
||||
can be harder to work with than spaces.
|
30
doc/md011.md
Normal file
30
doc/md011.md
Normal file
|
@ -0,0 +1,30 @@
|
|||
# `MD011` - Reversed link syntax
|
||||
|
||||
Tags: `links`
|
||||
|
||||
Aliases: `no-reversed-links`
|
||||
|
||||
Fixable: Some violations can be fixed by tooling
|
||||
|
||||
This rule is triggered when text that appears to be a link is encountered, but
|
||||
where the syntax appears to have been reversed (the `[]` and `()` are
|
||||
reversed):
|
||||
|
||||
```markdown
|
||||
(Incorrect link syntax)[https://www.example.com/]
|
||||
```
|
||||
|
||||
To fix this, swap the `[]` and `()` around:
|
||||
|
||||
```markdown
|
||||
[Correct link syntax](https://www.example.com/)
|
||||
```
|
||||
|
||||
Note: [Markdown Extra](https://en.wikipedia.org/wiki/Markdown_Extra)-style
|
||||
footnotes do not trigger this rule:
|
||||
|
||||
```markdown
|
||||
For (example)[^1]
|
||||
```
|
||||
|
||||
Rationale: Reversed links are not rendered as usable links.
|
38
doc/md012.md
Normal file
38
doc/md012.md
Normal file
|
@ -0,0 +1,38 @@
|
|||
# `MD012` - Multiple consecutive blank lines
|
||||
|
||||
Tags: `blank_lines`, `whitespace`
|
||||
|
||||
Aliases: `no-multiple-blanks`
|
||||
|
||||
Parameters:
|
||||
|
||||
- `maximum`: Consecutive blank lines (`integer`, default `1`)
|
||||
|
||||
Fixable: Some violations can be fixed by tooling
|
||||
|
||||
This rule is triggered when there are multiple consecutive blank lines in the
|
||||
document:
|
||||
|
||||
```markdown
|
||||
Some text here
|
||||
|
||||
|
||||
Some more text here
|
||||
```
|
||||
|
||||
To fix this, delete the offending lines:
|
||||
|
||||
```markdown
|
||||
Some text here
|
||||
|
||||
Some more text here
|
||||
```
|
||||
|
||||
Note: this rule will not be triggered if there are multiple consecutive blank
|
||||
lines inside code blocks.
|
||||
|
||||
Note: The `maximum` parameter can be used to configure the maximum number of
|
||||
consecutive blank lines.
|
||||
|
||||
Rationale: Except in a code block, blank lines serve no purpose and do not
|
||||
affect the rendering of content.
|
58
doc/md013.md
Normal file
58
doc/md013.md
Normal file
|
@ -0,0 +1,58 @@
|
|||
# `MD013` - Line length
|
||||
|
||||
Tags: `line_length`
|
||||
|
||||
Aliases: `line-length`
|
||||
|
||||
Parameters:
|
||||
|
||||
- `code_block_line_length`: Number of characters for code blocks (`integer`,
|
||||
default `80`)
|
||||
- `code_blocks`: Include code blocks (`boolean`, default `true`)
|
||||
- `heading_line_length`: Number of characters for headings (`integer`, default
|
||||
`80`)
|
||||
- `headings`: Include headings (`boolean`, default `true`)
|
||||
- `line_length`: Number of characters (`integer`, default `80`)
|
||||
- `stern`: Stern length checking (`boolean`, default `false`)
|
||||
- `strict`: Strict length checking (`boolean`, default `false`)
|
||||
- `tables`: Include tables (`boolean`, default `true`)
|
||||
|
||||
This rule is triggered when there are lines that are longer than the
|
||||
configured `line_length` (default: 80 characters). To fix this, split the line
|
||||
up into multiple lines. To set a different maximum length for headings, use
|
||||
`heading_line_length`. To set a different maximum length for code blocks, use
|
||||
`code_block_line_length`
|
||||
|
||||
This rule has an exception when there is no whitespace beyond the configured
|
||||
line length. This allows you to include items such as long URLs without being
|
||||
forced to break them in the middle. To disable this exception, set the `strict`
|
||||
parameter to `true` and an issue will be reported when any line is too long. To
|
||||
warn for lines that are too long and could be fixed but allow long lines
|
||||
without spaces, set the `stern` parameter to `true`.
|
||||
|
||||
For example (assuming normal behavior):
|
||||
|
||||
```markdown
|
||||
IF THIS LINE IS THE MAXIMUM LENGTH
|
||||
This line is okay because there are-no-spaces-beyond-that-length
|
||||
This line is a violation because there are spaces beyond that length
|
||||
This-line-is-okay-because-there-are-no-spaces-anywhere-within
|
||||
```
|
||||
|
||||
In `strict` mode, the last three lines above are all violations. In `stern`
|
||||
mode, the middle two lines above are both violations, but the last is okay.
|
||||
|
||||
You have the option to exclude this rule for code blocks, tables, or headings.
|
||||
To do so, set the `code_blocks`, `tables`, or `headings` parameter(s) to false.
|
||||
|
||||
Code blocks are included in this rule by default since it is often a
|
||||
requirement for document readability, and tentatively compatible with code
|
||||
rules. Still, some languages do not lend themselves to short lines.
|
||||
|
||||
Lines with link/image reference definitions and standalone lines (i.e., not part
|
||||
of a paragraph) with only a link/image (possibly using (strong) emphasis) are
|
||||
always exempted from this rule (even in `strict` mode) because there is often no
|
||||
way to split such lines without breaking the URL.
|
||||
|
||||
Rationale: Extremely long lines can be difficult to work with in some editors.
|
||||
More information: <https://cirosantilli.com/markdown-style-guide#line-wrapping>.
|
54
doc/md014.md
Normal file
54
doc/md014.md
Normal file
|
@ -0,0 +1,54 @@
|
|||
# `MD014` - Dollar signs used before commands without showing output
|
||||
|
||||
Tags: `code`
|
||||
|
||||
Aliases: `commands-show-output`
|
||||
|
||||
Fixable: Some violations can be fixed by tooling
|
||||
|
||||
This rule is triggered when there are code blocks showing shell commands to be
|
||||
typed, and *all* of the shell commands are preceded by dollar signs ($):
|
||||
|
||||
<!-- markdownlint-disable commands-show-output -->
|
||||
|
||||
```markdown
|
||||
$ ls
|
||||
$ cat foo
|
||||
$ less bar
|
||||
```
|
||||
|
||||
<!-- markdownlint-restore -->
|
||||
|
||||
The dollar signs are unnecessary in this situation, and should not be
|
||||
included:
|
||||
|
||||
```markdown
|
||||
ls
|
||||
cat foo
|
||||
less bar
|
||||
```
|
||||
|
||||
Showing output for commands preceded by dollar signs does not trigger this rule:
|
||||
|
||||
```markdown
|
||||
$ ls
|
||||
foo bar
|
||||
$ cat foo
|
||||
Hello world
|
||||
$ cat bar
|
||||
baz
|
||||
```
|
||||
|
||||
Because some commands do not produce output, it is not a violation if *some*
|
||||
commands do not have output:
|
||||
|
||||
```markdown
|
||||
$ mkdir test
|
||||
mkdir: created directory 'test'
|
||||
$ ls test
|
||||
```
|
||||
|
||||
Rationale: It is easier to copy/paste and less noisy if the dollar signs
|
||||
are omitted when they are not needed. See
|
||||
<https://cirosantilli.com/markdown-style-guide#dollar-signs-in-shell-code>
|
||||
for more information.
|
27
doc/md018.md
Normal file
27
doc/md018.md
Normal file
|
@ -0,0 +1,27 @@
|
|||
# `MD018` - No space after hash on atx style heading
|
||||
|
||||
Tags: `atx`, `headings`, `spaces`
|
||||
|
||||
Aliases: `no-missing-space-atx`
|
||||
|
||||
Fixable: Some violations can be fixed by tooling
|
||||
|
||||
This rule is triggered when spaces are missing after the hash characters
|
||||
in an atx style heading:
|
||||
|
||||
```markdown
|
||||
#Heading 1
|
||||
|
||||
##Heading 2
|
||||
```
|
||||
|
||||
To fix this, separate the heading text from the hash character by a single
|
||||
space:
|
||||
|
||||
```markdown
|
||||
# Heading 1
|
||||
|
||||
## Heading 2
|
||||
```
|
||||
|
||||
Rationale: Violations of this rule can lead to improperly rendered content.
|
28
doc/md019.md
Normal file
28
doc/md019.md
Normal file
|
@ -0,0 +1,28 @@
|
|||
# `MD019` - Multiple spaces after hash on atx style heading
|
||||
|
||||
Tags: `atx`, `headings`, `spaces`
|
||||
|
||||
Aliases: `no-multiple-space-atx`
|
||||
|
||||
Fixable: Some violations can be fixed by tooling
|
||||
|
||||
This rule is triggered when more than one space is used to separate the
|
||||
heading text from the hash characters in an atx style heading:
|
||||
|
||||
```markdown
|
||||
# Heading 1
|
||||
|
||||
## Heading 2
|
||||
```
|
||||
|
||||
To fix this, separate the heading text from the hash character by a single
|
||||
space:
|
||||
|
||||
```markdown
|
||||
# Heading 1
|
||||
|
||||
## Heading 2
|
||||
```
|
||||
|
||||
Rationale: Extra space has no purpose and does not affect the rendering of
|
||||
content.
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue