Commit graph

279 commits

Author SHA1 Message Date
David Anson
a9a77940c5 Remove rule aliases for "header" (deprecated in v0.9.0). 2023-11-09 20:05:30 -08:00
David Anson
20a552b4b7 Remove MD002 (deprecated in v0.13.0) and MD006 (deprecated in v0.19.0). 2023-11-09 19:47:24 -08:00
David Anson
d4bfb633bb Generate TypeScript declaration for Configuration object from JSON schema (refs #1004, refs #1014). 2023-11-08 19:49:02 -08:00
David Anson
3b1dfe42df Remove deprecated ESLint rules after version update. 2023-11-05 20:18:39 -08:00
David Anson
1a376f60bb Tweak rule parameters to avoid confusing the TypeScript type system. 2023-11-03 20:24:08 -07:00
David Anson
10f095c4fd Refactor new MD054/link-image-style rule, add tests, update documentation (fixes #40, fixes #399). 2023-11-02 19:48:55 -07:00
David Anson
739cfb6fe2 Update MD034/no-bare-urls to restore per-sibling scan (vs. all-element scan) and ignore tokens inside an htmlFlow context. 2023-10-23 20:55:37 -07:00
David Anson
63325edc97 Update MD005, MD007, MD022, MD037, MD038 to not report violations within "htmlFlow" context (fixes #999). 2023-10-21 22:03:11 -07:00
David Anson
2a56f130c1 Refactor Token.parent() to Token.parent, add validation tests for parent, fix parent in htmlFlow scenario, improve type saftey slightly. 2023-10-19 23:01:31 -07:00
David Anson
06466905a5 Add getHtmlAttributeRe helper for creating a RegExp to match an HTML attribute name/value. 2023-10-18 23:45:39 -07:00
Kate Higa
531e58ed9a
Update MD045/no-alt-text to report instances of HTML "img" tags missing an "alt" attribute (fixes #992). 2023-10-18 23:20:19 -07:00
David Anson
0afedaebf4 Resolve new eslint-plugin-regexp violation regexp/no-contradiction-with-assertion. 2023-10-16 20:13:21 -07:00
David Anson
da17cec722 Reimplement MD007/ul-indent using micromark tokens, reduce the length of fix edits (fixes #969). 2023-10-15 21:25:08 -07:00
David Anson
9297bcde1c Reimplement MD005/list-indent using micromark tokens, improve range reporting. 2023-10-12 21:43:31 -07:00
David Anson
e89ff6ea98 Reimplement MD030/list-marker-space using micromark tokens, improve range accuracy. 2023-10-10 22:03:18 -07:00
David Anson
6eca6f1c3d Allow HTML comments containing "--" even though it is not allowed by the CommonMark specification because it is allowed by the HTML specification and it happens in real life (fixes #996). 2023-10-07 20:18:43 -07:00
David Anson
d2faf40e6a Add rule name and file/string identifier to Error message thrown by onError validation for rules. 2023-10-07 19:34:21 -07:00
David Anson
941769f204 Update MD051/link-fragments to handle backslash-escaping in heading text (fixes #984). 2023-09-18 22:20:44 -07:00
David Anson
3561fc3f38 Update to version 0.31.1. 2023-09-15 20:32:52 -07:00
David Anson
7a7f7a49a6 Commit new changes to markdownlint-browser.js resulting from transitive dependency change. 2023-09-15 20:14:09 -07:00
David Anson
daec896b8d Update MD034/no-bare-urls to scan all tokens when pruning HTML content so open/close pairs with different parents are handled (fixes #966). 2023-09-13 22:44:24 -07:00
David Anson
11fbab3c47 Update to version 0.31.0. 2023-09-07 21:10:31 -07:00
David Anson
ba260b9b1e Update MD051/link-fragments to handle backslash-escaped content in link and definition destinations (fixes #956). 2023-09-06 21:25:00 -07:00
David Anson
1ddee6b195 Update MD051/link-fragments to also look for a fragment matching the URI-encoded link definition (implicit behavior in previous version via markdown-it) (fixes #954, fixes #955). 2023-09-06 20:50:56 -07:00
David Anson
a7dfa4bcbf Replace Array.push(...spread) in micromark helpers with Array.concat to avoid risk of stack overflow. 2023-09-04 22:02:39 -07:00
David Anson
07f403173c Replace all instances of JSDoc generic Function with detailed @callback definition (type-only changes). 2023-09-04 21:41:31 -07:00
David Anson
c118c1160a Update MD052/reference-links-images to add a shortcut_syntax parameter for opting into shortcut scanning (fixes #915). 2023-09-04 16:40:48 -07:00
David Anson
a736588958 Update MD051/link-fragments to handle links and images in headings (fixes #945). 2023-09-04 12:26:38 -07:00
David Anson
6a2b86753b Reimplement micromark helper filterByPredicate to do fewer array manipulations for a ~6-7% elapsed time reduction. 2023-09-02 21:30:43 -07:00
David Anson
24c97a54fb Refactor micromark token handling to remove optional Token.htmlFlowChildren property and make related code more efficient for a ~6% elapsed time reduction. 2023-09-02 19:32:25 -07:00
David Anson
acd8c6ff28 Update MD043/required-headings to standardize early-return flow. 2023-08-29 23:00:27 -07:00
David Anson
b13d6a49ee Reimplement micromark helper filterByHtmlTokens using filterByPredicate to simplify. 2023-08-29 22:52:08 -07:00
David Anson
96a36de713 Refactor MD032/blanks-around-lists to remove redundant micromark flattenedChildren function. 2023-08-29 22:38:00 -07:00
David Anson
84e664e86e Refactor MD037/no-space-in-emphasis slightly to simplify. 2023-08-29 22:29:36 -07:00
David Anson
73e7271188 Update micromark parse to store flattened tokens on the returned tree via Symbol, use flattened tokens in filterByTypes for a ~14% elapsed time reduction. 2023-08-28 22:00:43 -07:00
David Anson
3099a98b51 Update MD044/proper-names to return early for empty names array and use htmlFlowChildren to avoid re-parsing htmlFlow content. 2023-08-27 23:35:22 -07:00
David Anson
c2c4a44931 Commit new changes to markdownlint-browser.js resulting from transitive dependency change. 2023-08-26 17:45:39 -07:00
David Anson
523eeee3bb Update code for new behavior of ESLint rule n/prefer-promises/fs. 2023-08-22 22:00:43 -07:00
David Anson
d641caf90c Update to version 0.30.0. 2023-08-09 20:32:10 -07:00
David Anson
d9de1dd22f Update MD022/blanks-around-headings to allow specifying a different number of blank lines for each heading level (fixes #504). 2023-08-08 22:56:59 -07:00
David Anson
809841098d Update MD022/blanks-around-headings to allow passing -1 for lines_above/lines_below to allow any number of blank lines in that direction (fixes #546). 2023-08-06 15:24:35 -07:00
David Anson
f079df140c Reimplement MD022/blanks-around-headings using micromark tokens. 2023-08-05 23:09:07 -07:00
David Anson
1eb40d3c4c Update MD051/link-fragments to not provide error context for multi-line scenarios. 2023-08-04 21:23:43 -07:00
David Anson
ef1bd286a9 Reimplement MD051/link-fragments using micromark tokens, report reference link issues for definition and fix when possible, handle reporting multiple violations on the same line better. 2023-08-04 20:53:38 -07:00
David Anson
e8cc7eb3cb Reimplement MD045/no-alt-text using micromark tokens, add range information. 2023-07-28 20:19:30 -07:00
Tommy G
07b851b3c7
Always refer to rules by name (not number) in test configuration. 2023-07-27 21:33:03 -07:00
David Anson
73b9704159 Reimplement MD037/no-space-in-emphasis using micromark tokens, report start/end separately for smaller edit spans, remove markdown-it-texmath (fixes #533, fixes #597). 2023-07-24 21:36:55 -07:00
David Anson
e86fb7699d Refactor to move reparse of micromark htmlFlow token content into core micromarkParse implementation for simplicity and sharing. 2023-07-21 22:49:08 -07:00
David Anson
9646590496 Reimplement MD032/blanks-around-lists using micromark tokens, add newly-detected violations to test snapshot. 2023-07-18 22:33:57 -07:00
David Anson
3945de161e Update markdownlint-micromark dependency to 0.1.7, incorporate micromark-extension-math into parse (and compile for demo page). 2023-07-16 22:07:34 -07:00