eslint-loader
Advanced tools
Comparing version 1.1.1 to 1.2.0
@@ -0,1 +1,7 @@ | ||
# 1.2.0 - 2016-01-02 | ||
- Added: this loader now pass down the input source map to the next chained | ||
loader if it exists | ||
([#70](https://github.com/MoOx/eslint-loader/pull/70)). | ||
# 1.1.1 - 2015-10-08 | ||
@@ -2,0 +8,0 @@ |
31
index.js
@@ -11,6 +11,5 @@ var eslint = require("eslint") | ||
* @param {Object} webpack webpack instance | ||
* @param {Function} callback optional callback for async loader | ||
* @return {void} | ||
*/ | ||
function lint(input, config, webpack, callback) { | ||
function lint(input, config, webpack) { | ||
var engine = new eslint.CLIEngine(config) | ||
@@ -93,6 +92,2 @@ | ||
} | ||
if (callback) { | ||
callback(null, input) | ||
} | ||
} | ||
@@ -104,5 +99,6 @@ | ||
* @param {String|Buffer} input JavaScript string | ||
* @returns {String|Buffer} original input | ||
* @param {Object} map input source map | ||
* @return {void} | ||
*/ | ||
module.exports = function(input) { | ||
module.exports = function(input, map) { | ||
var config = assign( | ||
@@ -119,19 +115,4 @@ // loader defaults | ||
this.cacheable() | ||
var callback = this.async() | ||
// sync | ||
if (!callback) { | ||
lint(input, config, this) | ||
return input | ||
} | ||
// async | ||
else { | ||
try { | ||
lint(input, config, this, callback) | ||
} | ||
catch (e) { | ||
callback(e) | ||
} | ||
} | ||
lint(input, config, this) | ||
this.callback(null, input, map) | ||
} |
{ | ||
"name": "eslint-loader", | ||
"version": "1.1.1", | ||
"version": "1.2.0", | ||
"description": "eslint loader (for webpack)", | ||
@@ -33,4 +33,5 @@ "keywords": [ | ||
"lint": "eslint .", | ||
"test": "npm run lint && tape test/*.js" | ||
"tape": "tape test/*.js", | ||
"test": "npm run lint && npm run tape" | ||
} | ||
} |
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
12401
103