Installations
npm install gulp-jslint-simple
Developer Guide
Typescript
No
Module System
CommonJS
Min. Node Version
>=0.8.0
Node Version
4.3.2
NPM Version
2.14.12
Score
73.6
Supply Chain
95.4
Quality
73.5
Maintenance
50
Vulnerability
98.8
License
Releases
Nicer errors
Updated on Apr 01, 2016
Dependency updates
Updated on May 29, 2015
Stable release
Updated on Sep 09, 2014
Update "gulp-util" dependency
Updated on Jul 22, 2014
Update JSLint to 2014-07-08
Updated on Jul 22, 2014
Reporters can be specified as strings
Updated on Jul 22, 2014
Contributors
Unable to fetch Contributors
Languages
JavaScript (100%)
Love this project? Help keep it running — sponsor us today! 🚀
Developer
pandell
Download Statistics
Total Downloads
38,577
Last Day
87
Last Week
264
Last Month
586
Last Year
1,897
GitHub Statistics
MIT License
2 Stars
85 Commits
2 Forks
29 Watchers
1 Branches
80 Contributors
Updated on Nov 30, 2017
Bundle Size
90.39 kB
Minified
25.64 kB
Minified + Gzipped
Package Meta Information
Latest Version
1.0.2
Package Id
gulp-jslint-simple@1.0.2
Size
33.21 kB
NPM Version
2.14.12
Node Version
4.3.2
Total Downloads
Cumulative downloads
Total Downloads
38,577
Last Day
58.2%
87
Compared to previous day
Last Week
135.7%
264
Compared to previous week
Last Month
774.6%
586
Compared to previous month
Last Year
-3.5%
1,897
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
gulp-jslint-simple
Run JSLint analysis
How is this package different from other JSLint runners?
-
Contains a copy of the latest (2014-07-08) JSLint by Douglas Crockford
-
Compatible with JSHint reporters
-
jslint.report
can emiterror
event:-
Never (default behaviour)
-
After a file has been analysed and errors were found in it (
emitError
) -
After all files have been analysed and errors were found in at least one of them (
emitErrorAtEnd
)
-
Install
1$ npm install --save-dev gulp-jslint-simple
Usage
1var gulp = require('gulp'); 2var jslint = require('gulp-jslint-simple'); 3 4gulp.task('lint', function () { 5 gulp.src('*.js') 6 .pipe(jslint.run({ 7 // project-wide JSLint options 8 node: true, 9 vars: true 10 })) 11 .pipe(jslint.report({ 12 // example of using a JSHint reporter 13 reporter: require('jshint-stylish').reporter 14 })); 15});
API
Assuming:
1var jslint = require('gulp-jslint-simple');
jslint.run([options])
Creates a transform stream that expects Vinyl File objects in buffer mode (stream and null-contents modes are not supported) as input. The stream passes each incoming file object to the output unchanged. Each incoming object will be analysed using latest JSLint. If analysis fails, a property jslint
will be added to the object. A property jshint
pointing to jslint
will also be added for compatibility with JSHint reporters.
options
Type: Object
Default: no options
Options to pass through to JSLINT
function. Allows overriding default JSLint flags on a project level (flags can then be overridden again at a file level using /*jslint*/
comments).
options.includeData
Type: Boolean
Default: false
If true, jslint
property is added even when analysis succeeds. Additionally, jslint.data
property is populated with JSLINT.data()
object that contains analysis details.
jslint.report([options])
Creates a transform stream that expects Vinyl File objects as input. The stream passes each incoming file object to the output unchanged. Each incoming object that contains a file that failed JSLint analysis will be reported using options.reporter
.
options
Type: Object
Default: no options
Control report behaviour.
options.reporter
Type: Function
Default: jslint.report.defaultReporter
Reporter to use to report errors for files that failed JSLint analysis.
options.emitError
Type: Boolean
Default: false
If true, jslint.report
will emit an error
event when an incoming file fails JSLint analysis.
options.emitErrorAtEnd
Type: Boolean
Default: false
If true, jslint.report
will emit an error
event after the input stream has ended and at least one file failed analysis.
If neither options.emitError
nor options.emitErrorAtEnd
are set to true
, no error
event will be emitted. jslint.report
stream then acts as a simple pass-through transform stream.
jslint.report.defaultReporter(results, data, options)
JSHint-reporter-compatible function that prints formatted message for each specified error result. File, line and row specification is printed in a format that is recognized by many editors and tools (clicking the file specification in such tools will open the specified file for editing at the specified location). Example output:
Contributing
-
Clone git repository
-
npm install
(will install dev dependencies needed by the next step) -
npm start
(will start a file system watcher that will re-lint JavaScript and JSON files + re-run all tests when change is detected) -
Make changes, don't forget to add tests, submit a pull request.
License
MIT © Pandell Technology

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
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 0/18 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
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
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 20 are checked with a SAST tool
Score
3
/10
Last Scanned on 2025-02-03
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