Commit graph

44 commits

Author SHA1 Message Date
David Anson
a1785270fa Add error/warning severity property to LintError object. 2025-09-13 17:03:00 -07:00
David Anson
616c3f2c22 Deprecate LintResults.toString() (at edit time; continue to support at run time), provide helper function formatLintResults, remove outdated grunt/gulp samples, improve typing.
Some checks failed
Checkers / linkcheck (push) Has been cancelled
Checkers / spellcheck (push) Has been cancelled
CI / build (20, macos-latest) (push) Has been cancelled
CI / build (20, ubuntu-latest) (push) Has been cancelled
CI / build (20, windows-latest) (push) Has been cancelled
CI / build (22, macos-latest) (push) Has been cancelled
CI / build (22, ubuntu-latest) (push) Has been cancelled
CI / build (22, windows-latest) (push) Has been cancelled
CI / build (24, macos-latest) (push) Has been cancelled
CI / build (24, ubuntu-latest) (push) Has been cancelled
CI / build (24, windows-latest) (push) Has been cancelled
CI / pnpm (push) Has been cancelled
CodeQL / Analyze (push) Has been cancelled
TestRepos / build (latest, ubuntu-latest) (push) Has been cancelled
UpdateTestRepos / update (push) Has been cancelled
2025-09-08 21:13:50 -07:00
David Anson
44c302fe0b Allow options.markdownItFactory to be implemented asynchronously so the markdown-it parser import can be deferred. 2025-02-08 15:08:10 -08:00
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
b404c8bf16 Add README documentation for getVersion, leave promise/extendConfig undocumented (unsupported). 2024-12-04 23:23:56 -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
David Anson
37307d0764 Add @ts-check to JS files without it, address resulting issues. 2019-10-30 20:37:06 -07:00
David Anson
3960a4a26d Minor updates for MD047 and to remove a reference to io.js. 2019-05-06 22:00:38 -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
8c34383f80 Change default value of options.resultVersion to 1 (breaking change). 2017-07-05 21:53:21 -07:00
David Anson
dcf0462c22 Add regular expressions from vscode-markdownlint for error range in results. 2016-10-31 22:53:46 -07:00
David Anson
0ca8bc7bb6 Add options.resultVersion for more detailed error reporting (fixes #23). 2016-10-23 21:30:31 -07:00
David Anson
9546cc520e Add rule aliases, support throughout (fixes #1). 2016-01-12 21:29:17 -08:00
David Anson
548e3d35cb Add strings option to enable file-less scenarios. 2015-04-29 18:49:27 -07:00
David Anson
e557f3a97f Add synchronous version of the API, with tests and documentation. 2015-03-20 00:09:55 -07:00
David Anson
ec7684b95f Add Grunt example. 2015-03-14 23:47:34 -07:00
David Anson
f252f4f498 Add gulp example. 2015-03-13 22:38:44 -07:00
David Anson
9917d7f2fb Add example, stop modifying files array, rename "styles". 2015-03-13 18:20:56 -07:00