Correct typo-ed references to RuleOnErrorInfo.details to detail.

This commit is contained in:
David Anson 2021-09-25 16:23:37 -07:00
parent a852407c88
commit a5bfaa8a7d
4 changed files with 5 additions and 5 deletions

View file

@ -51,7 +51,7 @@ A rule is implemented as an `Object` with one optional and four required propert
- `config` is an `Object` corresponding to the rule's entry in `options.config` (if present).
- `onError` is a function that takes a single `Object` parameter with one required and four optional properties:
- `lineNumber` is a required `Number` specifying the 1-based line number of the error.
- `details` is an optional `String` with information about what caused the error.
- `detail` is an optional `String` with information about what caused the error.
- `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 (all properties are optional, but

View file

@ -139,7 +139,7 @@ const testRule = {
let ruleOnErrorInfo: markdownlint.RuleOnErrorInfo;
ruleOnErrorInfo = {
"lineNumber": 1,
"details": "details",
"detail": "detail",
"context": "context",
"range": [ 1, 2 ],
"fixInfo": {

View file

@ -206,9 +206,9 @@ type RuleOnErrorInfo = {
*/
lineNumber: number;
/**
* Details about the error.
* Detail about the error.
*/
details?: string;
detail?: string;
/**
* Context for the error.
*/

View file

@ -1172,7 +1172,7 @@ module.exports = markdownlint;
*
* @typedef {Object} RuleOnErrorInfo
* @property {number} lineNumber Line number (1-based).
* @property {string} [details] Details about the error.
* @property {string} [detail] Detail about the error.
* @property {string} [context] Context for the error.
* @property {number[]} [range] Column number (1-based) and length.
* @property {RuleOnErrorFixInfo} [fixInfo] Fix information.