{"id":21405373,"url":"https://github.com/karimsa/gulp-jslint","last_synced_at":"2025-07-13T23:30:41.418Z","repository":{"id":16041960,"uuid":"18785864","full_name":"karimsa/gulp-jslint","owner":"karimsa","description":"JSLint for gulp.js.","archived":true,"fork":false,"pushed_at":"2017-05-25T04:37:06.000Z","size":124,"stargazers_count":17,"open_issues_count":1,"forks_count":6,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-06T18:57:56.887Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/karimsa.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":"2014-04-15T03:16:34.000Z","updated_at":"2025-05-26T05:37:59.000Z","dependencies_parsed_at":"2022-07-13T13:10:26.710Z","dependency_job_id":null,"html_url":"https://github.com/karimsa/gulp-jslint","commit_stats":null,"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"purl":"pkg:github/karimsa/gulp-jslint","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karimsa%2Fgulp-jslint","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karimsa%2Fgulp-jslint/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karimsa%2Fgulp-jslint/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karimsa%2Fgulp-jslint/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/karimsa","download_url":"https://codeload.github.com/karimsa/gulp-jslint/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karimsa%2Fgulp-jslint/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265220088,"owners_count":23729758,"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":[],"created_at":"2024-11-22T16:24:48.991Z","updated_at":"2025-07-13T23:30:41.143Z","avatar_url":"https://github.com/karimsa.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gulp-jslint [![Build Status](https://img.shields.io/travis/karimsa/gulp-jslint/master.svg?maxAge=2592000)](https://travis-ci.org/karimsa/gulp-jslint) [![View on NPM](http://img.shields.io/npm/dm/gulp-jslint.svg?style=flat)](http://npmjs.org/package/gulp-jslint) [![code climate](http://img.shields.io/codeclimate/github/karimsa/gulp-jslint.svg?style=flat)](https://codeclimate.com/github/karimsa/gulp-jslint) [![code coverage](http://img.shields.io/codeclimate/coverage/github/karimsa/gulp-jslint.svg?style=flat)](https://codeclimate.com/github/karimsa/gulp-jslint)\n\nIt's JSLint for Gulp.js.\n\n[![NPM](https://nodei.co/npm/gulp-jslint.png?downloads=true\u0026downloadRank=true\u0026stars=true)](https://nodei.co/npm/gulp-jslint/)\n\nSupports `node \u003e= 0.10.x`.\n\n## Table of Contents\n\n - [Installation](#installation)\n - [Usage](#usage)\n    - [Directives](#directives)\n - [Reporters](#reporters)\n    - [Custom Reporters](#custom-reporters)\n - [Support and Licensing](#support-and-licensing)\n\n## Installation\n\nSimply install with npm by running `npm install gulp-jslint`.\n\n## Usage\n\n```javascript\nvar gulp = require('gulp');\nvar jslint = require('gulp-jslint');\n\ngulp.task('default', function () {\n    return gulp.src(['source.js'])\n            .pipe(jslint({ /* this object represents the JSLint directives being passed down */ }))\n            .pipe(jslint.reporter( 'my-reporter' ));\n});\n```\n\nIf you would like to specify a custom jslint edition to use, set the property 'edition' in your directives object.\nThese versions should follow what the package node-jslint expects or this property can be set to a pre-loaded jslint\nfunction.\n\n### Directives\n\nAll directives being passed to the `jslint()` function are standard JSLint directives (for a list of directives,\nsee [the official JSLint docs](http://www.jslint.com/help.html)).\n\nHowever, to supply a list of global variables for your code, use the directive 'predef' or 'global' like so ('global'\nis an alias of 'predef' but 'predef' will be prefered since it is the official JSLint standard):\n\n```javascript\ngulp.task('default', function () {\n    return gulp.src(['source.js'])\n            .pipe(jslint({\n                predef: [ 'a_global' ],\n                global: [ 'a_global' ]\n            }));\n});\n```\n\n*Please see `gulpfile.js` for a more extensive sample gulpfile.*\n\n## Reporters\n\nBy default, two reporters are provided by gulp-jslint. The first is the default reporter (appropriately named 'default')\nand the second report is the popular 'jshint-stylish' (named 'stylish').\n\nTo use either of these reporters, provide the name of the reporter followed by whatever arguments they expect to the function\n`jslint.reporter()`.\n\n**For example:**\n\n```javascript\ngulp.task('default', function () {\n    return gulp.src(['source.js'])\n            .pipe(jslint())\n            .pipe(jslint.reporter('default', errorsOnly))\n            .pipe(jslint.reporter('stylish', options));\n});\n```\n\nIt's probably a good idea to use something like `path.basename()` on the `file` property to avoid lots of garbage in the\ncommand-line (i.e. path.basename('/path/to/index.js') === 'index.js').\n\n### Custom Reporters\n\nCustom reporters should be either be synchronous or streams. Either way, the reporter will receive a `results` object and can\noutput its report onto the console/logfile the way it wishes.\n\nThe results object will contain the following properties:\n\n - *filename*: the absolute path to the file being linted.\n - *success*: a boolean value representing whether the linting passed.\n - *errors*: an array of JSLint errors. Each element will contain the properties:\n    - *name*: the string 'JSLintError'.\n    - *column*: the column number of the error.\n    - *line*: the line number of the error.\n    - *code*: a code relating to the error.\n    - *message*: a message describing the error.\n\n## License\n\nLicensed under MIT license.\n\nCopyright \u0026copy; 2017 Karim Alibhai.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarimsa%2Fgulp-jslint","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkarimsa%2Fgulp-jslint","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarimsa%2Fgulp-jslint/lists"}