Commit graph

21 commits

Author SHA1 Message Date
David Anson
1e71f6f44e Convert markdownlint library to an ECMAScript module, replace markdownlint-micromark with micromark, stop publishing (large) markdownlint-browser.js, see https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c for guidance. 2024-11-29 18:29:21 -08:00
David Anson
33631a5984 Split micromark.cjs into separate -parse and -helpers files. 2024-09-28 16:26:38 -07:00
David Anson
97effd921e Refactor helpers slightly for consistency. 2024-09-28 15:55:26 -07:00
David Anson
164bbac651 Add @stylistic/eslint-plugin to ESLint configuration. 2024-09-01 16:16:05 -07:00
David Anson
dfcb4529f3 Cache all top-level calls to filterByTypes (~7% runtime reduction). 2024-08-24 22:05:16 -07:00
David Anson
2b8369ae39 Update MD031/blanks-around-fences to handle missing close fence. 2024-08-17 20:29:27 -07:00
David Anson
c8fd9eb4b3 Refactor to remove forEachLine and getLineMetadata helpers, reimplement MD012/MD018/MD020/MD031 using micromark tokens. 2024-08-17 17:58:16 -07:00
David Anson
d5994ae4de Add Rule.parser property for custom rules to specify which Markdown parser output they use, honor it strictly, and add full type support. 2024-03-13 20:55:57 -07:00
David Anson
12c4f79604 Add parsers object to RuleParams type, annotate every rule definition with Rule type for better type validation. 2024-02-27 20:42:09 -08:00
David Anson
5f5f44e8e0 Update MD031/blanks-around-fences to avoid duplicating list item markers when adding blank lines (fixes #485). 2022-05-14 19:18:13 -07:00
David Anson
392cc287e6 Handle implicit close fence in MD031/blanks-around-fences to avoid null-dereference. 2020-10-16 14:08:42 -07:00
David Anson
e319f9501c Update MD031/blanks-around-fences to add blockquote characters when fixing issues in that context. 2020-04-07 21:01:39 -07:00
David Anson
a062e7c6bd Update MD022/MD031/MD032 to report fixInfo for violations, normalize input to fixErrors. 2019-08-28 21:47:07 -07:00
David Anson
c5b74d22b9 Update MD031/blanks-around-fences to include list_items parameter (fixes #200). 2019-08-02 22:58:41 -07:00
David Anson
7e980401b8 Expose shared.js helper code for custom rule authors (fixes #134). 2019-04-13 11:18:57 -07:00
David Anson
f614f3e1ce Remove state from shared.js, move to cache.js. 2019-04-10 21:26:59 -07:00
David Anson
debc08bca1 Re-implement MD022/blanks-around-headings to ignore comments and blockquotes. 2019-03-21 21:42:24 -07:00
David Anson
1db87ef0c6 Update MD031/blanks-around-fences and MD032/blanks-around-lists to ignore comments and blockquotes (fixes #171, fixes #172). 2019-03-20 21:48:18 -07:00
David Anson
213aef4564 Convert var to const/let (except in browser-only code). 2018-04-27 22:05:34 -07:00
David Anson
748c8cac17 Remove unnecessary params parameter to shared.flattenLists/forEachLine. 2018-03-04 23:06:31 -08:00
David Anson
9ba143555d Move each rule implementation into its own file (fixes #83). 2018-01-21 21:44:25 -08:00