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

gulp-jsonlint

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-jsonlint - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

4

package.json
{
"name": "gulp-jsonlint",
"version": "0.0.1",
"description": "A plugin for Gulp",
"version": "0.0.2",
"description": "A jsonlint plugin for Gulp",
"keywords": [

@@ -6,0 +6,0 @@ "gulpplugin", "jsonlint", "json", "lint"

@@ -23,2 +23,17 @@ # gulp-jsonlint [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][depstat-image]][depstat-url]

Using a custom reporter:
```javascript
var jsonlint = require('gulp-jsonlint');
var gutil = require('gulp-util');
var myCustomReporter = function (file) {
gutil.log('File ' + file.path + ' is not valid JSON.');
};
gulp.src('./src/*.json');
.pipe(jsonlint())
.pipe(jsonlint.reporter(myCustomReporter));
```
## API

@@ -30,2 +45,18 @@

### jsonlint.reporter(customReporter)
#### customReporter(file)
Type: `function`
You can pass a custom reporter function. If ommited then the default reporter will be used.
The `customReporter` function will be called with the argument `file`.
##### file
Type: `object`
This argument has the attribute `jsonlint` wich is an object that contains a `success` boolean attribute. If it's false you also have a `message` attribute containing the jsonlint error message.
## License

@@ -32,0 +63,0 @@

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