Commit graph

37 commits

Author SHA1 Message Date
David Anson
53ff5c43f1 Stop using module.createRequire (problematic under webpack), incorporate and export resolveModule helper from markdownlint-cli2. 2025-01-14 23:30:09 -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
61a9c2427e Address new violations of @stylistic/no-extra-parens. 2024-10-06 21:06:16 -07:00
David Anson
e0219411c6 Refactor RegExps to avoid the possibility of polynomial backtracking (fixes #657). 2024-10-05 18:07:45 -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
164bbac651 Add @stylistic/eslint-plugin to ESLint configuration. 2024-09-01 16:16:05 -07:00
David Anson
55729cfcf7 Remove filterTokens helper (now used only by tests). 2024-08-18 15:34:26 -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
c6716f9bac Update to ESLint 9's "flat" configuration file format. 2024-04-20 21:29:23 -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
c287e49eac Add typings for Rule object to all Rule samples and examples. 2024-03-06 21:27:30 -08:00
David Anson
1769f70845 Replace strip-json-comments dev dependency with jsonc-parser to handle trailing comments in JSONC test input (for mdn/content), update test repo snapshots. 2024-01-21 20:14:18 -08:00
David Anson
f694a56254 Remove leftover references to eslint-plugin-es. 2024-01-03 22:26:36 -08:00
David Anson
4b27bac79b Update all references to "params.tokens" to "params.parsers.markdownit.tokens" for clarity. 2023-02-25 15:50:57 -08:00
David Anson
868edf889e Manually fix three new ESLint warnings from the eslint-plugin-regexp plugin (refs #657). 2022-12-19 21:51:18 -08:00
David Anson
6b01a98363 Add ESLint plugin eslint-plugin-regexp, enable recommended rules, apply all automated fixes (refs #657). 2022-12-19 21:36:24 -08:00
David Anson
0294b9bcc8 Add .mjs to linting, switch from eslint-plugin-node (no longer maintained) to eslint-plugin-n, update suppressions. 2022-10-26 03:26:59 +00: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
7c1550cbe9 Remove RegExp lookbehind assertions used to fix "Polynomial regular expression used on uncontrolled data" because they are not supported in Safari, add eslint-plugin-es rule no-regexp-lookbehind-assertions to prevent regressions. 2022-02-13 16:57:09 -08:00
David Anson
23d8ed7c01 Add test case for custom rule that imports an ESM module (refs #477). 2022-01-11 23:08:53 -08:00
David Anson
528758e962 Update dependencies: eslint to 8.5.0, eslint-plugin-jsdoc to 37.4.0. 2021-12-27 04:37:51 +00:00
David Anson
5ab938a6ab Add lint rules from eslint-plugin-unicorn. 2020-09-06 20:34:10 -07:00
David Anson
0f4745efe3 Exclude eslint-plugin-node rules from customRulesLintJavaScript test due to inconsistent behavior on Node 10. 2020-09-06 19:58:07 -07:00
David Anson
e1eb81cd21 Add lint rules from eslint-plugin-node. 2020-09-06 19:49:35 -07:00
David Anson
0acc578e52 Update remaining references to refer to main branch as "main". 2020-08-11 22:52:29 -07:00
David Anson
74af9f82fb Enable jsdoc/require-jsdoc rule, fix all violations (fixes #85). 2020-01-23 19:42:46 -08:00
David Anson
e3c93ed65d Add eslint-plugin-jsdoc to lint script, address new violation. 2020-01-19 21:01:11 -08:00
David Anson
4d11e60cfe Add custom rule example to lint JavaScript code blocks using ESLint (fixes #197). 2019-07-30 23:07:42 -07:00
David Anson
8c6ef2521c Update custom rule samples to use markdownlint-rule-helpers package. 2019-04-13 11:27:28 -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
ff86e1d7f1 Add optional "information" property to custom rules to provide a link to more information. 2019-01-15 21:56:38 -08:00
David Anson
23d5be6015 Add simple/concrete example of custom rule package for publishing (fixes #133). 2018-07-20 22:31:41 -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
7a752784f1 Add validation of onError callback object for rules. 2018-02-27 21:14:02 -08:00
David Anson
802c81f929 Add support for authoring custom rules. 2018-02-25 16:04:13 -08:00
David Anson
f24f98e146 Add support for using custom rules. 2018-02-15 21:35:58 -08:00