Commit graph

28 commits

Author SHA1 Message Date
David Anson
d4b981bcb3 Introduce options.markdownItFactory (and remove options.markdownItPlugins) so the markdown-it parser can be removed as a direct dependency because it is no longer used by default. 2025-02-08 15:08:06 -08:00
David Anson
8dbfe965e9 Parallelize TypeScript declaration tests. 2025-01-19 16:36:05 -08:00
David Anson
8da43dd246 Update to use named exports via / /async /promise /sync, simplify references via self-referencing, refine examples. 2024-12-03 19:58:47 -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
4e30462216 Promote applyFix and applyFixes helpers into core library. 2024-10-06 17:24:44 -07:00
David Anson
d3819c4e75 Add markdownlint "version" property to custom rule "params" object in case it is ever necessary for a rule to specialize its behavior. 2024-09-29 18:11:41 -07:00
David Anson
9c8e7156e1 Create strict JSON Schema for configuration (standalone for ease of use) and corresponding strict TypeScript type (via extends for conciseness) (fixes #1248). 2024-08-27 20:47:33 -07:00
David Anson
fb671b6cd1 Update test-declaration npm script to be more strict and parameterize module. 2024-03-27 20:12:11 -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
c44f165fe1 Remove tokens property from RuleParams type definition (use parsers.markdownit.tokens instead). No change to runtime behavior. 2024-03-07 21:14:17 -08:00
David Anson
c287e49eac Add typings for Rule object to all Rule samples and examples. 2024-03-06 21:27:30 -08: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
c699b8e22b Allow a custom rule's onError implementation to override that rule's information URL for each error. 2023-07-11 21:45:00 -07:00
David Anson
bbbb63c393 Update .markdownlint.json to set line-length/code_blocks to false and remove unnecessary inline comments to disable/restore. 2022-12-23 23:12:50 +00:00
David Anson
91dd6dcb1d Enable "line-length": { "strict": true } for all user-facing Markdown files in the repository. 2022-11-12 17:53:47 -08:00
David Anson
13b4340747 Update all links to rules to use md000.md instead of Rules.md#md000 (shorter, quicker, less distraction). 2022-10-30 14:58:45 -07:00
David Anson
b6471fba31 Enable ESLint rule unicorn/no-array-for-each, auto-fix all violations, manually address new issues for ~4% time reduction measured via profile-fixture.mjs on Apple Silicon M1. 2022-06-08 22:10:27 -07:00
David Anson
00082ee8a5 Add "configParsers" option so custom parsers can be used to handle the content of markdownlint-configure-file inline comments (fixes #528). 2022-06-05 22:32:22 -07:00
David Anson
9310713da1 Make resultVersion 3 (report multiple errors per line, include fixInfo) the default. 2022-04-21 21:30:56 -07:00
David Anson
4affefc68d Add proper-names rule to .markdownlint.json, update tests to use that file, fix resulting issues. 2022-03-10 06:11:38 +00:00
David Anson
a5bfaa8a7d Correct typo-ed references to RuleOnErrorInfo.details to detail. 2021-09-25 16:23:37 -07:00
David Anson
02240fac98 Add missing lineNumber property to FixInfo type (fixes #405). 2021-06-14 22:30:35 -07:00
David Anson
49945d6601 Convert from tape test harness to ava, address minor declaration file issue. 2021-01-10 20:46:00 -08:00
David Anson
a971361cf2 Add getVersion function to exports for easy access by tooling (ex: CLI). 2020-10-17 14:17:35 -07:00
David Anson
aa7fbce2dd Update code to fix or document false positives for CodeQL warnings. 2020-10-02 13:44:18 -07:00
David Anson
e9d63a6284 Add Promise-based APIs for markdownlint and readConfig, update declaration file. 2020-09-13 12:58:09 -07:00
David Anson
e1eb81cd21 Add lint rules from eslint-plugin-node. 2020-09-06 19:49:35 -07:00
David Anson
0a9ac73524 Introduce type declaration file for project after updating typescript dependency to 3.7.2. 2019-11-10 19:26:55 -08:00