@alexlit/lint-kit 112.3.3 → 112.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/packages/config-markdownlint/node_modules/entities/LICENSE +0 -11
- package/packages/config-markdownlint/node_modules/entities/lib/decode.d.ts +0 -211
- package/packages/config-markdownlint/node_modules/entities/lib/decode.d.ts.map +0 -1
- package/packages/config-markdownlint/node_modules/entities/lib/decode.js +0 -536
- package/packages/config-markdownlint/node_modules/entities/lib/decode.js.map +0 -1
- package/packages/config-markdownlint/node_modules/entities/lib/decode_codepoint.d.ts +0 -19
- package/packages/config-markdownlint/node_modules/entities/lib/decode_codepoint.d.ts.map +0 -1
- package/packages/config-markdownlint/node_modules/entities/lib/decode_codepoint.js +0 -76
- package/packages/config-markdownlint/node_modules/entities/lib/decode_codepoint.js.map +0 -1
- package/packages/config-markdownlint/node_modules/entities/lib/encode.d.ts +0 -22
- package/packages/config-markdownlint/node_modules/entities/lib/encode.d.ts.map +0 -1
- package/packages/config-markdownlint/node_modules/entities/lib/encode.js +0 -77
- package/packages/config-markdownlint/node_modules/entities/lib/encode.js.map +0 -1
- package/packages/config-markdownlint/node_modules/entities/lib/escape.d.ts +0 -43
- package/packages/config-markdownlint/node_modules/entities/lib/escape.d.ts.map +0 -1
- package/packages/config-markdownlint/node_modules/entities/lib/escape.js +0 -122
- package/packages/config-markdownlint/node_modules/entities/lib/escape.js.map +0 -1
- package/packages/config-markdownlint/node_modules/entities/lib/esm/decode.d.ts +0 -211
- package/packages/config-markdownlint/node_modules/entities/lib/esm/decode.d.ts.map +0 -1
- package/packages/config-markdownlint/node_modules/entities/lib/esm/decode.js +0 -496
- package/packages/config-markdownlint/node_modules/entities/lib/esm/decode.js.map +0 -1
- package/packages/config-markdownlint/node_modules/entities/lib/esm/decode_codepoint.d.ts +0 -19
- package/packages/config-markdownlint/node_modules/entities/lib/esm/decode_codepoint.d.ts.map +0 -1
- package/packages/config-markdownlint/node_modules/entities/lib/esm/decode_codepoint.js +0 -71
- package/packages/config-markdownlint/node_modules/entities/lib/esm/decode_codepoint.js.map +0 -1
- package/packages/config-markdownlint/node_modules/entities/lib/esm/encode.d.ts +0 -22
- package/packages/config-markdownlint/node_modules/entities/lib/esm/encode.d.ts.map +0 -1
- package/packages/config-markdownlint/node_modules/entities/lib/esm/encode.js +0 -69
- package/packages/config-markdownlint/node_modules/entities/lib/esm/encode.js.map +0 -1
- package/packages/config-markdownlint/node_modules/entities/lib/esm/escape.d.ts +0 -43
- package/packages/config-markdownlint/node_modules/entities/lib/esm/escape.d.ts.map +0 -1
- package/packages/config-markdownlint/node_modules/entities/lib/esm/escape.js +0 -116
- package/packages/config-markdownlint/node_modules/entities/lib/esm/escape.js.map +0 -1
- package/packages/config-markdownlint/node_modules/entities/lib/esm/generated/decode-data-html.d.ts +0 -3
- package/packages/config-markdownlint/node_modules/entities/lib/esm/generated/decode-data-html.d.ts.map +0 -1
- package/packages/config-markdownlint/node_modules/entities/lib/esm/generated/decode-data-html.js +0 -7
- package/packages/config-markdownlint/node_modules/entities/lib/esm/generated/decode-data-html.js.map +0 -1
- package/packages/config-markdownlint/node_modules/entities/lib/esm/generated/decode-data-xml.d.ts +0 -3
- package/packages/config-markdownlint/node_modules/entities/lib/esm/generated/decode-data-xml.d.ts.map +0 -1
- package/packages/config-markdownlint/node_modules/entities/lib/esm/generated/decode-data-xml.js +0 -7
- package/packages/config-markdownlint/node_modules/entities/lib/esm/generated/decode-data-xml.js.map +0 -1
- package/packages/config-markdownlint/node_modules/entities/lib/esm/generated/encode-html.d.ts +0 -8
- package/packages/config-markdownlint/node_modules/entities/lib/esm/generated/encode-html.d.ts.map +0 -1
- package/packages/config-markdownlint/node_modules/entities/lib/esm/generated/encode-html.js +0 -10
- package/packages/config-markdownlint/node_modules/entities/lib/esm/generated/encode-html.js.map +0 -1
- package/packages/config-markdownlint/node_modules/entities/lib/esm/index.d.ts +0 -96
- package/packages/config-markdownlint/node_modules/entities/lib/esm/index.d.ts.map +0 -1
- package/packages/config-markdownlint/node_modules/entities/lib/esm/index.js +0 -99
- package/packages/config-markdownlint/node_modules/entities/lib/esm/index.js.map +0 -1
- package/packages/config-markdownlint/node_modules/entities/lib/esm/package.json +0 -1
- package/packages/config-markdownlint/node_modules/entities/lib/generated/decode-data-html.d.ts +0 -3
- package/packages/config-markdownlint/node_modules/entities/lib/generated/decode-data-html.d.ts.map +0 -1
- package/packages/config-markdownlint/node_modules/entities/lib/generated/decode-data-html.js +0 -9
- package/packages/config-markdownlint/node_modules/entities/lib/generated/decode-data-html.js.map +0 -1
- package/packages/config-markdownlint/node_modules/entities/lib/generated/decode-data-xml.d.ts +0 -3
- package/packages/config-markdownlint/node_modules/entities/lib/generated/decode-data-xml.d.ts.map +0 -1
- package/packages/config-markdownlint/node_modules/entities/lib/generated/decode-data-xml.js +0 -9
- package/packages/config-markdownlint/node_modules/entities/lib/generated/decode-data-xml.js.map +0 -1
- package/packages/config-markdownlint/node_modules/entities/lib/generated/encode-html.d.ts +0 -8
- package/packages/config-markdownlint/node_modules/entities/lib/generated/encode-html.d.ts.map +0 -1
- package/packages/config-markdownlint/node_modules/entities/lib/generated/encode-html.js +0 -12
- package/packages/config-markdownlint/node_modules/entities/lib/generated/encode-html.js.map +0 -1
- package/packages/config-markdownlint/node_modules/entities/lib/index.d.ts +0 -96
- package/packages/config-markdownlint/node_modules/entities/lib/index.d.ts.map +0 -1
- package/packages/config-markdownlint/node_modules/entities/lib/index.js +0 -126
- package/packages/config-markdownlint/node_modules/entities/lib/index.js.map +0 -1
- package/packages/config-markdownlint/node_modules/entities/package.json +0 -90
- package/packages/config-markdownlint/node_modules/entities/readme.md +0 -122
- package/packages/config-markdownlint/node_modules/markdown-it/LICENSE +0 -22
- package/packages/config-markdownlint/node_modules/markdown-it/README.md +0 -324
- package/packages/config-markdownlint/node_modules/markdown-it/bin/markdown-it.mjs +0 -107
- package/packages/config-markdownlint/node_modules/markdown-it/dist/index.cjs.js +0 -5540
- package/packages/config-markdownlint/node_modules/markdown-it/dist/markdown-it.js +0 -6963
- package/packages/config-markdownlint/node_modules/markdown-it/dist/markdown-it.min.js +0 -2
- package/packages/config-markdownlint/node_modules/markdown-it/index.mjs +0 -1
- package/packages/config-markdownlint/node_modules/markdown-it/lib/common/html_blocks.mjs +0 -67
- package/packages/config-markdownlint/node_modules/markdown-it/lib/common/html_re.mjs +0 -25
- package/packages/config-markdownlint/node_modules/markdown-it/lib/common/utils.mjs +0 -304
- package/packages/config-markdownlint/node_modules/markdown-it/lib/helpers/index.mjs +0 -11
- package/packages/config-markdownlint/node_modules/markdown-it/lib/helpers/parse_link_destination.mjs +0 -77
- package/packages/config-markdownlint/node_modules/markdown-it/lib/helpers/parse_link_label.mjs +0 -49
- package/packages/config-markdownlint/node_modules/markdown-it/lib/helpers/parse_link_title.mjs +0 -66
- package/packages/config-markdownlint/node_modules/markdown-it/lib/index.mjs +0 -565
- package/packages/config-markdownlint/node_modules/markdown-it/lib/parser_block.mjs +0 -134
- package/packages/config-markdownlint/node_modules/markdown-it/lib/parser_core.mjs +0 -62
- package/packages/config-markdownlint/node_modules/markdown-it/lib/parser_inline.mjs +0 -197
- package/packages/config-markdownlint/node_modules/markdown-it/lib/presets/commonmark.mjs +0 -88
- package/packages/config-markdownlint/node_modules/markdown-it/lib/presets/default.mjs +0 -47
- package/packages/config-markdownlint/node_modules/markdown-it/lib/presets/zero.mjs +0 -70
- package/packages/config-markdownlint/node_modules/markdown-it/lib/renderer.mjs +0 -322
- package/packages/config-markdownlint/node_modules/markdown-it/lib/ruler.mjs +0 -340
- package/packages/config-markdownlint/node_modules/markdown-it/lib/rules_block/blockquote.mjs +0 -209
- package/packages/config-markdownlint/node_modules/markdown-it/lib/rules_block/code.mjs +0 -30
- package/packages/config-markdownlint/node_modules/markdown-it/lib/rules_block/fence.mjs +0 -94
- package/packages/config-markdownlint/node_modules/markdown-it/lib/rules_block/heading.mjs +0 -51
- package/packages/config-markdownlint/node_modules/markdown-it/lib/rules_block/hr.mjs +0 -40
- package/packages/config-markdownlint/node_modules/markdown-it/lib/rules_block/html_block.mjs +0 -69
- package/packages/config-markdownlint/node_modules/markdown-it/lib/rules_block/lheading.mjs +0 -82
- package/packages/config-markdownlint/node_modules/markdown-it/lib/rules_block/list.mjs +0 -331
- package/packages/config-markdownlint/node_modules/markdown-it/lib/rules_block/paragraph.mjs +0 -46
- package/packages/config-markdownlint/node_modules/markdown-it/lib/rules_block/reference.mjs +0 -212
- package/packages/config-markdownlint/node_modules/markdown-it/lib/rules_block/state_block.mjs +0 -220
- package/packages/config-markdownlint/node_modules/markdown-it/lib/rules_block/table.mjs +0 -228
- package/packages/config-markdownlint/node_modules/markdown-it/lib/rules_core/block.mjs +0 -13
- package/packages/config-markdownlint/node_modules/markdown-it/lib/rules_core/inline.mjs +0 -11
- package/packages/config-markdownlint/node_modules/markdown-it/lib/rules_core/linkify.mjs +0 -134
- package/packages/config-markdownlint/node_modules/markdown-it/lib/rules_core/normalize.mjs +0 -17
- package/packages/config-markdownlint/node_modules/markdown-it/lib/rules_core/replacements.mjs +0 -101
- package/packages/config-markdownlint/node_modules/markdown-it/lib/rules_core/smartquotes.mjs +0 -193
- package/packages/config-markdownlint/node_modules/markdown-it/lib/rules_core/state_core.mjs +0 -17
- package/packages/config-markdownlint/node_modules/markdown-it/lib/rules_core/text_join.mjs +0 -43
- package/packages/config-markdownlint/node_modules/markdown-it/lib/rules_inline/autolink.mjs +0 -72
- package/packages/config-markdownlint/node_modules/markdown-it/lib/rules_inline/backticks.mjs +0 -60
- package/packages/config-markdownlint/node_modules/markdown-it/lib/rules_inline/balance_pairs.mjs +0 -124
- package/packages/config-markdownlint/node_modules/markdown-it/lib/rules_inline/emphasis.mjs +0 -123
- package/packages/config-markdownlint/node_modules/markdown-it/lib/rules_inline/entity.mjs +0 -51
- package/packages/config-markdownlint/node_modules/markdown-it/lib/rules_inline/escape.mjs +0 -69
- package/packages/config-markdownlint/node_modules/markdown-it/lib/rules_inline/fragments_join.mjs +0 -38
- package/packages/config-markdownlint/node_modules/markdown-it/lib/rules_inline/html_inline.mjs +0 -50
- package/packages/config-markdownlint/node_modules/markdown-it/lib/rules_inline/image.mjs +0 -138
- package/packages/config-markdownlint/node_modules/markdown-it/lib/rules_inline/link.mjs +0 -139
- package/packages/config-markdownlint/node_modules/markdown-it/lib/rules_inline/linkify.mjs +0 -56
- package/packages/config-markdownlint/node_modules/markdown-it/lib/rules_inline/newline.mjs +0 -42
- package/packages/config-markdownlint/node_modules/markdown-it/lib/rules_inline/state_inline.mjs +0 -123
- package/packages/config-markdownlint/node_modules/markdown-it/lib/rules_inline/strikethrough.mjs +0 -127
- package/packages/config-markdownlint/node_modules/markdown-it/lib/rules_inline/text.mjs +0 -86
- package/packages/config-markdownlint/node_modules/markdown-it/lib/token.mjs +0 -191
- package/packages/config-markdownlint/node_modules/markdown-it/package.json +0 -92
- package/packages/config-markdownlint/node_modules/markdownlint/CHANGELOG.md +0 -446
- package/packages/config-markdownlint/node_modules/markdownlint/CONTRIBUTING.md +0 -93
- package/packages/config-markdownlint/node_modules/markdownlint/LICENSE +0 -21
- package/packages/config-markdownlint/node_modules/markdownlint/README.md +0 -1032
- package/packages/config-markdownlint/node_modules/markdownlint/demo/markdownlint-browser.js +0 -7116
- package/packages/config-markdownlint/node_modules/markdownlint/doc/CustomRules.md +0 -383
- package/packages/config-markdownlint/node_modules/markdownlint/doc/Prettier.md +0 -27
- package/packages/config-markdownlint/node_modules/markdownlint/doc/ReleaseProcess.md +0 -20
- package/packages/config-markdownlint/node_modules/markdownlint/doc/Rules.md +0 -2462
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md001.md +0 -37
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md003.md +0 -59
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md004.md +0 -49
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md005.md +0 -53
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md007.md +0 -52
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md009.md +0 -51
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md010.md +0 -56
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md011.md +0 -30
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md012.md +0 -38
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md013.md +0 -58
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md014.md +0 -54
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md018.md +0 -27
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md019.md +0 -28
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md020.md +0 -29
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md021.md +0 -31
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md022.md +0 -52
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md023.md +0 -33
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md024.md +0 -44
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md025.md +0 -49
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md026.md +0 -40
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md027.md +0 -24
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md028.md +0 -40
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md029.md +0 -98
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md030.md +0 -82
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md031.md +0 -50
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md032.md +0 -55
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md033.md +0 -27
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md034.md +0 -50
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md035.md +0 -42
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md036.md +0 -45
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md037.md +0 -37
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md038.md +0 -40
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md039.md +0 -21
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md040.md +0 -52
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md041.md +0 -49
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md042.md +0 -32
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md043.md +0 -69
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md044.md +0 -35
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md045.md +0 -40
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md046.md +0 -40
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md047.md +0 -34
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md048.md +0 -41
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md049.md +0 -35
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md050.md +0 -35
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md051.md +0 -87
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md052.md +0 -40
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md053.md +0 -38
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md054.md +0 -100
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md055.md +0 -54
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md056.md +0 -37
- package/packages/config-markdownlint/node_modules/markdownlint/helpers/LICENSE +0 -21
- package/packages/config-markdownlint/node_modules/markdownlint/helpers/README.md +0 -72
- package/packages/config-markdownlint/node_modules/markdownlint/helpers/helpers.js +0 -1025
- package/packages/config-markdownlint/node_modules/markdownlint/helpers/micromark.cjs +0 -445
- package/packages/config-markdownlint/node_modules/markdownlint/helpers/package.json +0 -26
- package/packages/config-markdownlint/node_modules/markdownlint/helpers/shared.js +0 -10
- package/packages/config-markdownlint/node_modules/markdownlint/lib/cache.js +0 -21
- package/packages/config-markdownlint/node_modules/markdownlint/lib/configuration.d.ts +0 -1178
- package/packages/config-markdownlint/node_modules/markdownlint/lib/constants.js +0 -14
- package/packages/config-markdownlint/node_modules/markdownlint/lib/markdownlint.d.ts +0 -479
- package/packages/config-markdownlint/node_modules/markdownlint/lib/markdownlint.js +0 -1550
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md001.js +0 -25
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md003.js +0 -45
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md004.js +0 -79
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md005.js +0 -81
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md007.js +0 -92
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md009.js +0 -89
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md010.js +0 -63
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md011.js +0 -49
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md012.js +0 -35
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md013.js +0 -99
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md014.js +0 -57
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md018.js +0 -38
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md019.js +0 -42
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md020.js +0 -65
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md021.js +0 -65
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md022.js +0 -116
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md023.js +0 -41
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md024.js +0 -45
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md025.js +0 -35
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md026.js +0 -54
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md027.js +0 -42
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md028.js +0 -47
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md029.js +0 -70
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md030.js +0 -66
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md031.js +0 -43
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md032.js +0 -76
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md033.js +0 -46
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md034.js +0 -105
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md035.js +0 -31
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md036.js +0 -50
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md037.js +0 -99
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md038.js +0 -106
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md039.js +0 -71
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md040.js +0 -42
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md041.js +0 -37
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md042.js +0 -53
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md043.js +0 -67
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md044.js +0 -115
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md045.js +0 -67
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md046.js +0 -40
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md047.js +0 -31
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md048.js +0 -43
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md049-md050.js +0 -108
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md051.js +0 -176
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md052.js +0 -42
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md053.js +0 -62
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md054.js +0 -130
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md055.js +0 -80
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md056.js +0 -52
- package/packages/config-markdownlint/node_modules/markdownlint/lib/rules.js +0 -67
- package/packages/config-markdownlint/node_modules/markdownlint/package.json +0 -103
- package/packages/config-markdownlint/node_modules/markdownlint/schema/.markdownlint.jsonc +0 -304
- package/packages/config-markdownlint/node_modules/markdownlint/schema/.markdownlint.yaml +0 -272
- package/packages/config-markdownlint/node_modules/markdownlint/schema/ValidatingConfiguration.md +0 -28
- package/packages/config-markdownlint/node_modules/markdownlint/schema/markdownlint-config-schema.json +0 -1814
- package/packages/config-markdownlint/node_modules/markdownlint/style/all.json +0 -5
- package/packages/config-markdownlint/node_modules/markdownlint/style/cirosantilli.json +0 -22
- package/packages/config-markdownlint/node_modules/markdownlint/style/prettier.json +0 -26
- package/packages/config-markdownlint/node_modules/markdownlint/style/relaxed.json +0 -12
- package/packages/config-markdownlint/node_modules/markdownlint-micromark/LICENSE +0 -21
- package/packages/config-markdownlint/node_modules/markdownlint-micromark/README.md +0 -10
- package/packages/config-markdownlint/node_modules/markdownlint-micromark/micromark-browser.js +0 -2
- package/packages/config-markdownlint/node_modules/markdownlint-micromark/micromark-html-browser.js +0 -2
- package/packages/config-markdownlint/node_modules/markdownlint-micromark/micromark.cjs +0 -1
- package/packages/config-markdownlint/node_modules/markdownlint-micromark/micromark.d.ts +0 -1751
- package/packages/config-markdownlint/node_modules/markdownlint-micromark/package.json +0 -46
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
// @ts-check
|
|
2
|
-
|
|
3
|
-
"use strict";
|
|
4
|
-
|
|
5
|
-
const { addErrorDetailIf, filterTokens } = require("../helpers");
|
|
6
|
-
|
|
7
|
-
// eslint-disable-next-line jsdoc/valid-types
|
|
8
|
-
/** @type import("./markdownlint").Rule */
|
|
9
|
-
module.exports = {
|
|
10
|
-
"names": [ "MD001", "heading-increment" ],
|
|
11
|
-
"description": "Heading levels should only increment by one level at a time",
|
|
12
|
-
"tags": [ "headings" ],
|
|
13
|
-
"parser": "markdownit",
|
|
14
|
-
"function": function MD001(params, onError) {
|
|
15
|
-
let prevLevel = 0;
|
|
16
|
-
filterTokens(params, "heading_open", function forToken(token) {
|
|
17
|
-
const level = Number.parseInt(token.tag.slice(1), 10);
|
|
18
|
-
if (prevLevel && (level > prevLevel)) {
|
|
19
|
-
addErrorDetailIf(onError, token.lineNumber,
|
|
20
|
-
"h" + (prevLevel + 1), "h" + level);
|
|
21
|
-
}
|
|
22
|
-
prevLevel = level;
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
};
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
// @ts-check
|
|
2
|
-
|
|
3
|
-
"use strict";
|
|
4
|
-
|
|
5
|
-
const { addErrorDetailIf, filterTokens, headingStyleFor } =
|
|
6
|
-
require("../helpers");
|
|
7
|
-
|
|
8
|
-
// eslint-disable-next-line jsdoc/valid-types
|
|
9
|
-
/** @type import("./markdownlint").Rule */
|
|
10
|
-
module.exports = {
|
|
11
|
-
"names": [ "MD003", "heading-style" ],
|
|
12
|
-
"description": "Heading style",
|
|
13
|
-
"tags": [ "headings" ],
|
|
14
|
-
"parser": "markdownit",
|
|
15
|
-
"function": function MD003(params, onError) {
|
|
16
|
-
let style = String(params.config.style || "consistent");
|
|
17
|
-
filterTokens(params, "heading_open", function forToken(token) {
|
|
18
|
-
const styleForToken = headingStyleFor(token);
|
|
19
|
-
if (style === "consistent") {
|
|
20
|
-
style = styleForToken;
|
|
21
|
-
}
|
|
22
|
-
if (styleForToken !== style) {
|
|
23
|
-
const h12 = /h[12]/.test(token.tag);
|
|
24
|
-
const setextWithAtx =
|
|
25
|
-
(style === "setext_with_atx") &&
|
|
26
|
-
((h12 && (styleForToken === "setext")) ||
|
|
27
|
-
(!h12 && (styleForToken === "atx")));
|
|
28
|
-
const setextWithAtxClosed =
|
|
29
|
-
(style === "setext_with_atx_closed") &&
|
|
30
|
-
((h12 && (styleForToken === "setext")) ||
|
|
31
|
-
(!h12 && (styleForToken === "atx_closed")));
|
|
32
|
-
if (!setextWithAtx && !setextWithAtxClosed) {
|
|
33
|
-
let expected = style;
|
|
34
|
-
if (style === "setext_with_atx") {
|
|
35
|
-
expected = h12 ? "setext" : "atx";
|
|
36
|
-
} else if (style === "setext_with_atx_closed") {
|
|
37
|
-
expected = h12 ? "setext" : "atx_closed";
|
|
38
|
-
}
|
|
39
|
-
addErrorDetailIf(onError, token.lineNumber,
|
|
40
|
-
expected, styleForToken);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
};
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
// @ts-check
|
|
2
|
-
|
|
3
|
-
"use strict";
|
|
4
|
-
|
|
5
|
-
const { addErrorDetailIf, listItemMarkerRe, unorderedListStyleFor } =
|
|
6
|
-
require("../helpers");
|
|
7
|
-
const { flattenedLists } = require("./cache");
|
|
8
|
-
|
|
9
|
-
const expectedStyleToMarker = {
|
|
10
|
-
"dash": "-",
|
|
11
|
-
"plus": "+",
|
|
12
|
-
"asterisk": "*"
|
|
13
|
-
};
|
|
14
|
-
const differentItemStyle = {
|
|
15
|
-
"dash": "plus",
|
|
16
|
-
"plus": "asterisk",
|
|
17
|
-
"asterisk": "dash"
|
|
18
|
-
};
|
|
19
|
-
const validStyles = Object.keys(expectedStyleToMarker);
|
|
20
|
-
|
|
21
|
-
// eslint-disable-next-line jsdoc/valid-types
|
|
22
|
-
/** @type import("./markdownlint").Rule */
|
|
23
|
-
module.exports = {
|
|
24
|
-
"names": [ "MD004", "ul-style" ],
|
|
25
|
-
"description": "Unordered list style",
|
|
26
|
-
"tags": [ "bullet", "ul" ],
|
|
27
|
-
"parser": "none",
|
|
28
|
-
"function": function MD004(params, onError) {
|
|
29
|
-
const style = String(params.config.style || "consistent");
|
|
30
|
-
let expectedStyle = style;
|
|
31
|
-
const nestingStyles = [];
|
|
32
|
-
for (const list of flattenedLists()) {
|
|
33
|
-
if (list.unordered) {
|
|
34
|
-
if (expectedStyle === "consistent") {
|
|
35
|
-
expectedStyle = unorderedListStyleFor(list.items[0]);
|
|
36
|
-
}
|
|
37
|
-
for (const item of list.items) {
|
|
38
|
-
const itemStyle = unorderedListStyleFor(item);
|
|
39
|
-
if (style === "sublist") {
|
|
40
|
-
const nesting = list.nesting;
|
|
41
|
-
if (!nestingStyles[nesting]) {
|
|
42
|
-
nestingStyles[nesting] =
|
|
43
|
-
(itemStyle === nestingStyles[nesting - 1]) ?
|
|
44
|
-
differentItemStyle[itemStyle] :
|
|
45
|
-
itemStyle;
|
|
46
|
-
}
|
|
47
|
-
expectedStyle = nestingStyles[nesting];
|
|
48
|
-
}
|
|
49
|
-
if (!validStyles.includes(expectedStyle)) {
|
|
50
|
-
expectedStyle = validStyles[0];
|
|
51
|
-
}
|
|
52
|
-
let range = null;
|
|
53
|
-
let fixInfo = null;
|
|
54
|
-
const match = item.line.match(listItemMarkerRe);
|
|
55
|
-
if (match) {
|
|
56
|
-
const column = match.index + 1;
|
|
57
|
-
const length = match[0].length;
|
|
58
|
-
range = [ column, length ];
|
|
59
|
-
fixInfo = {
|
|
60
|
-
"editColumn": match[1].length + 1,
|
|
61
|
-
"deleteCount": 1,
|
|
62
|
-
"insertText": expectedStyleToMarker[expectedStyle]
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
addErrorDetailIf(
|
|
66
|
-
onError,
|
|
67
|
-
item.lineNumber,
|
|
68
|
-
expectedStyle,
|
|
69
|
-
itemStyle,
|
|
70
|
-
null,
|
|
71
|
-
null,
|
|
72
|
-
range,
|
|
73
|
-
fixInfo
|
|
74
|
-
);
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
};
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
// @ts-check
|
|
2
|
-
|
|
3
|
-
"use strict";
|
|
4
|
-
|
|
5
|
-
const { addError, addErrorDetailIf } = require("../helpers");
|
|
6
|
-
const { filterByTypes, inHtmlFlow } = require("../helpers/micromark.cjs");
|
|
7
|
-
|
|
8
|
-
// eslint-disable-next-line jsdoc/valid-types
|
|
9
|
-
/** @type import("./markdownlint").Rule */
|
|
10
|
-
module.exports = {
|
|
11
|
-
"names": [ "MD005", "list-indent" ],
|
|
12
|
-
"description": "Inconsistent indentation for list items at the same level",
|
|
13
|
-
"tags": [ "bullet", "ul", "indentation" ],
|
|
14
|
-
"parser": "micromark",
|
|
15
|
-
"function": function MD005(params, onError) {
|
|
16
|
-
// eslint-disable-next-line jsdoc/valid-types
|
|
17
|
-
/** @type import("../helpers/micromark.cjs").Token[] */
|
|
18
|
-
const micromarkTokens =
|
|
19
|
-
// @ts-ignore
|
|
20
|
-
params.parsers.micromark.tokens;
|
|
21
|
-
const lists = filterByTypes(
|
|
22
|
-
micromarkTokens,
|
|
23
|
-
[ "listOrdered", "listUnordered" ]
|
|
24
|
-
).filter((list) => !inHtmlFlow(list));
|
|
25
|
-
for (const list of lists) {
|
|
26
|
-
const expectedIndent = list.startColumn - 1;
|
|
27
|
-
let expectedEnd = 0;
|
|
28
|
-
let endMatching = false;
|
|
29
|
-
const listItemPrefixes =
|
|
30
|
-
list.children.filter((token) => (token.type === "listItemPrefix"));
|
|
31
|
-
for (const listItemPrefix of listItemPrefixes) {
|
|
32
|
-
const lineNumber = listItemPrefix.startLine;
|
|
33
|
-
const actualIndent = listItemPrefix.startColumn - 1;
|
|
34
|
-
const range = [ 1, listItemPrefix.endColumn - 1 ];
|
|
35
|
-
if (list.type === "listUnordered") {
|
|
36
|
-
addErrorDetailIf(
|
|
37
|
-
onError,
|
|
38
|
-
lineNumber,
|
|
39
|
-
expectedIndent,
|
|
40
|
-
actualIndent,
|
|
41
|
-
null,
|
|
42
|
-
null,
|
|
43
|
-
range
|
|
44
|
-
// No fixInfo; MD007 handles this scenario better
|
|
45
|
-
);
|
|
46
|
-
} else {
|
|
47
|
-
const markerLength = listItemPrefix.text.trim().length;
|
|
48
|
-
const actualEnd = listItemPrefix.startColumn + markerLength - 1;
|
|
49
|
-
expectedEnd = expectedEnd || actualEnd;
|
|
50
|
-
if ((expectedIndent !== actualIndent) || endMatching) {
|
|
51
|
-
if (expectedEnd === actualEnd) {
|
|
52
|
-
endMatching = true;
|
|
53
|
-
} else {
|
|
54
|
-
const detail = endMatching ?
|
|
55
|
-
`Expected: (${expectedEnd}); Actual: (${actualEnd})` :
|
|
56
|
-
`Expected: ${expectedIndent}; Actual: ${actualIndent}`;
|
|
57
|
-
const expected = endMatching ?
|
|
58
|
-
expectedEnd - markerLength :
|
|
59
|
-
expectedIndent;
|
|
60
|
-
const actual = endMatching ?
|
|
61
|
-
actualEnd - markerLength :
|
|
62
|
-
actualIndent;
|
|
63
|
-
addError(
|
|
64
|
-
onError,
|
|
65
|
-
lineNumber,
|
|
66
|
-
detail,
|
|
67
|
-
undefined,
|
|
68
|
-
range,
|
|
69
|
-
{
|
|
70
|
-
"editColumn": Math.min(actual, expected) + 1,
|
|
71
|
-
"deleteCount": Math.max(actual - expected, 0),
|
|
72
|
-
"insertText": "".padEnd(Math.max(expected - actual, 0))
|
|
73
|
-
}
|
|
74
|
-
);
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
};
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
// @ts-check
|
|
2
|
-
|
|
3
|
-
"use strict";
|
|
4
|
-
|
|
5
|
-
const { addErrorDetailIf } = require("../helpers");
|
|
6
|
-
const { filterByTypes, getTokenParentOfType, inHtmlFlow } =
|
|
7
|
-
require("../helpers/micromark.cjs");
|
|
8
|
-
|
|
9
|
-
// eslint-disable-next-line jsdoc/valid-types
|
|
10
|
-
/** @type import("markdownlint-micromark").TokenType[] */
|
|
11
|
-
const unorderedListTypes =
|
|
12
|
-
[ "blockQuotePrefix", "listItemPrefix", "listUnordered" ];
|
|
13
|
-
// eslint-disable-next-line jsdoc/valid-types
|
|
14
|
-
/** @type import("markdownlint-micromark").TokenType[] */
|
|
15
|
-
const unorderedParentTypes =
|
|
16
|
-
[ "blockQuote", "listOrdered", "listUnordered" ];
|
|
17
|
-
|
|
18
|
-
// eslint-disable-next-line jsdoc/valid-types
|
|
19
|
-
/** @type import("./markdownlint").Rule */
|
|
20
|
-
module.exports = {
|
|
21
|
-
"names": [ "MD007", "ul-indent" ],
|
|
22
|
-
"description": "Unordered list indentation",
|
|
23
|
-
"tags": [ "bullet", "ul", "indentation" ],
|
|
24
|
-
"parser": "micromark",
|
|
25
|
-
"function": function MD007(params, onError) {
|
|
26
|
-
const indent = Number(params.config.indent || 2);
|
|
27
|
-
const startIndented = !!params.config.start_indented;
|
|
28
|
-
const startIndent = Number(params.config.start_indent || indent);
|
|
29
|
-
// eslint-disable-next-line jsdoc/valid-types
|
|
30
|
-
/** @type import("../helpers/micromark.cjs").Token[] */
|
|
31
|
-
const micromarkTokens =
|
|
32
|
-
// @ts-ignore
|
|
33
|
-
params.parsers.micromark.tokens;
|
|
34
|
-
const unorderedListNesting = new Map();
|
|
35
|
-
let lastBlockQuotePrefix = null;
|
|
36
|
-
const tokens = filterByTypes(micromarkTokens, unorderedListTypes);
|
|
37
|
-
for (const token of tokens) {
|
|
38
|
-
const { endColumn, parent, startColumn, startLine, type } = token;
|
|
39
|
-
if (type === "blockQuotePrefix") {
|
|
40
|
-
lastBlockQuotePrefix = token;
|
|
41
|
-
} else if (type === "listUnordered") {
|
|
42
|
-
let nesting = 0;
|
|
43
|
-
/** @type {import("../helpers/micromark.cjs").Token | null} */
|
|
44
|
-
let current = token;
|
|
45
|
-
while (
|
|
46
|
-
(current = getTokenParentOfType(current, unorderedParentTypes))
|
|
47
|
-
) {
|
|
48
|
-
if (current.type === "listUnordered") {
|
|
49
|
-
nesting++;
|
|
50
|
-
// eslint-disable-next-line no-continue
|
|
51
|
-
continue;
|
|
52
|
-
} else if (current.type === "listOrdered") {
|
|
53
|
-
nesting = -1;
|
|
54
|
-
}
|
|
55
|
-
break;
|
|
56
|
-
}
|
|
57
|
-
if (nesting >= 0) {
|
|
58
|
-
unorderedListNesting.set(token, nesting);
|
|
59
|
-
}
|
|
60
|
-
} else if (!inHtmlFlow(token)) {
|
|
61
|
-
// listItemPrefix
|
|
62
|
-
const nesting = unorderedListNesting.get(parent);
|
|
63
|
-
if (nesting !== undefined) {
|
|
64
|
-
// listItemPrefix for listUnordered
|
|
65
|
-
const expectedIndent =
|
|
66
|
-
(startIndented ? startIndent : 0) + (nesting * indent);
|
|
67
|
-
const blockQuoteAdjustment =
|
|
68
|
-
(lastBlockQuotePrefix?.endLine === startLine) ?
|
|
69
|
-
(lastBlockQuotePrefix.endColumn - 1) :
|
|
70
|
-
0;
|
|
71
|
-
const actualIndent = startColumn - 1 - blockQuoteAdjustment;
|
|
72
|
-
const range = [ 1, endColumn - 1 ];
|
|
73
|
-
const fixInfo = {
|
|
74
|
-
"editColumn": startColumn - actualIndent,
|
|
75
|
-
"deleteCount": Math.max(actualIndent - expectedIndent, 0),
|
|
76
|
-
"insertText": "".padEnd(Math.max(expectedIndent - actualIndent, 0))
|
|
77
|
-
};
|
|
78
|
-
addErrorDetailIf(
|
|
79
|
-
onError,
|
|
80
|
-
startLine,
|
|
81
|
-
expectedIndent,
|
|
82
|
-
actualIndent,
|
|
83
|
-
undefined,
|
|
84
|
-
undefined,
|
|
85
|
-
range,
|
|
86
|
-
fixInfo
|
|
87
|
-
);
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
};
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
// @ts-check
|
|
2
|
-
|
|
3
|
-
"use strict";
|
|
4
|
-
|
|
5
|
-
const { addError, filterTokens, forEachLine, includesSorted,
|
|
6
|
-
numericSortAscending } = require("../helpers");
|
|
7
|
-
const { lineMetadata } = require("./cache");
|
|
8
|
-
|
|
9
|
-
// eslint-disable-next-line jsdoc/valid-types
|
|
10
|
-
/** @type import("./markdownlint").Rule */
|
|
11
|
-
module.exports = {
|
|
12
|
-
"names": [ "MD009", "no-trailing-spaces" ],
|
|
13
|
-
"description": "Trailing spaces",
|
|
14
|
-
"tags": [ "whitespace" ],
|
|
15
|
-
"parser": "markdownit",
|
|
16
|
-
"function": function MD009(params, onError) {
|
|
17
|
-
let brSpaces = params.config.br_spaces;
|
|
18
|
-
brSpaces = Number((brSpaces === undefined) ? 2 : brSpaces);
|
|
19
|
-
const listItemEmptyLines = !!params.config.list_item_empty_lines;
|
|
20
|
-
const strict = !!params.config.strict;
|
|
21
|
-
const listItemLineNumbers = [];
|
|
22
|
-
if (listItemEmptyLines) {
|
|
23
|
-
filterTokens(params, "list_item_open", (token) => {
|
|
24
|
-
for (let i = token.map[0]; i < token.map[1]; i++) {
|
|
25
|
-
listItemLineNumbers.push(i + 1);
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
listItemLineNumbers.sort(numericSortAscending);
|
|
29
|
-
}
|
|
30
|
-
const paragraphLineNumbers = [];
|
|
31
|
-
const codeInlineLineNumbers = [];
|
|
32
|
-
if (strict) {
|
|
33
|
-
filterTokens(params, "paragraph_open", (token) => {
|
|
34
|
-
for (let i = token.map[0]; i < token.map[1] - 1; i++) {
|
|
35
|
-
paragraphLineNumbers.push(i + 1);
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
const addLineNumberRange = (start, end) => {
|
|
39
|
-
for (let i = start; i < end; i++) {
|
|
40
|
-
codeInlineLineNumbers.push(i);
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
filterTokens(params, "inline", (token) => {
|
|
44
|
-
let start = 0;
|
|
45
|
-
for (const child of token.children) {
|
|
46
|
-
if (start > 0) {
|
|
47
|
-
addLineNumberRange(start, child.lineNumber);
|
|
48
|
-
start = 0;
|
|
49
|
-
}
|
|
50
|
-
if (child.type === "code_inline") {
|
|
51
|
-
start = child.lineNumber;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
if (start > 0) {
|
|
55
|
-
addLineNumberRange(start, token.map[1]);
|
|
56
|
-
}
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
const expected = (brSpaces < 2) ? 0 : brSpaces;
|
|
60
|
-
forEachLine(lineMetadata(), (line, lineIndex, inCode) => {
|
|
61
|
-
const lineNumber = lineIndex + 1;
|
|
62
|
-
const trailingSpaces = line.length - line.trimEnd().length;
|
|
63
|
-
if (
|
|
64
|
-
trailingSpaces &&
|
|
65
|
-
!inCode &&
|
|
66
|
-
!includesSorted(listItemLineNumbers, lineNumber) &&
|
|
67
|
-
(
|
|
68
|
-
(expected !== trailingSpaces) ||
|
|
69
|
-
(strict &&
|
|
70
|
-
(!includesSorted(paragraphLineNumbers, lineNumber) ||
|
|
71
|
-
includesSorted(codeInlineLineNumbers, lineNumber)))
|
|
72
|
-
)
|
|
73
|
-
) {
|
|
74
|
-
const column = line.length - trailingSpaces + 1;
|
|
75
|
-
addError(
|
|
76
|
-
onError,
|
|
77
|
-
lineNumber,
|
|
78
|
-
"Expected: " + (expected === 0 ? "" : "0 or ") +
|
|
79
|
-
expected + "; Actual: " + trailingSpaces,
|
|
80
|
-
undefined,
|
|
81
|
-
[ column, trailingSpaces ],
|
|
82
|
-
{
|
|
83
|
-
"editColumn": column,
|
|
84
|
-
"deleteCount": trailingSpaces
|
|
85
|
-
});
|
|
86
|
-
}
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
|
-
};
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
// @ts-check
|
|
2
|
-
|
|
3
|
-
"use strict";
|
|
4
|
-
|
|
5
|
-
const { addError, filterTokens, forEachLine, withinAnyRange } =
|
|
6
|
-
require("../helpers");
|
|
7
|
-
const { codeBlockAndSpanRanges, lineMetadata } = require("./cache");
|
|
8
|
-
|
|
9
|
-
const tabRe = /\t+/g;
|
|
10
|
-
|
|
11
|
-
// eslint-disable-next-line jsdoc/valid-types
|
|
12
|
-
/** @type import("./markdownlint").Rule */
|
|
13
|
-
module.exports = {
|
|
14
|
-
"names": [ "MD010", "no-hard-tabs" ],
|
|
15
|
-
"description": "Hard tabs",
|
|
16
|
-
"tags": [ "whitespace", "hard_tab" ],
|
|
17
|
-
"parser": "markdownit",
|
|
18
|
-
"function": function MD010(params, onError) {
|
|
19
|
-
const codeBlocks = params.config.code_blocks;
|
|
20
|
-
const includeCode = (codeBlocks === undefined) ? true : !!codeBlocks;
|
|
21
|
-
const ignoreCodeLanguages = new Set(
|
|
22
|
-
(params.config.ignore_code_languages || [])
|
|
23
|
-
.map((language) => language.toLowerCase())
|
|
24
|
-
);
|
|
25
|
-
const spacesPerTab = params.config.spaces_per_tab;
|
|
26
|
-
const spaceMultiplier = (spacesPerTab === undefined) ?
|
|
27
|
-
1 :
|
|
28
|
-
Math.max(0, Number(spacesPerTab));
|
|
29
|
-
const exclusions = includeCode ? [] : codeBlockAndSpanRanges();
|
|
30
|
-
filterTokens(params, "fence", (token) => {
|
|
31
|
-
const language = token.info.trim().toLowerCase();
|
|
32
|
-
if (ignoreCodeLanguages.has(language)) {
|
|
33
|
-
for (let i = token.map[0] + 1; i < token.map[1] - 1; i++) {
|
|
34
|
-
exclusions.push([ i, 0, params.lines[i].length ]);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
forEachLine(lineMetadata(), (line, lineIndex, inCode) => {
|
|
39
|
-
if (includeCode || !inCode) {
|
|
40
|
-
let match = null;
|
|
41
|
-
while ((match = tabRe.exec(line)) !== null) {
|
|
42
|
-
const { index } = match;
|
|
43
|
-
const column = index + 1;
|
|
44
|
-
const length = match[0].length;
|
|
45
|
-
if (!withinAnyRange(exclusions, lineIndex, index, length)) {
|
|
46
|
-
addError(
|
|
47
|
-
onError,
|
|
48
|
-
lineIndex + 1,
|
|
49
|
-
"Column: " + column,
|
|
50
|
-
undefined,
|
|
51
|
-
[ column, length ],
|
|
52
|
-
{
|
|
53
|
-
"editColumn": column,
|
|
54
|
-
"deleteCount": length,
|
|
55
|
-
"insertText": "".padEnd(length * spaceMultiplier)
|
|
56
|
-
}
|
|
57
|
-
);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
};
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
// @ts-check
|
|
2
|
-
|
|
3
|
-
"use strict";
|
|
4
|
-
|
|
5
|
-
const { addError, forEachLine, withinAnyRange } = require("../helpers");
|
|
6
|
-
const { codeBlockAndSpanRanges, lineMetadata } = require("./cache");
|
|
7
|
-
|
|
8
|
-
const reversedLinkRe =
|
|
9
|
-
/(^|[^\\])\(([^()]+)\)\[([^\]^][^\]]*)\](?!\()/g;
|
|
10
|
-
|
|
11
|
-
// eslint-disable-next-line jsdoc/valid-types
|
|
12
|
-
/** @type import("./markdownlint").Rule */
|
|
13
|
-
module.exports = {
|
|
14
|
-
"names": [ "MD011", "no-reversed-links" ],
|
|
15
|
-
"description": "Reversed link syntax",
|
|
16
|
-
"tags": [ "links" ],
|
|
17
|
-
"parser": "none",
|
|
18
|
-
"function": function MD011(params, onError) {
|
|
19
|
-
const exclusions = codeBlockAndSpanRanges();
|
|
20
|
-
forEachLine(lineMetadata(), (line, lineIndex, inCode, onFence) => {
|
|
21
|
-
if (!inCode && !onFence) {
|
|
22
|
-
let match = null;
|
|
23
|
-
while ((match = reversedLinkRe.exec(line)) !== null) {
|
|
24
|
-
const [ reversedLink, preChar, linkText, linkDestination ] = match;
|
|
25
|
-
const index = match.index + preChar.length;
|
|
26
|
-
const length = match[0].length - preChar.length;
|
|
27
|
-
if (
|
|
28
|
-
!linkText.endsWith("\\") &&
|
|
29
|
-
!linkDestination.endsWith("\\") &&
|
|
30
|
-
!withinAnyRange(exclusions, lineIndex, index, length)
|
|
31
|
-
) {
|
|
32
|
-
addError(
|
|
33
|
-
onError,
|
|
34
|
-
lineIndex + 1,
|
|
35
|
-
reversedLink.slice(preChar.length),
|
|
36
|
-
undefined,
|
|
37
|
-
[ index + 1, length ],
|
|
38
|
-
{
|
|
39
|
-
"editColumn": index + 1,
|
|
40
|
-
"deleteCount": length,
|
|
41
|
-
"insertText": `[${linkText}](${linkDestination})`
|
|
42
|
-
}
|
|
43
|
-
);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
};
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
// @ts-check
|
|
2
|
-
|
|
3
|
-
"use strict";
|
|
4
|
-
|
|
5
|
-
const { addErrorDetailIf, forEachLine } = require("../helpers");
|
|
6
|
-
const { lineMetadata } = require("./cache");
|
|
7
|
-
|
|
8
|
-
// eslint-disable-next-line jsdoc/valid-types
|
|
9
|
-
/** @type import("./markdownlint").Rule */
|
|
10
|
-
module.exports = {
|
|
11
|
-
"names": [ "MD012", "no-multiple-blanks" ],
|
|
12
|
-
"description": "Multiple consecutive blank lines",
|
|
13
|
-
"tags": [ "whitespace", "blank_lines" ],
|
|
14
|
-
"parser": "none",
|
|
15
|
-
"function": function MD012(params, onError) {
|
|
16
|
-
const maximum = Number(params.config.maximum || 1);
|
|
17
|
-
let count = 0;
|
|
18
|
-
forEachLine(lineMetadata(), (line, lineIndex, inCode) => {
|
|
19
|
-
count = (inCode || (line.trim().length > 0)) ? 0 : count + 1;
|
|
20
|
-
if (maximum < count) {
|
|
21
|
-
addErrorDetailIf(
|
|
22
|
-
onError,
|
|
23
|
-
lineIndex + 1,
|
|
24
|
-
maximum,
|
|
25
|
-
count,
|
|
26
|
-
null,
|
|
27
|
-
null,
|
|
28
|
-
null,
|
|
29
|
-
{
|
|
30
|
-
"deleteCount": -1
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
};
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
// @ts-check
|
|
2
|
-
|
|
3
|
-
"use strict";
|
|
4
|
-
|
|
5
|
-
const { addErrorDetailIf, filterTokens, forEachHeading, forEachLine,
|
|
6
|
-
includesSorted } = require("../helpers");
|
|
7
|
-
const { lineMetadata, referenceLinkImageData } = require("./cache");
|
|
8
|
-
|
|
9
|
-
const longLineRePrefix = "^.{";
|
|
10
|
-
const longLineRePostfixRelaxed = "}.*\\s.*$";
|
|
11
|
-
const longLineRePostfixStrict = "}.+$";
|
|
12
|
-
const linkOrImageOnlyLineRe = /^[es]*(?:lT?L|I)[ES]*$/;
|
|
13
|
-
const sternModeRe = /^(?:[#>\s]*\s)?\S*$/;
|
|
14
|
-
const tokenTypeMap = {
|
|
15
|
-
"em_open": "e",
|
|
16
|
-
"em_close": "E",
|
|
17
|
-
"image": "I",
|
|
18
|
-
"link_open": "l",
|
|
19
|
-
"link_close": "L",
|
|
20
|
-
"strong_open": "s",
|
|
21
|
-
"strong_close": "S",
|
|
22
|
-
"text": "T"
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
// eslint-disable-next-line jsdoc/valid-types
|
|
26
|
-
/** @type import("./markdownlint").Rule */
|
|
27
|
-
module.exports = {
|
|
28
|
-
"names": [ "MD013", "line-length" ],
|
|
29
|
-
"description": "Line length",
|
|
30
|
-
"tags": [ "line_length" ],
|
|
31
|
-
"parser": "markdownit",
|
|
32
|
-
"function": function MD013(params, onError) {
|
|
33
|
-
const lineLength = Number(params.config.line_length || 80);
|
|
34
|
-
const headingLineLength =
|
|
35
|
-
Number(params.config.heading_line_length || lineLength);
|
|
36
|
-
const codeLineLength =
|
|
37
|
-
Number(params.config.code_block_line_length || lineLength);
|
|
38
|
-
const strict = !!params.config.strict;
|
|
39
|
-
const stern = !!params.config.stern;
|
|
40
|
-
const longLineRePostfix =
|
|
41
|
-
(strict || stern) ? longLineRePostfixStrict : longLineRePostfixRelaxed;
|
|
42
|
-
const longLineRe =
|
|
43
|
-
new RegExp(longLineRePrefix + lineLength + longLineRePostfix);
|
|
44
|
-
const longHeadingLineRe =
|
|
45
|
-
new RegExp(longLineRePrefix + headingLineLength + longLineRePostfix);
|
|
46
|
-
const longCodeLineRe =
|
|
47
|
-
new RegExp(longLineRePrefix + codeLineLength + longLineRePostfix);
|
|
48
|
-
const codeBlocks = params.config.code_blocks;
|
|
49
|
-
const includeCodeBlocks = (codeBlocks === undefined) ? true : !!codeBlocks;
|
|
50
|
-
const tables = params.config.tables;
|
|
51
|
-
const includeTables = (tables === undefined) ? true : !!tables;
|
|
52
|
-
const headings = params.config.headings;
|
|
53
|
-
const includeHeadings = (headings === undefined) ? true : !!headings;
|
|
54
|
-
const headingLineNumbers = [];
|
|
55
|
-
forEachHeading(params, (heading) => {
|
|
56
|
-
headingLineNumbers.push(heading.lineNumber);
|
|
57
|
-
});
|
|
58
|
-
const linkOnlyLineNumbers = [];
|
|
59
|
-
filterTokens(params, "inline", (token) => {
|
|
60
|
-
let childTokenTypes = "";
|
|
61
|
-
for (const child of token.children) {
|
|
62
|
-
if (child.type !== "text" || child.content !== "") {
|
|
63
|
-
childTokenTypes += tokenTypeMap[child.type] || "x";
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
if (linkOrImageOnlyLineRe.test(childTokenTypes)) {
|
|
67
|
-
linkOnlyLineNumbers.push(token.lineNumber);
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
const { definitionLineIndices } = referenceLinkImageData();
|
|
71
|
-
forEachLine(lineMetadata(), (line, lineIndex, inCode, onFence, inTable) => {
|
|
72
|
-
const lineNumber = lineIndex + 1;
|
|
73
|
-
const isHeading = includesSorted(headingLineNumbers, lineNumber);
|
|
74
|
-
const length = inCode ?
|
|
75
|
-
codeLineLength :
|
|
76
|
-
(isHeading ? headingLineLength : lineLength);
|
|
77
|
-
const lengthRe = inCode ?
|
|
78
|
-
longCodeLineRe :
|
|
79
|
-
(isHeading ? longHeadingLineRe : longLineRe);
|
|
80
|
-
if ((includeCodeBlocks || !inCode) &&
|
|
81
|
-
(includeTables || !inTable) &&
|
|
82
|
-
(includeHeadings || !isHeading) &&
|
|
83
|
-
!includesSorted(definitionLineIndices, lineIndex) &&
|
|
84
|
-
(strict ||
|
|
85
|
-
(!(stern && sternModeRe.test(line)) &&
|
|
86
|
-
!includesSorted(linkOnlyLineNumbers, lineNumber))) &&
|
|
87
|
-
lengthRe.test(line)) {
|
|
88
|
-
addErrorDetailIf(
|
|
89
|
-
onError,
|
|
90
|
-
lineNumber,
|
|
91
|
-
length,
|
|
92
|
-
line.length,
|
|
93
|
-
null,
|
|
94
|
-
null,
|
|
95
|
-
[ length + 1, line.length - length ]);
|
|
96
|
-
}
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
};
|