Change default value of options.resultVersion to 1 (breaking change).

This commit is contained in:
David Anson 2017-07-05 21:53:21 -07:00
parent 5bea80f5cd
commit 8c34383f80
6 changed files with 116 additions and 142 deletions

View file

@ -10,28 +10,20 @@ var options = {
}
};
// Uses result.toString for pretty formatting
// Makes a synchronous call, using result.toString for pretty formatting
var result = markdownlint.sync(options);
console.log(result.toString());
// Makes an asynchronous call
markdownlint(options, function callback(err, result) {
if (!err) {
console.log(result.toString());
}
});
// Examines the result object directly
// Displays the result object directly
markdownlint(options, function callback(err, result) {
if (!err) {
console.dir(result, { "colors": true, "depth": null });
}
});
// Again, using resultVersion 1 for more detail
options.resultVersion = 1;
markdownlint(options, function callback(err, result) {
if (!err) {
console.dir(result, { "colors": true, "depth": null });
}
});
// Make a synchronous call, passing true to toString()
var result = markdownlint.sync(options);
console.log(result.toString(true));