Update MD022/MD031/MD032 to report fixInfo for violations, normalize input to fixErrors.

This commit is contained in:
David Anson 2019-08-28 21:47:07 -07:00
parent 2cd27c58f2
commit a062e7c6bd
6 changed files with 357 additions and 38 deletions

View file

@ -53,6 +53,7 @@ A rule is implemented as an `Object` with four required properties:
- `context` is an optional `String` with relevant text surrounding the error location.
- `range` is an optional `Array` with two `Number` values identifying the 1-based column and length of the error.
- `fixInfo` is an optional `Object` with information about how to fix the error:
- `lineNumber` is an optional `Number` specifying the 1-based line number of the edit.
- `editColumn` is an optional `Number` specifying the 1-based column number of the edit.
- `deleteCount` is an optional `Number` specifying the count of characters to delete with the edit.
- `insertText` is an optional `String` specifying text to insert as part of the edit.