@alexlit/lint-kit 112.3.2 → 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/scripts/release.sh +4 -2
- 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,108 +0,0 @@
|
|
|
1
|
-
// @ts-check
|
|
2
|
-
|
|
3
|
-
"use strict";
|
|
4
|
-
|
|
5
|
-
const { addError, emphasisOrStrongStyleFor } = require("../helpers");
|
|
6
|
-
const { filterByPredicate, tokenIfType } = require("../helpers/micromark.cjs");
|
|
7
|
-
|
|
8
|
-
const intrawordRe = /^\w$/;
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* @param {import("./markdownlint").RuleParams} params Rule parameters.
|
|
12
|
-
* @param {import("./markdownlint").RuleOnError} onError Error-reporting callback.
|
|
13
|
-
* @param {import("markdownlint-micromark").TokenType} type Token type.
|
|
14
|
-
* @param {import("markdownlint-micromark").TokenType} typeSequence Token sequence type.
|
|
15
|
-
* @param {"*" | "**"} asterisk Asterisk kind.
|
|
16
|
-
* @param {"_" | "__"} underline Underline kind.
|
|
17
|
-
* @param {"asterisk" | "consistent" | "underscore"} style Style string.
|
|
18
|
-
*/
|
|
19
|
-
const impl =
|
|
20
|
-
(params, onError, type, typeSequence, asterisk, underline, style = "consistent") => {
|
|
21
|
-
// eslint-disable-next-line jsdoc/valid-types
|
|
22
|
-
/** @type import("../helpers/micromark.cjs").Token[] */
|
|
23
|
-
const micromarkTokens =
|
|
24
|
-
// @ts-ignore
|
|
25
|
-
params.parsers.micromark.tokens;
|
|
26
|
-
const { lines } = params;
|
|
27
|
-
const emphasisTokens = filterByPredicate(
|
|
28
|
-
micromarkTokens,
|
|
29
|
-
(token) => token.type === type,
|
|
30
|
-
(token) => ((token.type === "htmlFlow") ? [] : token.children)
|
|
31
|
-
);
|
|
32
|
-
for (const token of emphasisTokens) {
|
|
33
|
-
const { children } = token;
|
|
34
|
-
const startSequence = tokenIfType(children[0], typeSequence);
|
|
35
|
-
const endSequence = tokenIfType(children[children.length - 1], typeSequence);
|
|
36
|
-
if (startSequence && endSequence) {
|
|
37
|
-
const markupStyle = emphasisOrStrongStyleFor(startSequence.text);
|
|
38
|
-
if (style === "consistent") {
|
|
39
|
-
style = markupStyle;
|
|
40
|
-
}
|
|
41
|
-
if (style !== markupStyle) {
|
|
42
|
-
const underscoreIntraword = (style === "underscore") && (
|
|
43
|
-
intrawordRe.test(
|
|
44
|
-
lines[startSequence.startLine - 1][startSequence.startColumn - 2]
|
|
45
|
-
) ||
|
|
46
|
-
intrawordRe.test(
|
|
47
|
-
lines[endSequence.endLine - 1][endSequence.endColumn - 1]
|
|
48
|
-
)
|
|
49
|
-
);
|
|
50
|
-
if (!underscoreIntraword) {
|
|
51
|
-
for (const sequence of [ startSequence, endSequence ]) {
|
|
52
|
-
addError(
|
|
53
|
-
onError,
|
|
54
|
-
sequence.startLine,
|
|
55
|
-
`Expected: ${style}; Actual: ${markupStyle}`,
|
|
56
|
-
undefined,
|
|
57
|
-
[ sequence.startColumn, sequence.text.length ],
|
|
58
|
-
{
|
|
59
|
-
"editColumn": sequence.startColumn,
|
|
60
|
-
"deleteCount": sequence.text.length,
|
|
61
|
-
"insertText": (style === "asterisk") ? asterisk : underline
|
|
62
|
-
}
|
|
63
|
-
);
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
// eslint-disable-next-line jsdoc/valid-types
|
|
72
|
-
/** @type import("./markdownlint").Rule[] */
|
|
73
|
-
module.exports = [
|
|
74
|
-
{
|
|
75
|
-
"names": [ "MD049", "emphasis-style" ],
|
|
76
|
-
"description": "Emphasis style",
|
|
77
|
-
"tags": [ "emphasis" ],
|
|
78
|
-
"parser": "micromark",
|
|
79
|
-
"function": function MD049(params, onError) {
|
|
80
|
-
return impl(
|
|
81
|
-
params,
|
|
82
|
-
onError,
|
|
83
|
-
"emphasis",
|
|
84
|
-
"emphasisSequence",
|
|
85
|
-
"*",
|
|
86
|
-
"_",
|
|
87
|
-
params.config.style || undefined
|
|
88
|
-
);
|
|
89
|
-
}
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
"names": [ "MD050", "strong-style" ],
|
|
93
|
-
"description": "Strong style",
|
|
94
|
-
"tags": [ "emphasis" ],
|
|
95
|
-
"parser": "micromark",
|
|
96
|
-
"function": function MD050(params, onError) {
|
|
97
|
-
return impl(
|
|
98
|
-
params,
|
|
99
|
-
onError,
|
|
100
|
-
"strong",
|
|
101
|
-
"strongSequence",
|
|
102
|
-
"**",
|
|
103
|
-
"__",
|
|
104
|
-
params.config.style || undefined
|
|
105
|
-
);
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
];
|
|
@@ -1,176 +0,0 @@
|
|
|
1
|
-
// @ts-check
|
|
2
|
-
|
|
3
|
-
"use strict";
|
|
4
|
-
|
|
5
|
-
const { addError, addErrorDetailIf, getHtmlAttributeRe } =
|
|
6
|
-
require("../helpers");
|
|
7
|
-
const { filterByPredicate, filterByTypes, getHtmlTagInfo } =
|
|
8
|
-
require("../helpers/micromark.cjs");
|
|
9
|
-
|
|
10
|
-
// Regular expression for identifying HTML anchor names
|
|
11
|
-
const idRe = getHtmlAttributeRe("id");
|
|
12
|
-
const nameRe = getHtmlAttributeRe("name");
|
|
13
|
-
const anchorRe = /\{(#[a-z\d]+(?:[-_][a-z\d]+)*)\}/gu;
|
|
14
|
-
const lineFragmentRe = /^#(?:L\d+(?:C\d+)?-L\d+(?:C\d+)?|L\d+)$/;
|
|
15
|
-
|
|
16
|
-
// Sets for filtering heading tokens during conversion
|
|
17
|
-
const childrenExclude = new Set([ "image", "reference", "resource" ]);
|
|
18
|
-
const tokensInclude = new Set(
|
|
19
|
-
[ "characterEscapeValue", "codeTextData", "data", "mathTextData" ]
|
|
20
|
-
);
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Converts a Markdown heading into an HTML fragment according to the rules
|
|
24
|
-
* used by GitHub.
|
|
25
|
-
*
|
|
26
|
-
* @param {import("../helpers/micromark.cjs").Token} headingText Heading text token.
|
|
27
|
-
* @returns {string} Fragment string for heading.
|
|
28
|
-
*/
|
|
29
|
-
function convertHeadingToHTMLFragment(headingText) {
|
|
30
|
-
const inlineText =
|
|
31
|
-
filterByPredicate(
|
|
32
|
-
headingText.children,
|
|
33
|
-
(token) => tokensInclude.has(token.type),
|
|
34
|
-
(token) => (childrenExclude.has(token.type) ? [] : token.children)
|
|
35
|
-
)
|
|
36
|
-
.map((token) => token.text)
|
|
37
|
-
.join("");
|
|
38
|
-
return "#" + encodeURIComponent(
|
|
39
|
-
inlineText
|
|
40
|
-
.toLowerCase()
|
|
41
|
-
// RegExp source with Ruby's \p{Word} expanded into its General Categories
|
|
42
|
-
// https://github.com/gjtorikian/html-pipeline/blob/main/lib/html/pipeline/toc_filter.rb
|
|
43
|
-
// https://ruby-doc.org/core-3.0.2/Regexp.html
|
|
44
|
-
.replace(
|
|
45
|
-
/[^\p{Letter}\p{Mark}\p{Number}\p{Connector_Punctuation}\- ]/gu,
|
|
46
|
-
""
|
|
47
|
-
)
|
|
48
|
-
.replace(/ /gu, "-")
|
|
49
|
-
);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* Unescapes the text of a String-type micromark Token.
|
|
54
|
-
*
|
|
55
|
-
* @param {import("../helpers/micromark.cjs").Token} token String-type micromark Token.
|
|
56
|
-
* @returns {string} Unescaped token text.
|
|
57
|
-
*/
|
|
58
|
-
function unescapeStringTokenText(token) {
|
|
59
|
-
return filterByTypes(token.children, [ "characterEscapeValue", "data" ])
|
|
60
|
-
.map((child) => child.text)
|
|
61
|
-
.join("");
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
// eslint-disable-next-line jsdoc/valid-types
|
|
65
|
-
/** @type import("./markdownlint").Rule */
|
|
66
|
-
module.exports = {
|
|
67
|
-
"names": [ "MD051", "link-fragments" ],
|
|
68
|
-
"description": "Link fragments should be valid",
|
|
69
|
-
"tags": [ "links" ],
|
|
70
|
-
"parser": "micromark",
|
|
71
|
-
"function": function MD051(params, onError) {
|
|
72
|
-
// eslint-disable-next-line jsdoc/valid-types
|
|
73
|
-
/** @type import("../helpers/micromark.cjs").Token[] */
|
|
74
|
-
const micromarkTokens =
|
|
75
|
-
// @ts-ignore
|
|
76
|
-
params.parsers.micromark.tokens;
|
|
77
|
-
const fragments = new Map();
|
|
78
|
-
|
|
79
|
-
// Process headings
|
|
80
|
-
const headingTexts = filterByTypes(micromarkTokens, [ "atxHeadingText", "setextHeadingText" ]);
|
|
81
|
-
for (const headingText of headingTexts) {
|
|
82
|
-
const fragment = convertHeadingToHTMLFragment(headingText);
|
|
83
|
-
if (fragment !== "#") {
|
|
84
|
-
const count = fragments.get(fragment) || 0;
|
|
85
|
-
if (count) {
|
|
86
|
-
fragments.set(`${fragment}-${count}`, 0);
|
|
87
|
-
}
|
|
88
|
-
fragments.set(fragment, count + 1);
|
|
89
|
-
let match = null;
|
|
90
|
-
while ((match = anchorRe.exec(headingText.text)) !== null) {
|
|
91
|
-
const [ , anchor ] = match;
|
|
92
|
-
if (!fragments.has(anchor)) {
|
|
93
|
-
fragments.set(anchor, 1);
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
// Process HTML anchors
|
|
100
|
-
for (const token of filterByTypes(micromarkTokens, [ "htmlText" ])) {
|
|
101
|
-
const htmlTagInfo = getHtmlTagInfo(token);
|
|
102
|
-
if (htmlTagInfo && !htmlTagInfo.close) {
|
|
103
|
-
const anchorMatch = idRe.exec(token.text) ||
|
|
104
|
-
(htmlTagInfo.name.toLowerCase() === "a" && nameRe.exec(token.text));
|
|
105
|
-
if (anchorMatch && anchorMatch.length > 0) {
|
|
106
|
-
fragments.set(`#${anchorMatch[1]}`, 0);
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
// Process link and definition fragments
|
|
112
|
-
// eslint-disable-next-line jsdoc/valid-types
|
|
113
|
-
/** @type import("../helpers/micromark.cjs").TokenType[][] */
|
|
114
|
-
const parentChilds = [
|
|
115
|
-
[ "link", "resourceDestinationString" ],
|
|
116
|
-
[ "definition", "definitionDestinationString" ]
|
|
117
|
-
];
|
|
118
|
-
for (const [ parentType, definitionType ] of parentChilds) {
|
|
119
|
-
const links = filterByTypes(micromarkTokens, [ parentType ]);
|
|
120
|
-
for (const link of links) {
|
|
121
|
-
const definitions = filterByTypes(link.children, [ definitionType ]);
|
|
122
|
-
for (const definition of definitions) {
|
|
123
|
-
const { endColumn, startColumn } = definition;
|
|
124
|
-
const text = unescapeStringTokenText(definition);
|
|
125
|
-
const encodedText = `#${encodeURIComponent(text.slice(1))}`;
|
|
126
|
-
if (
|
|
127
|
-
(text.length > 1) &&
|
|
128
|
-
text.startsWith("#") &&
|
|
129
|
-
!fragments.has(encodedText) &&
|
|
130
|
-
!lineFragmentRe.test(encodedText)
|
|
131
|
-
) {
|
|
132
|
-
// eslint-disable-next-line no-undef-init
|
|
133
|
-
let context = undefined;
|
|
134
|
-
// eslint-disable-next-line no-undef-init
|
|
135
|
-
let range = undefined;
|
|
136
|
-
// eslint-disable-next-line no-undef-init
|
|
137
|
-
let fixInfo = undefined;
|
|
138
|
-
if (link.startLine === link.endLine) {
|
|
139
|
-
context = link.text;
|
|
140
|
-
range = [ link.startColumn, link.endColumn - link.startColumn ];
|
|
141
|
-
fixInfo = {
|
|
142
|
-
"editColumn": startColumn,
|
|
143
|
-
"deleteCount": endColumn - startColumn
|
|
144
|
-
};
|
|
145
|
-
}
|
|
146
|
-
const textLower = text.toLowerCase();
|
|
147
|
-
const mixedCaseKey = [ ...fragments.keys() ]
|
|
148
|
-
.find((key) => textLower === key.toLowerCase());
|
|
149
|
-
if (mixedCaseKey) {
|
|
150
|
-
// @ts-ignore
|
|
151
|
-
(fixInfo || {}).insertText = mixedCaseKey;
|
|
152
|
-
addErrorDetailIf(
|
|
153
|
-
onError,
|
|
154
|
-
link.startLine,
|
|
155
|
-
mixedCaseKey,
|
|
156
|
-
text,
|
|
157
|
-
undefined,
|
|
158
|
-
context,
|
|
159
|
-
range,
|
|
160
|
-
fixInfo
|
|
161
|
-
);
|
|
162
|
-
} else {
|
|
163
|
-
addError(
|
|
164
|
-
onError,
|
|
165
|
-
link.startLine,
|
|
166
|
-
undefined,
|
|
167
|
-
context,
|
|
168
|
-
range
|
|
169
|
-
);
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
};
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
// @ts-check
|
|
2
|
-
|
|
3
|
-
"use strict";
|
|
4
|
-
|
|
5
|
-
const { addError } = require("../helpers");
|
|
6
|
-
const { referenceLinkImageData } = require("./cache");
|
|
7
|
-
|
|
8
|
-
// eslint-disable-next-line jsdoc/valid-types
|
|
9
|
-
/** @type import("./markdownlint").Rule */
|
|
10
|
-
module.exports = {
|
|
11
|
-
"names": [ "MD052", "reference-links-images" ],
|
|
12
|
-
"description":
|
|
13
|
-
"Reference links and images should use a label that is defined",
|
|
14
|
-
"tags": [ "images", "links" ],
|
|
15
|
-
"parser": "none",
|
|
16
|
-
"function": function MD052(params, onError) {
|
|
17
|
-
const { config, lines } = params;
|
|
18
|
-
const shortcutSyntax = config.shortcut_syntax || false;
|
|
19
|
-
const { definitions, references, shortcuts } = referenceLinkImageData();
|
|
20
|
-
const entries = shortcutSyntax ?
|
|
21
|
-
[ ...references.entries(), ...shortcuts.entries() ] :
|
|
22
|
-
references.entries();
|
|
23
|
-
// Look for links/images that use an undefined link reference
|
|
24
|
-
for (const reference of entries) {
|
|
25
|
-
const [ label, datas ] = reference;
|
|
26
|
-
if (!definitions.has(label)) {
|
|
27
|
-
for (const data of datas) {
|
|
28
|
-
const [ lineIndex, index, length ] = data;
|
|
29
|
-
// Context will be incomplete if reporting for a multi-line link
|
|
30
|
-
const context = lines[lineIndex].slice(index, index + length);
|
|
31
|
-
addError(
|
|
32
|
-
onError,
|
|
33
|
-
lineIndex + 1,
|
|
34
|
-
`Missing link or image reference definition: "${label}"`,
|
|
35
|
-
context,
|
|
36
|
-
[ index + 1, context.length ]
|
|
37
|
-
);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
};
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
// @ts-check
|
|
2
|
-
|
|
3
|
-
"use strict";
|
|
4
|
-
|
|
5
|
-
const { addError, ellipsify, linkReferenceDefinitionRe } =
|
|
6
|
-
require("../helpers");
|
|
7
|
-
const { referenceLinkImageData } = require("./cache");
|
|
8
|
-
|
|
9
|
-
// eslint-disable-next-line jsdoc/valid-types
|
|
10
|
-
/** @type import("./markdownlint").Rule */
|
|
11
|
-
module.exports = {
|
|
12
|
-
"names": [ "MD053", "link-image-reference-definitions" ],
|
|
13
|
-
"description": "Link and image reference definitions should be needed",
|
|
14
|
-
"tags": [ "images", "links" ],
|
|
15
|
-
"parser": "none",
|
|
16
|
-
"function": function MD053(params, onError) {
|
|
17
|
-
const ignored = new Set(params.config.ignored_definitions || [ "//" ]);
|
|
18
|
-
const lines = params.lines;
|
|
19
|
-
const { references, shortcuts, definitions, duplicateDefinitions } =
|
|
20
|
-
referenceLinkImageData();
|
|
21
|
-
const singleLineDefinition = (line) => (
|
|
22
|
-
line.replace(linkReferenceDefinitionRe, "").trim().length > 0
|
|
23
|
-
);
|
|
24
|
-
const deleteFixInfo = {
|
|
25
|
-
"deleteCount": -1
|
|
26
|
-
};
|
|
27
|
-
// Look for unused link references (unreferenced by any link/image)
|
|
28
|
-
for (const definition of definitions.entries()) {
|
|
29
|
-
const [ label, [ lineIndex ] ] = definition;
|
|
30
|
-
if (
|
|
31
|
-
!ignored.has(label) &&
|
|
32
|
-
!references.has(label) &&
|
|
33
|
-
!shortcuts.has(label)
|
|
34
|
-
) {
|
|
35
|
-
const line = lines[lineIndex];
|
|
36
|
-
addError(
|
|
37
|
-
onError,
|
|
38
|
-
lineIndex + 1,
|
|
39
|
-
`Unused link or image reference definition: "${label}"`,
|
|
40
|
-
ellipsify(line),
|
|
41
|
-
[ 1, line.length ],
|
|
42
|
-
singleLineDefinition(line) ? deleteFixInfo : 0
|
|
43
|
-
);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
// Look for duplicate link references (defined more than once)
|
|
47
|
-
for (const duplicateDefinition of duplicateDefinitions) {
|
|
48
|
-
const [ label, lineIndex ] = duplicateDefinition;
|
|
49
|
-
if (!ignored.has(label)) {
|
|
50
|
-
const line = lines[lineIndex];
|
|
51
|
-
addError(
|
|
52
|
-
onError,
|
|
53
|
-
lineIndex + 1,
|
|
54
|
-
`Duplicate link or image reference definition: "${label}"`,
|
|
55
|
-
ellipsify(line),
|
|
56
|
-
[ 1, line.length ],
|
|
57
|
-
singleLineDefinition(line) ? deleteFixInfo : 0
|
|
58
|
-
);
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
};
|
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
// @ts-check
|
|
2
|
-
|
|
3
|
-
"use strict";
|
|
4
|
-
|
|
5
|
-
const { addErrorContext, nextLinesRe } = require("../helpers");
|
|
6
|
-
const { filterByTypes, filterByPredicate, getTokenTextByType } =
|
|
7
|
-
require("../helpers/micromark.cjs");
|
|
8
|
-
const { referenceLinkImageData } = require("./cache");
|
|
9
|
-
|
|
10
|
-
const backslashEscapeRe = /\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g;
|
|
11
|
-
const removeBackslashEscapes = (text) => text.replace(backslashEscapeRe, "$1");
|
|
12
|
-
const autolinkDisallowedRe = /[ <>]/;
|
|
13
|
-
const autolinkAble = (destination) => {
|
|
14
|
-
try {
|
|
15
|
-
// eslint-disable-next-line no-new
|
|
16
|
-
new URL(destination);
|
|
17
|
-
} catch {
|
|
18
|
-
// Not an absolute URL
|
|
19
|
-
return false;
|
|
20
|
-
}
|
|
21
|
-
return !autolinkDisallowedRe.test(destination);
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
// eslint-disable-next-line jsdoc/valid-types
|
|
25
|
-
/** @type import("./markdownlint").Rule */
|
|
26
|
-
module.exports = {
|
|
27
|
-
"names": [ "MD054", "link-image-style" ],
|
|
28
|
-
"description": "Link and image style",
|
|
29
|
-
"tags": [ "images", "links" ],
|
|
30
|
-
"parser": "micromark",
|
|
31
|
-
"function": (params, onError) => {
|
|
32
|
-
const config = params.config;
|
|
33
|
-
const autolink = (config.autolink === undefined) || !!config.autolink;
|
|
34
|
-
const inline = (config.inline === undefined) || !!config.inline;
|
|
35
|
-
const full = (config.full === undefined) || !!config.full;
|
|
36
|
-
const collapsed = (config.collapsed === undefined) || !!config.collapsed;
|
|
37
|
-
const shortcut = (config.shortcut === undefined) || !!config.shortcut;
|
|
38
|
-
const urlInline = (config.url_inline === undefined) || !!config.url_inline;
|
|
39
|
-
if (autolink && inline && full && collapsed && shortcut && urlInline) {
|
|
40
|
-
// Everything allowed, nothing to check
|
|
41
|
-
return;
|
|
42
|
-
}
|
|
43
|
-
// eslint-disable-next-line jsdoc/valid-types
|
|
44
|
-
/** @type import("../helpers/micromark.cjs").Token[] */
|
|
45
|
-
const micromarkTokens =
|
|
46
|
-
// @ts-ignore
|
|
47
|
-
params.parsers.micromark.tokens;
|
|
48
|
-
const { definitions } = referenceLinkImageData();
|
|
49
|
-
const links = filterByTypes(micromarkTokens, [ "autolink", "image", "link" ]);
|
|
50
|
-
for (const link of links) {
|
|
51
|
-
let label = null;
|
|
52
|
-
let destination = null;
|
|
53
|
-
const {
|
|
54
|
-
children, endColumn, endLine, startColumn, startLine, text, type
|
|
55
|
-
} = link;
|
|
56
|
-
const image = (type === "image");
|
|
57
|
-
let isError = false;
|
|
58
|
-
if (type === "autolink") {
|
|
59
|
-
// link kind is an autolink
|
|
60
|
-
destination = getTokenTextByType(children, "autolinkProtocol");
|
|
61
|
-
label = destination;
|
|
62
|
-
isError = !autolink;
|
|
63
|
-
} else {
|
|
64
|
-
// link type is "image" or "link"
|
|
65
|
-
const descendents = filterByPredicate(children);
|
|
66
|
-
label = getTokenTextByType(descendents, "labelText");
|
|
67
|
-
destination =
|
|
68
|
-
getTokenTextByType(descendents, "resourceDestinationString");
|
|
69
|
-
if (destination) {
|
|
70
|
-
// link kind is an inline link
|
|
71
|
-
const title = getTokenTextByType(descendents, "resourceTitleString");
|
|
72
|
-
isError = !inline || (
|
|
73
|
-
!urlInline &&
|
|
74
|
-
autolink &&
|
|
75
|
-
!image &&
|
|
76
|
-
!title &&
|
|
77
|
-
(label === destination) &&
|
|
78
|
-
autolinkAble(destination)
|
|
79
|
-
);
|
|
80
|
-
} else {
|
|
81
|
-
// link kind is a full/collapsed/shortcut reference link
|
|
82
|
-
const isShortcut = !children.some((t) => t.type === "reference");
|
|
83
|
-
const referenceString = getTokenTextByType(descendents, "referenceString");
|
|
84
|
-
const isCollapsed = (referenceString === null);
|
|
85
|
-
const definition = definitions.get(referenceString || label);
|
|
86
|
-
destination = definition && definition[1];
|
|
87
|
-
isError = destination &&
|
|
88
|
-
(isShortcut ? !shortcut : (isCollapsed ? !collapsed : !full));
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
if (isError) {
|
|
92
|
-
let range = null;
|
|
93
|
-
let fixInfo = null;
|
|
94
|
-
if (startLine === endLine) {
|
|
95
|
-
range = [ startColumn, endColumn - startColumn ];
|
|
96
|
-
let insertText = null;
|
|
97
|
-
const canInline = (inline && label);
|
|
98
|
-
const canAutolink = (autolink && !image && autolinkAble(destination));
|
|
99
|
-
if (canInline && (urlInline || !canAutolink)) {
|
|
100
|
-
// Most useful form
|
|
101
|
-
const prefix = (image ? "!" : "");
|
|
102
|
-
// @ts-ignore
|
|
103
|
-
const escapedLabel = label.replace(/[[\]]/g, "\\$&");
|
|
104
|
-
const escapedDestination = destination.replace(/[()]/g, "\\$&");
|
|
105
|
-
insertText = `${prefix}[${escapedLabel}](${escapedDestination})`;
|
|
106
|
-
} else if (canAutolink) {
|
|
107
|
-
// Simplest form
|
|
108
|
-
insertText = `<${removeBackslashEscapes(destination)}>`;
|
|
109
|
-
}
|
|
110
|
-
if (insertText) {
|
|
111
|
-
fixInfo = {
|
|
112
|
-
"editColumn": range[0],
|
|
113
|
-
insertText,
|
|
114
|
-
"deleteCount": range[1]
|
|
115
|
-
};
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
addErrorContext(
|
|
119
|
-
onError,
|
|
120
|
-
startLine,
|
|
121
|
-
text.replace(nextLinesRe, ""),
|
|
122
|
-
null,
|
|
123
|
-
null,
|
|
124
|
-
range,
|
|
125
|
-
fixInfo
|
|
126
|
-
);
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
};
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
// @ts-check
|
|
2
|
-
|
|
3
|
-
"use strict";
|
|
4
|
-
|
|
5
|
-
const { addErrorDetailIf } = require("../helpers");
|
|
6
|
-
const { filterByTypes } = require("../helpers/micromark.cjs");
|
|
7
|
-
|
|
8
|
-
const whitespaceTypes = new Set([ "linePrefix", "whitespace" ]);
|
|
9
|
-
const ignoreWhitespace = (tokens) => tokens.filter(
|
|
10
|
-
(token) => !whitespaceTypes.has(token.type)
|
|
11
|
-
);
|
|
12
|
-
const firstOrNothing = (items) => items[0];
|
|
13
|
-
const lastOrNothing = (items) => items[items.length - 1];
|
|
14
|
-
const makeRange = (start, end) => [ start, end - start + 1 ];
|
|
15
|
-
|
|
16
|
-
// eslint-disable-next-line jsdoc/valid-types
|
|
17
|
-
/** @type import("./markdownlint").Rule */
|
|
18
|
-
module.exports = {
|
|
19
|
-
"names": [ "MD055", "table-pipe-style" ],
|
|
20
|
-
"description": "Table pipe style",
|
|
21
|
-
"tags": [ "table" ],
|
|
22
|
-
"parser": "micromark",
|
|
23
|
-
"function": function MD055(params, onError) {
|
|
24
|
-
const style = String(params.config.style || "consistent");
|
|
25
|
-
let expectedStyle = style;
|
|
26
|
-
let expectedLeadingPipe =
|
|
27
|
-
((expectedStyle !== "no_leading_or_trailing") && (expectedStyle !== "trailing_only"));
|
|
28
|
-
let expectedTrailingPipe =
|
|
29
|
-
((expectedStyle !== "no_leading_or_trailing") && (expectedStyle !== "leading_only"));
|
|
30
|
-
// eslint-disable-next-line jsdoc/valid-types
|
|
31
|
-
/** @type import("../helpers/micromark.cjs").Token[] */
|
|
32
|
-
const micromarkTokens =
|
|
33
|
-
// @ts-ignore
|
|
34
|
-
params.parsers.micromark.tokens;
|
|
35
|
-
const tables = filterByTypes(micromarkTokens, [ "table" ]);
|
|
36
|
-
for (const table of tables) {
|
|
37
|
-
const rows = filterByTypes(table.children, [ "tableDelimiterRow", "tableRow" ]);
|
|
38
|
-
for (const row of rows) {
|
|
39
|
-
// The following uses of first/lastOrNothing lack fallback handling
|
|
40
|
-
// because it seems not to be possible (i.e., 0% coverage)
|
|
41
|
-
const firstCell = firstOrNothing(row.children);
|
|
42
|
-
const leadingToken = firstOrNothing(ignoreWhitespace(firstCell.children));
|
|
43
|
-
const actualLeadingPipe = (leadingToken.type === "tableCellDivider");
|
|
44
|
-
const lastCell = lastOrNothing(row.children);
|
|
45
|
-
const trailingToken = lastOrNothing(ignoreWhitespace(lastCell.children));
|
|
46
|
-
const actualTrailingPipe = (trailingToken.type === "tableCellDivider");
|
|
47
|
-
const actualStyle = actualLeadingPipe ?
|
|
48
|
-
(actualTrailingPipe ? "leading_and_trailing" : "leading_only") :
|
|
49
|
-
(actualTrailingPipe ? "trailing_only" : "no_leading_or_trailing");
|
|
50
|
-
if (expectedStyle === "consistent") {
|
|
51
|
-
expectedStyle = actualStyle;
|
|
52
|
-
expectedLeadingPipe = actualLeadingPipe;
|
|
53
|
-
expectedTrailingPipe = actualTrailingPipe;
|
|
54
|
-
}
|
|
55
|
-
if (actualLeadingPipe !== expectedLeadingPipe) {
|
|
56
|
-
addErrorDetailIf(
|
|
57
|
-
onError,
|
|
58
|
-
firstCell.startLine,
|
|
59
|
-
expectedStyle,
|
|
60
|
-
actualStyle,
|
|
61
|
-
`${expectedLeadingPipe ? "Missing" : "Unexpected"} leading pipe`,
|
|
62
|
-
undefined,
|
|
63
|
-
makeRange(row.startColumn, firstCell.startColumn)
|
|
64
|
-
);
|
|
65
|
-
}
|
|
66
|
-
if (actualTrailingPipe !== expectedTrailingPipe) {
|
|
67
|
-
addErrorDetailIf(
|
|
68
|
-
onError,
|
|
69
|
-
lastCell.endLine,
|
|
70
|
-
expectedStyle,
|
|
71
|
-
actualStyle,
|
|
72
|
-
`${expectedTrailingPipe ? "Missing" : "Unexpected"} trailing pipe`,
|
|
73
|
-
undefined,
|
|
74
|
-
makeRange(lastCell.endColumn - 1, row.endColumn - 1)
|
|
75
|
-
);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
// @ts-check
|
|
2
|
-
|
|
3
|
-
"use strict";
|
|
4
|
-
|
|
5
|
-
const { addErrorDetailIf } = require("../helpers");
|
|
6
|
-
const { filterByTypes } = require("../helpers/micromark.cjs");
|
|
7
|
-
|
|
8
|
-
const makeRange = (start, end) => [ start, end - start + 1 ];
|
|
9
|
-
|
|
10
|
-
// eslint-disable-next-line jsdoc/valid-types
|
|
11
|
-
/** @type import("./markdownlint").Rule */
|
|
12
|
-
module.exports = {
|
|
13
|
-
"names": [ "MD056", "table-column-count" ],
|
|
14
|
-
"description": "Table column count",
|
|
15
|
-
"tags": [ "table" ],
|
|
16
|
-
"parser": "micromark",
|
|
17
|
-
"function": function MD056(params, onError) {
|
|
18
|
-
// eslint-disable-next-line jsdoc/valid-types
|
|
19
|
-
/** @type import("../helpers/micromark.cjs").Token[] */
|
|
20
|
-
const micromarkTokens =
|
|
21
|
-
// @ts-ignore
|
|
22
|
-
params.parsers.micromark.tokens;
|
|
23
|
-
const tables = filterByTypes(micromarkTokens, [ "table" ]);
|
|
24
|
-
for (const table of tables) {
|
|
25
|
-
const rows = filterByTypes(table.children, [ "tableDelimiterRow", "tableRow" ]);
|
|
26
|
-
let expectedCount = 0;
|
|
27
|
-
for (const row of rows) {
|
|
28
|
-
const cells = filterByTypes(row.children, [ "tableData", "tableDelimiter", "tableHeader" ]);
|
|
29
|
-
const actualCount = cells.length;
|
|
30
|
-
expectedCount ||= actualCount;
|
|
31
|
-
let detail = null;
|
|
32
|
-
let range = null;
|
|
33
|
-
if (actualCount < expectedCount) {
|
|
34
|
-
detail = "Too few cells, row will be missing data";
|
|
35
|
-
range = [ row.endColumn - 1, 1 ];
|
|
36
|
-
} else if (expectedCount < actualCount) {
|
|
37
|
-
detail = "Too many cells, extra data will be missing";
|
|
38
|
-
range = makeRange(cells[expectedCount].startColumn, row.endColumn - 1);
|
|
39
|
-
}
|
|
40
|
-
addErrorDetailIf(
|
|
41
|
-
onError,
|
|
42
|
-
row.endLine,
|
|
43
|
-
expectedCount,
|
|
44
|
-
actualCount,
|
|
45
|
-
detail,
|
|
46
|
-
null,
|
|
47
|
-
range
|
|
48
|
-
);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
}
|