Installations
npm install gulp-jslint
Developer Guide
Typescript
No
Module System
CommonJS
Node Version
7.2.0
NPM Version
3.10.9
Score
66.9
Supply Chain
91.9
Quality
70
Maintenance
50
Vulnerability
97.1
License
Releases
Unable to fetch releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (100%)
Love this project? Help keep it running — sponsor us today! 🚀
Developer
karimsa
Download Statistics
Total Downloads
567,475
Last Day
70
Last Week
472
Last Month
2,183
Last Year
38,260
GitHub Statistics
MIT License
17 Stars
151 Commits
6 Forks
1 Watchers
1 Branches
5 Contributors
Updated on Mar 19, 2022
Bundle Size
148.22 kB
Minified
43.08 kB
Minified + Gzipped
Package Meta Information
Latest Version
1.0.10
Package Id
gulp-jslint@1.0.10
Size
28.09 kB
NPM Version
3.10.9
Node Version
7.2.0
Total Downloads
Cumulative downloads
Total Downloads
567,475
Last Day
-26.3%
70
Compared to previous day
Last Week
0.4%
472
Compared to previous week
Last Month
-2.2%
2,183
Compared to previous month
Last Year
-13.2%
38,260
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
gulp-jslint

It's JSLint for Gulp.js.
Supports node >= 0.10.x
.
Table of Contents
Installation
Simply install with npm by running npm install gulp-jslint
.
Usage
1var gulp = require('gulp'); 2var jslint = require('gulp-jslint'); 3 4gulp.task('default', function () { 5 return gulp.src(['source.js']) 6 .pipe(jslint({ /* this object represents the JSLint directives being passed down */ })) 7 .pipe(jslint.reporter( 'my-reporter' )); 8});
If you would like to specify a custom jslint edition to use, set the property 'edition' in your directives object. These versions should follow what the package node-jslint expects or this property can be set to a pre-loaded jslint function.
Directives
All directives being passed to the jslint()
function are standard JSLint directives (for a list of directives,
see the official JSLint docs).
However, to supply a list of global variables for your code, use the directive 'predef' or 'global' like so ('global' is an alias of 'predef' but 'predef' will be prefered since it is the official JSLint standard):
1gulp.task('default', function () { 2 return gulp.src(['source.js']) 3 .pipe(jslint({ 4 predef: [ 'a_global' ], 5 global: [ 'a_global' ] 6 })); 7});
Please see gulpfile.js
for a more extensive sample gulpfile.
Reporters
By default, two reporters are provided by gulp-jslint. The first is the default reporter (appropriately named 'default') and the second report is the popular 'jshint-stylish' (named 'stylish').
To use either of these reporters, provide the name of the reporter followed by whatever arguments they expect to the function
jslint.reporter()
.
For example:
1gulp.task('default', function () { 2 return gulp.src(['source.js']) 3 .pipe(jslint()) 4 .pipe(jslint.reporter('default', errorsOnly)) 5 .pipe(jslint.reporter('stylish', options)); 6});
It's probably a good idea to use something like path.basename()
on the file
property to avoid lots of garbage in the
command-line (i.e. path.basename('/path/to/index.js') === 'index.js').
Custom Reporters
Custom reporters should be either be synchronous or streams. Either way, the reporter will receive a results
object and can
output its report onto the console/logfile the way it wishes.
The results object will contain the following properties:
- filename: the absolute path to the file being linted.
- success: a boolean value representing whether the linting passed.
- errors: an array of JSLint errors. Each element will contain the properties:
- name: the string 'JSLintError'.
- column: the column number of the error.
- line: the line number of the error.
- code: a code relating to the error.
- message: a message describing the error.
Support and Licensing
Copyright (C) 2014-2016 Karim Alibhai. Code is licensed under the MIT license.
Please use the official issues section in GitHub to post issues or feature requests. Stars and helpful comments are much appreciated! :)

No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
no SAST tool detected
Details
- Warn: no pull requests merged into dev branch
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Score
3
/10
Last Scanned on 2025-02-10
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More