Commit graph

259 commits

Author SHA1 Message Date
David Anson
0f72bf054b Add options.handleRuleFailures for custom rule exceptions. 2019-05-18 12:32:52 -07:00
David Anson
61c92e5997 Handle un-closed HTML comments in a way that does not trigger MD047/single-trailing-newline (fixes #187). 2019-05-16 22:14:07 -07:00
David Anson
1b8b15693f Replace assign/clone helpers with object spread syntax. 2019-05-05 22:27:01 -07:00
David Anson
b55d51cf23 Add additional validation of lineNumber/range properties in rule onError function. 2019-04-30 22:14:30 -07:00
David Anson
4c7ffdd335 Improve handling of nested tags and blocks by MD033/no-inline-html (fixes #179). 2019-04-29 22:09:33 -07:00
KitoW
a977d0dcbc Add MD047/single-trailing-newline for enforcing new lines at the end of file (fixes #89). 2019-04-19 20:13:07 -07:00
David Anson
73511ff677 Remove trimLeft/trimRight helpers; use native implementations. 2019-04-17 14:54:27 -07:00
David Anson
0af999e218 Implement rule MD046/code-block-style from Ruby version. 2019-04-17 14:42:17 -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
ec35833751 Update dependencies: @types/node to 11.12.0, eslint to 5.15.3, js-yaml to 3.13.0, typescript to 3.3.4000, uglify-js to 3.5.2. 2019-03-30 14:36:04 -07:00
David Anson
9b9532e163 Add includesSorted function, use for faster searches of sorted arrays. 2019-03-28 22:06:42 -07:00
David Anson
fa04d29485 Enhance MD022/blanks-around-headings with lines_above/lines_below parameters (fixes #143). 2019-03-24 21:50:56 -07:00
David Anson
1db87ef0c6 Update MD031/blanks-around-fences and MD032/blanks-around-lists to ignore comments and blockquotes (fixes #171, fixes #172). 2019-03-20 21:48:18 -07:00
David Anson
0184f9d618 Deprecate MD002/first-heading-h1 in favor of MD041/first-line-h1 (refs #169). 2019-03-12 22:23:12 -07:00
David Anson
3e753636cf Handle case where token map extends beyond last line of input (fixes #166). 2019-02-13 19:52:34 -08:00
David Anson
ff50da3b42 Re-implement MD038 to handle multi-line spans better and rely less on RegExp. 2019-01-30 22:09:20 -08:00
David Anson
3b49414183 Re-implement MD032 to detect missed scenarios and simplify. 2019-01-21 18:21:36 -08:00
David Anson
8a175955d7 Add options.markdownItPlugins to support using markdown-it plugins when parsing. 2019-01-19 12:52:13 -08: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
d76ede1c4f Update MD024/no-duplicate-heading to allow non-sibling duplicates (fixes #136). 2018-07-19 21:49:30 -07:00
David Anson
3fd3f27169 Add CONTRIBUTING.md (fixes #127). 2018-06-24 20:01:44 -07:00
David Anson
1c816897c1 Include file/string name in params object for custom rules (fixes #119). 2018-05-25 17:28:56 -07:00
David Anson
101edd8496 Add parsers parameter to readConfig/Sync to support non-JSON formats like YAML (fixes #118). 2018-05-23 22:24:40 -07:00
David Anson
2b4ecdced8 Update error message validation to handle CRLF and LF-only. 2018-05-20 21:43:55 -07:00
David Anson
11b19f141c Move all readConfig/Sync test files to test/config directory. 2018-05-20 21:37:05 -07:00
David Anson
922bbefd55 Add tests for updated newline regular expression. 2018-04-30 21:43:34 -07:00
David Anson
f77b7ae4ec Remove Q dependency, replace with native Promise/promisify. 2018-04-27 22:29:52 -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
c7c4c032d1 Code review feedback for "header"->"heading" change. 2018-04-18 22:28:14 -07:00
Milos Levacic
45424cf459 Change "header" to "heading" across the library
This should be backward compatible, as all "header" aliases are still
available, though documented as discouraged for future use.
2018-04-18 22:27:48 -07:00
David Anson
f80b61d8b7 Allow empty string for detail/context in onError callback from rules. 2018-03-17 22:11:56 -07:00
David Anson
08c8031736 Add documentation for authoring custom rules. 2018-03-03 22:15:49 -08: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
David Anson
4619a8c824 Refactor to run rule analysis when called, simplify functions. 2018-02-05 21:26:07 -08:00
David Anson
49e36f817c Remove abbreviations from rule metadata to clarify API. 2018-01-18 21:34:30 -08:00
David Anson
f79cdcb0d4 Rename rule params.options to .config for API consistency. 2018-01-17 20:52:54 -08:00
David Anson
a0e3b4db90 Remove regexp from rule definition to simplify API. 2018-01-16 21:27:38 -08:00
David Anson
54c28f47c3 Merge rule name/alias in rule definitions and results (for resultVersion 2). 2018-01-12 23:21:06 -08:00
David Anson
b565c1ff32 Add violation of new rule MD045 to break-all-the-rules.md. 2018-01-08 21:29:13 -08:00
Duncan Mackenzie
4fa837a031 Add MD045/no-alt-text (fixes #75). 2018-01-06 15:55:59 -08:00
David Anson
1184281c87 Replace trimLeft/trimRight polyfills with helper methods. 2017-12-13 21:41:28 -08:00
David Anson
af968fb246 Add Examples section to README with links to real-world use cases. 2017-11-21 21:58:42 -08:00
David Anson
0211abf1ba Update dependencies: browserify to 14.4.0, eslint to 4.2.0, nodeunit to 0.11.1, uglify-js to 3.0.25. 2017-07-17 22:23:00 -07:00
David Anson
0a678d25c1 Ignore the content of (valid) HTML comments when linting (fixes #64). 2017-07-16 23:08:47 -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
614ac8fa23 Add noInlineConfig option to disable inline config comments. 2017-05-21 22:58:10 -07:00
David Anson
7528295cae Add support for shareable/extendable configuration via "extends" and helper functions (fixes #33). 2017-05-19 22:36:46 -07:00