{"id":17641645,"url":"https://github.com/rogeriopvl/gulp-jsonlint","last_synced_at":"2025-04-13T21:12:22.513Z","repository":{"id":12787186,"uuid":"15460845","full_name":"rogeriopvl/gulp-jsonlint","owner":"rogeriopvl","description":"🔍 jsonlint plugin for Gulp","archived":false,"fork":false,"pushed_at":"2022-12-30T17:14:20.000Z","size":275,"stargazers_count":26,"open_issues_count":22,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-13T21:12:18.847Z","etag":null,"topics":["gulp","gulp-plugin","javascript","jsonlint"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rogeriopvl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-12-26T21:38:57.000Z","updated_at":"2023-04-09T09:38:58.000Z","dependencies_parsed_at":"2023-01-13T17:08:20.467Z","dependency_job_id":null,"html_url":"https://github.com/rogeriopvl/gulp-jsonlint","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rogeriopvl%2Fgulp-jsonlint","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rogeriopvl%2Fgulp-jsonlint/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rogeriopvl%2Fgulp-jsonlint/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rogeriopvl%2Fgulp-jsonlint/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rogeriopvl","download_url":"https://codeload.github.com/rogeriopvl/gulp-jsonlint/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248782259,"owners_count":21160717,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gulp","gulp-plugin","javascript","jsonlint"],"created_at":"2024-10-23T07:07:25.352Z","updated_at":"2025-04-13T21:12:22.480Z","avatar_url":"https://github.com/rogeriopvl.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gulp-jsonlint [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][depstat-image]][depstat-url]\n\n\u003e jsonlint plugin for [gulp](http://gulpjs.com/)\n\n## Usage\n\nFirst, install `gulp-jsonlint` as a development dependency:\n\n```shell\nnpm install --save-dev gulp-jsonlint\n```\n\nThen, add it to your `gulpfile.js`:\n\n```javascript\nvar jsonlint = require(\"gulp-jsonlint\");\n\ngulp.src(\"./src/*.json\")\n    .pipe(jsonlint())\n    .pipe(jsonlint.reporter());\n```\n\nUsing a custom reporter:\n\n```javascript\nvar jsonlint = require('gulp-jsonlint');\nvar log = require('fancy-log');\n\nvar myCustomReporter = function (file) {\n    log('File ' + file.path + ' is not valid JSON.');\n};\n\ngulp.src('./src/*.json')\n    .pipe(jsonlint())\n    .pipe(jsonlint.reporter(myCustomReporter));\n```\n\n## API\n\n### jsonlint(options)\n\nFor now, `options` are not supported yet.\n\n### jsonlint.reporter(customReporter)\n\n#### customReporter(file)\n\nType: `function`\n\nYou can pass a custom reporter function. If ommited then the default reporter will be used.\n\nThe `customReporter` function will be called with the argument `file`.\n\n##### file\n\nType: `object`\n\nThis 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.\n\n### jsonlint.failOnError()\n\nStop a task/stream if an jsonlint error has been reported for any file.\n\n```javascript\n// Cause the stream to stop(/fail) before copying an invalid JS file to the output directory\ngulp.src('**/*.js')\n\t.pipe(jsonlint())\n\t.pipe(jsonlint.failOnError())\n\t.pipe(gulp.dest('../output'));\n```\n\n### jsonlint.failAfterError()\n\nStop a task/stream if an jsonlint error has been reported for any file, but wait for all of them to be processed first.\n\n## License\n\n[MIT License](http://en.wikipedia.org/wiki/MIT_License)\n\n[npm-url]: https://npmjs.org/package/gulp-jsonlint\n[npm-image]: https://badge.fury.io/js/gulp-jsonlint.svg\n\n[travis-url]: http://travis-ci.org/rogeriopvl/gulp-jsonlint\n[travis-image]: https://secure.travis-ci.org/rogeriopvl/gulp-jsonlint.svg?branch=master\n\n[depstat-url]: https://david-dm.org/rogeriopvl/gulp-jsonlint\n[depstat-image]: https://david-dm.org/rogeriopvl/gulp-jsonlint.svg\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frogeriopvl%2Fgulp-jsonlint","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frogeriopvl%2Fgulp-jsonlint","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frogeriopvl%2Fgulp-jsonlint/lists"}