gulp-eslint
Advanced tools
Comparing version 0.13.1 to 0.13.2
# Changelog | ||
## 0.13.2 | ||
* Remove dependency on through2 to address highWatermark overflow issue (#36) | ||
## 0.13.1 | ||
@@ -4,0 +8,0 @@ |
12
index.js
'use strict'; | ||
var through = require('through2'); | ||
var BufferStreams = require('bufferstreams'); | ||
@@ -29,3 +28,3 @@ var PluginError = require('gulp-util').PluginError; | ||
return through.obj(function(file, enc, cb) { | ||
return util.transform(function(file, enc, cb) { | ||
// remove base path from file path before calling isPathIgnored | ||
@@ -49,3 +48,2 @@ if (util.isPathIgnored(file, linter.options) || file.isNull()) { | ||
}); | ||
} | ||
@@ -58,3 +56,3 @@ | ||
return through.obj(function(file, enc, output) { | ||
return util.transform(function(file, enc, output) { | ||
var messages = file.eslint && file.eslint.messages || [], | ||
@@ -88,3 +86,3 @@ error = null; | ||
return through.obj(function(file, enc, cb) { | ||
return util.transform(function(file, enc, cb) { | ||
var messages = file.eslint && file.eslint.messages || []; | ||
@@ -120,3 +118,3 @@ messages.forEach(function(message) { | ||
return through.obj(function(file, enc, cb) { | ||
return util.transform(function(file, enc, cb) { | ||
if (file.eslint) { | ||
@@ -144,3 +142,3 @@ results.push(file.eslint); | ||
return through.obj(function(file, enc, cb) { | ||
return util.transform(function(file, enc, cb) { | ||
var error = null; | ||
@@ -147,0 +145,0 @@ if (file.eslint) { |
{ | ||
"name": "gulp-eslint", | ||
"version": "0.13.1", | ||
"version": "0.13.2", | ||
"description": "A gulp plugin for processing files with eslint", | ||
@@ -51,4 +51,3 @@ "repository": "adametry/gulp-eslint", | ||
"gulp-util": "^3.0.4", | ||
"object-assign": "^3.0.0", | ||
"through2": "^0.6.3" | ||
"object-assign": "^3.0.0" | ||
}, | ||
@@ -55,0 +54,0 @@ "devDependencies": { |
15
util.js
'use strict'; | ||
var path = require('path'), | ||
TransformStream = require('stream').Transform, | ||
gutil = require('gulp-util'), | ||
@@ -14,2 +15,16 @@ objectAssign = require('object-assign'), | ||
/** | ||
* Convenience method for creating a transform stream in object mode | ||
*/ | ||
exports.transform = function(transform, flush) { | ||
var stream = new TransformStream({ | ||
objectMode: true | ||
}); | ||
stream._transform = transform; | ||
if (typeof flush === 'function') { | ||
stream._flush = flush; | ||
} | ||
return stream; | ||
}; | ||
/** | ||
* Mimic the CLIEngine.isPathIgnored, | ||
@@ -16,0 +31,0 @@ * but resolve .eslintignore based on file's directory rather than process.cwd() |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
20678
4
291
- Removedthrough2@^0.6.3
- Removedreadable-stream@1.0.34(transitive)
- Removedthrough2@0.6.5(transitive)