gulp-eslint
Advanced tools
Comparing version 0.1.5 to 0.1.6
{ | ||
"name": "gulp-eslint", | ||
"version": "0.1.5", | ||
"version": "0.1.6", | ||
"description": "A gulp plugin for processing files with eslint", | ||
@@ -47,3 +47,3 @@ "main": "index.js", | ||
"event-stream": "~3.1.0", | ||
"eslint": "~0.4.0", | ||
"eslint": "~0.5.0", | ||
"gulp-util": "~2.2.12" | ||
@@ -53,3 +53,3 @@ }, | ||
"mocha": "*", | ||
"should": "~3.1.2" | ||
"should": "~3.3.0" | ||
}, | ||
@@ -56,0 +56,0 @@ "peerDependencies": { |
47
util.js
'use strict'; | ||
var path = require('path'), | ||
util = require('util'), | ||
esutil = require('eslint/lib/util'), | ||
@@ -62,13 +63,44 @@ estream = require('event-stream'), | ||
exports.readOptions = function (options) { | ||
var configOptions = {}; | ||
/* | ||
Config.options = { | ||
reset:false, | ||
format:'formatter-reference', | ||
eslintrc:boolean, | ||
env:['key'], | ||
global:[ | ||
'key:true', | ||
'key'//:false - implied | ||
], | ||
config:{} | ||
} | ||
*/ | ||
if (!options || typeof options === 'string') { | ||
// load external config data (if a string) | ||
options = { | ||
config: options | ||
}; | ||
if (options == null) { | ||
options = {}; | ||
} else if (typeof options === 'string') { | ||
configOptions.config = options; | ||
} | ||
var helper = new Config(options); | ||
// accommodate cli format | ||
if (util.isArray(options.env)) { | ||
configOptions.env = options.env; | ||
options.env = null; | ||
} | ||
if (options.rules || options.globals || options.env) { | ||
// accommodate cli format: [ 'key:true', 'key' ] | ||
if (util.isArray(options.globals)) { | ||
configOptions.globals = options.globals; | ||
options.globals = null; | ||
} | ||
// create helper with overrides | ||
var helper = new Config(configOptions); | ||
// overwrite config.global | ||
if (options.globals) { | ||
helper.globals = options.globals; | ||
} | ||
if (options.rules || options.env) { | ||
// inline definitions | ||
@@ -79,3 +111,2 @@ helper.useSpecificConfig = esutil.mergeConfigs( | ||
rules: options.rules || {}, | ||
globals: options.globals || {}, | ||
env: options.env || {} | ||
@@ -82,0 +113,0 @@ } |
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
14146
264
+ Addedcssauron@1.1.2(transitive)
+ Addedcssauron-esprima@0.0.1(transitive)
+ Addedeslint@0.5.1(transitive)
+ Addedfast-levenshtein@1.0.7(transitive)
+ Addedoptionator@0.3.0(transitive)
- Removedeslint@0.4.5(transitive)
- Removedlevenshtein-damerau@0.1.0(transitive)
- Removedoptionator@0.1.1(transitive)
- Removedprelude-ls@1.0.3(transitive)
Updatedeslint@~0.5.0