Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

markdownlint-cli

Package Overview
Dependencies
Maintainers
3
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

markdownlint-cli - npm Package Compare versions

Comparing version 0.4.1 to 0.5.0

26

markdownlint.js

@@ -64,14 +64,24 @@ #!/usr/bin/env node

if (hasErrors) {
process.stderr.write(lintResult.toString(), process.exit.bind(process, 1));
} else {
console.log(lintResult.toString());
console.error(lintResult.toString());
// Note: process.exit(1) will end abruptly, interrupting asynchronous IO
// streams (e.g., when the output is being piped). Just set the exit code
// and let the program terminate normally.
// @see {@link https://nodejs.org/dist/latest-v8.x/docs/api/process.html#process_process_exit_code}
// @see {@link https://github.com/igorshubovych/markdownlint-cli/pull/29#issuecomment-343535291}
process.exitCode = 1;
return;
}
var result = lintResult.toString();
if (result) {
console.log(result);
}
}
function notEmptyObject(item) {
return Object.keys(item).length > 0;
}
function hasResultErrors(lintResult) {
function notEmptyObject(item) {
return Object.keys(item).length > 0;
}
return values(lintResult)
.some(notEmptyObject);
return values(lintResult).some(notEmptyObject);
}

@@ -78,0 +88,0 @@

{
"name": "markdownlint-cli",
"version": "0.4.1",
"version": "0.5.0",
"description": "MarkdownLint Command Line Interface",

@@ -13,2 +13,3 @@ "main": "markdownlint.js",

"scripts": {
"invalid": "node ./markdownlint.js --config test/test-config.json -- test/incorrect.md",
"test": "ava test/",

@@ -15,0 +16,0 @@ "watch": "npm test -- --watch --tap | tap-growl",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc