Commit graph

17 commits

Author SHA1 Message Date
David Anson
3599f694ba Move micromark-parse.mjs from helpers to library, remove all dependencies from helpers. 2024-11-30 20:42:14 -08:00
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
61a9c2427e Address new violations of @stylistic/no-extra-parens. 2024-10-06 21:06:16 -07:00
David Anson
5cc40c54b7 Enable custom rules to use the micromark parser, export micromark helpers for reuse. 2024-10-01 22:53:46 -07:00
David Anson
33631a5984 Split micromark.cjs into separate -parse and -helpers files. 2024-09-28 16:26:38 -07:00
David Anson
164bbac651 Add @stylistic/eslint-plugin to ESLint configuration. 2024-09-01 16:16:05 -07:00
David Anson
12502f6571 Exclude htmlFlow content by default for filterByTypes, opt in as needed. 2024-06-09 17:09:03 -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
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
e282874fe3 Add a test for micromark helpers filterByPredicate and filterByTypes to ensure they return the same token lists for "all tokens". 2023-08-30 22:34:36 -07:00
David Anson
fdec335de4 Avoid redundant read/parse of test file in micromark helper test cases. 2023-03-20 22:05:05 -07:00
David Anson
5302ee45de Add tests for micromark helpers filterByPredicate, filterByTypes, and getMicromarkEvents. 2023-02-25 15:50:57 -08:00
David Anson
08b31da0aa Move micromark.cjs helpers from lib to helpers so it can be used by code in both locations. 2023-02-25 15:50:56 -08:00
David Anson
c9e8f8b8ea Convert micromark.mjs to micromark.cjs for use by synchronous APIs in markdownlint.js. 2023-02-25 15:49:52 -08:00
David Anson
000281e2f0 Add "// @ts-check" to top of new micromark-related modules, fix import typo. 2023-02-25 15:49:51 -08:00
David Anson
7142bbd8ed Normalize line endings to get micromark test passing on Windows. 2023-02-25 15:49:51 -08:00
David Anson
366a498150 Initial implementation of markdownlint-micromark package, micromark.mjs helpers, and tests. 2023-02-25 15:49:51 -08:00