Commit graph

128 commits

Author SHA1 Message Date
David Anson
2056d81682 Add support for asynchronous custom rules (ex: to read a file or make a network request). 2021-12-11 21:44:25 -08:00
David Anson
109e0d8cb6 Refactor custom rule exception tests for smaller size and better coverage. 2021-12-10 21:33:20 -08:00
David Anson
e7662b11b5 Simplify lintContent by removing errors array and processing errors in onError so nothing needs to be done after invoking a rule. 2021-12-04 22:09:20 -08:00
David Anson
d3c56d3ab8 Refactor lintContent to do less processing of errors for each rule and instead handle all errors at the end. 2021-12-04 17:02:11 -08:00
David Anson
e531bd6359 Refactor lintInput to share code between sync/async, support an async path for strings, and process files first for better concurrency. 2021-12-03 22:43:58 -08:00
David Anson
7330ea4946 Add information about parser/index to error messages when parsing configuration file content. 2021-11-30 21:28:59 -08:00
David Anson
11806dc5cb Tokens inside tables that lack a map should get it from the surrounding table row (which is more scoped than the table body) (fixes #463). 2021-11-26 04:26:15 +00:00
David Anson
1e82f76596 Reimplement inlineCodeSpanRanges as codeBlockAndSpanRanges to fix an issue with unterminated code spans (and for flexibility). 2021-11-23 04:51:20 +00:00
David Anson
573ebe7462 Move two instances of deprecatedRuleNames into constants.js. 2021-11-11 22:37:16 -08:00
David Anson
c5345f45eb Replace require("package.json") with constants.js to simplify and remove that file from markdownlint-browser.js. 2021-11-10 21:48:15 -08:00
David Anson
a5bfaa8a7d Correct typo-ed references to RuleOnErrorInfo.details to detail. 2021-09-25 16:23:37 -07:00
David Anson
a8228ecd80 Update dependencies: c8 to 7.8.0, eslint to 7.32.0, eslint-plugin-jsdoc to 36.0.7, eslint-plugin-unicorn to 35.0.0, globby to 11.0.4, markdown-it-texmath to 0.9.1, ts-loader to 9.2.5, typescript to 4.3.5, webpack to 5.51.1, webpack-cli to 4.8.0. 2021-08-22 18:03:26 -07:00
David Anson
709e314836 Update readConfig to use fs.access so the async path is fully async. 2021-08-12 20:43:18 -07:00
David Anson
211f09afbc Allow custom file system implementation to be passed when linting or reading configuration. 2021-08-12 19:38:03 -07:00
David Anson
b10147f16b Remove helpers.utf8Encoding because it annoys the latest TypeScript compiler. 2021-08-05 22:01:29 -07:00
David Anson
7d40926367 Cache results of inlineCodeSpanRanges for use by MD011/MD044. 2021-06-17 22:01:27 -07:00
David Anson
02240fac98 Add missing lineNumber property to FixInfo type (fixes #405). 2021-06-14 22:30:35 -07:00
David Anson
fb5f647368 Update dependencies: c8 to 7.7.2, eslint to 7.28.0, eslint-plugin-jsdoc to 35.1.3, eslint-plugin-unicorn to 33.0.1, globby to 11.0.3, js-yaml to 4.1.0, markdown-it-texmath to 0.9.0, markdownlint-rule-helpers to 0.14.0, ts-loader to 9.2.3, typescript to 4.3.2, webpack to 5.38.1, webpack-cli to 4.7.2. 2021-06-08 22:20:13 -07:00
David Anson
a79e7843f2 Work around lack of webpack support for dynamic calls to require (.resolve). 2021-02-11 22:16:07 -08:00
David Anson
c87d7f5b8c Update dependencies: eslint-plugin-jsdoc to 31.6.0, eslint-plugin-unicorn to 27.0.0. 2021-02-06 19:55:22 -08: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
369b0b5934 Replace browserify/uglify-js with webpack, shrink markdownlint-browser.js (fixes #362). 2021-01-05 20:55:09 -08:00
David Anson
d2bd75748f Update dependencies: @types/node to 14.14.9, browserify to 17.0.0, c8 to 7.3.5, eslint to 7.14.0, eslint-plugin-jsdoc to 30.7.8, eslint-plugin-unicorn to 23.0.0, markdownlint-rule-helpers to 0.12.0, typescript to 4.1.2, uglify-js to 3.12.0. 2020-11-24 16:25:43 -08:00
David Anson
85563c3e63 Handle missing token.map for th_open tokens (breaking) change in markdown-it v12. 2020-11-24 13:01:19 -08:00
David Anson
a6d30cb724 Implement markdownlint-disable-next-line inline comment (fixes #295). 2020-11-22 14:02:36 -08:00
David Anson
dd2c1d08ee Minor tweaks to previous PR commit. 2020-11-06 19:23:08 -08:00
Alexander Kachkaev
4bff44e33f Use require.resolve as a fallback of path.resolve (#342) 2020-11-06 19:23:08 -08:00
David Anson
fb49877c86 Change ESLint ecmaVersion to 2019, remove unused catch binding. 2020-10-20 19:59:38 -07: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
e9d63a6284 Add Promise-based APIs for markdownlint and readConfig, update declaration file. 2020-09-13 12:58:09 -07:00
David Anson
4286f68152 Introduce concurrency to asynchronous file linting for improved performance. 2020-09-12 12:01:20 -07:00
David Anson
2851a691ba Make toString function on LintResults object non-enumerable (hide it from for..in). 2020-09-07 20:05:36 -07:00
David Anson
5ab938a6ab Add lint rules from eslint-plugin-unicorn. 2020-09-06 20:34:10 -07:00
David Anson
e1eb81cd21 Add lint rules from eslint-plugin-node. 2020-09-06 19:49:35 -07:00
David Anson
6ce426cf88 Add support for "markdownlint-configure-file" inline comments (fixes #264). 2020-04-05 19:47:12 -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
5f6e17915a Copy range property of rule's onError object at time of call; add test to verify. 2020-01-13 19:49:51 -08:00
David Anson
d15324478c Deprecate MD006/ul-start-left in favor of MD007/ul-indent. 2020-01-13 19:19:49 -08:00
David Anson
21b01b2a96 Resolve remaining TypeScript-based editor warnings in test file. 2020-01-11 20:48:00 -08:00
David Anson
a9251c533f Add markdownlint-disable-file/markdownlint-enable-file inline comments (fixes #215). 2019-12-04 21:31:49 -08:00
David Anson
e717608cac Update type declaration for MarkdownItToken with custom line/lineNumber properties. 2019-11-11 21:09:37 -08: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
9202ebe390 Update fixInfo.lineNumber for front matter, sanitize fixInfo object from rules. 2019-10-19 17:34:02 -07:00
David Anson
40ac584482 Update annotateTokens to handle multi-line code spans. 2019-09-27 21:18:16 -07:00
David Anson
65f6d38978 Validate errorInfo.fixInfo object/properties in extension calls to onError. 2019-09-14 13:39:27 -07:00
David Anson
679c83e23b Update resultVersion 3 to report all issues on a line; update MD010/no-hard-tabs to log all issues. 2019-08-21 21:02:09 -07:00
David Anson
cdd87e647f Add infrastructure for rules to include fix information when logging violations, update MD047 (refs #80). 2019-08-16 19:56:52 -07:00
David Anson
65052f6200 Add support for inline comments markdownlint-capture/markdownlint-restore (fixes #194). 2019-06-08 19:26:11 -07:00
David Anson
0f72bf054b Add options.handleRuleFailures for custom rule exceptions. 2019-05-18 12:32:52 -07:00