standard-json
Format JavaScript Standard Style output to a JSON array!
Install
# use the CLI
npm install --global standard-json
# or use programatically
npm install --save standard-json
CLI Usage
standard | standard-json# exit code will be 1 if any errors are found standard --verbose | standard-json# the ruleId attribute will be filled in if --verbose is passed # works with anything based on standard-engine! semistandard | standard-jsondoublestandard | standard-json
Example output JSON (formatted)
Typical standard
output:
standard: Use JavaScript Standard Style /home/icmpdev/code/standard-json/bin.js:19:21: Missing space before /home/icmpdev/code/standard-json/index.js:6:35: Strings must use singlequote. /home/icmpdev/code/standard-json/index.js:6:51: Extra semicolon. /home/icmpdev/code/standard-json/index.js:17:5: Keyword "if" must be followed by whitespace. /home/icmpdev/code/standard-json/index.js:22:28: Extra semicolon.
After running through standard-json:
API Usage
var txt = // produces Standard Style output var standardJson = var output = // output will be an array of errors or an empty array. var output = // output will be an array of errors or an empty array.// The banner will be `console.error`'d (plus any other non-parsable lines)
Inspiration
This package was inspired by:
Contributing
Contributions welcome! Please read the contributing guidelines first.