Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gulp-eslint

Package Overview
Dependencies
Maintainers
1
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-eslint - npm Package Compare versions

Comparing version 0.1.5 to 0.1.6

6

package.json
{
"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": {

'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 @@ }

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc