mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-18 23:10:12 +01:00
wip
This commit is contained in:
parent
19649c17d0
commit
0117a71138
7 changed files with 74 additions and 86 deletions
|
|
@ -1195,9 +1195,9 @@ export function readConfigSync(file, parsers, fs) {
|
|||
/**
|
||||
* Normalizes the fields of a RuleOnErrorFixInfo instance.
|
||||
*
|
||||
* @param {RuleOnErrorFixInfo} fixInfo RuleOnErrorFixInfo instance.
|
||||
* @param {FixInfo} fixInfo RuleOnErrorFixInfo instance.
|
||||
* @param {number} [lineNumber] Line number.
|
||||
* @returns {RuleOnErrorFixInfoNormalized} Normalized RuleOnErrorFixInfo instance.
|
||||
* @returns {FixInfoNormalized} Normalized RuleOnErrorFixInfo instance.
|
||||
*/
|
||||
function normalizeFixInfo(fixInfo, lineNumber = 0) {
|
||||
return {
|
||||
|
|
@ -1212,7 +1212,7 @@ function normalizeFixInfo(fixInfo, lineNumber = 0) {
|
|||
* Applies the specified fix to a Markdown content line.
|
||||
*
|
||||
* @param {string} line Line of Markdown content.
|
||||
* @param {RuleOnErrorFixInfo} fixInfo RuleOnErrorFixInfo instance.
|
||||
* @param {FixInfo} fixInfo FixInfo instance.
|
||||
* @param {string} [lineEnding] Line ending to use.
|
||||
* @returns {string | null} Fixed content or null if deleted.
|
||||
*/
|
||||
|
|
@ -1228,7 +1228,7 @@ export function applyFix(line, fixInfo, lineEnding = "\n") {
|
|||
* Applies as many of the specified fixes as possible to Markdown content.
|
||||
*
|
||||
* @param {string} input Lines of Markdown content.
|
||||
* @param {RuleOnErrorInfo[]} errors RuleOnErrorInfo instances.
|
||||
* @param {LintError[]} errors LintError instances.
|
||||
* @returns {string} Fixed content.
|
||||
*/
|
||||
export function applyFixes(input, errors) {
|
||||
|
|
@ -1463,16 +1463,6 @@ export function getVersion() {
|
|||
* @property {string} [insertText] Text to insert (after deleting).
|
||||
*/
|
||||
|
||||
/**
|
||||
* RuleOnErrorInfo with all optional properties present.
|
||||
*
|
||||
* @typedef {Object} RuleOnErrorFixInfoNormalized
|
||||
* @property {number} lineNumber Line number (1-based).
|
||||
* @property {number} editColumn Column of the fix (1-based).
|
||||
* @property {number} deleteCount Count of characters to delete.
|
||||
* @property {string} insertText Text to insert (after deleting).
|
||||
*/
|
||||
|
||||
/**
|
||||
* Rule definition.
|
||||
*
|
||||
|
|
@ -1561,6 +1551,16 @@ export function getVersion() {
|
|||
* @property {string} [insertText] Text to insert (after deleting).
|
||||
*/
|
||||
|
||||
/**
|
||||
* FixInfo with all optional properties present.
|
||||
*
|
||||
* @typedef {Object} FixInfoNormalized
|
||||
* @property {number} lineNumber Line number (1-based).
|
||||
* @property {number} editColumn Column of the fix (1-based).
|
||||
* @property {number} deleteCount Count of characters to delete.
|
||||
* @property {string} insertText Text to insert (after deleting).
|
||||
*/
|
||||
|
||||
/**
|
||||
* Called with the result of linting a string or document.
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue