mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-17 06:20:12 +01:00
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.
This commit is contained in:
parent
9b9532e163
commit
ec35833751
6 changed files with 87 additions and 307 deletions
|
|
@ -74,7 +74,7 @@ function validateRuleList(ruleList) {
|
|||
// Class for results with toString for pretty display
|
||||
function newResults(ruleList) {
|
||||
function Results() {}
|
||||
Results.prototype.toString = function resultsToString(useAlias) {
|
||||
Results.prototype.toString = function toString(useAlias) {
|
||||
const that = this;
|
||||
let ruleNameToRule = null;
|
||||
const results = [];
|
||||
|
|
@ -415,7 +415,7 @@ function lintContent(
|
|||
return callback(ex);
|
||||
}
|
||||
shared.makeTokenCache(null);
|
||||
callback(null, result);
|
||||
return callback(null, result);
|
||||
}
|
||||
|
||||
// Lints a single file
|
||||
|
|
@ -433,7 +433,7 @@ function lintFile(
|
|||
if (err) {
|
||||
return callback(err);
|
||||
}
|
||||
lintContent(ruleList, file, content, md, config, frontMatter,
|
||||
return lintContent(ruleList, file, content, md, config, frontMatter,
|
||||
noInlineConfig, resultVersion, callback);
|
||||
}
|
||||
// Make a/synchronous call to read file
|
||||
|
|
@ -476,6 +476,7 @@ function lintInput(options, synchronous, callback) {
|
|||
});
|
||||
const results = newResults(ruleList);
|
||||
// Helper to lint the next string or file
|
||||
/* eslint-disable consistent-return */
|
||||
function lintNextItem() {
|
||||
let iterating = true;
|
||||
let item = null;
|
||||
|
|
@ -485,9 +486,7 @@ function lintInput(options, synchronous, callback) {
|
|||
return callback(err);
|
||||
}
|
||||
results[item] = result;
|
||||
if (!iterating) {
|
||||
lintNextItem();
|
||||
}
|
||||
return iterating || lintNextItem();
|
||||
}
|
||||
while (iterating) {
|
||||
if ((item = stringsKeys.shift())) {
|
||||
|
|
@ -518,7 +517,7 @@ function lintInput(options, synchronous, callback) {
|
|||
}
|
||||
}
|
||||
}
|
||||
lintNextItem();
|
||||
return lintNextItem();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -603,15 +602,14 @@ function readConfig(file, parsers, callback) {
|
|||
if (configExtends) {
|
||||
delete config.extends;
|
||||
const extendsFile = path.resolve(path.dirname(file), configExtends);
|
||||
readConfig(extendsFile, parsers, (errr, extendsConfig) => {
|
||||
return readConfig(extendsFile, parsers, (errr, extendsConfig) => {
|
||||
if (errr) {
|
||||
return callback(errr);
|
||||
}
|
||||
callback(null, shared.assign(extendsConfig, config));
|
||||
return callback(null, shared.assign(extendsConfig, config));
|
||||
});
|
||||
} else {
|
||||
callback(null, config);
|
||||
}
|
||||
return callback(null, config);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue