Socket
Socket
Sign inDemoInstall

gulp-eslint

Package Overview
Dependencies
Maintainers
2
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.2.2 to 0.3.0

16

CHANGELOG.md

@@ -59,1 +59,17 @@ # Changelog

## 0.2.1 (unreleased)
* Upgraded eslint to 0.11.0
## 0.2.2
* Upgraded eslint to 0.13.0
* Fix filesystem-local .eslintrc loading
* Fix filesystem-local .eslintignore loading
* Add failAfterError to fail at the end of the stream instead of the first error (works well with 'format' method)
## 0.3.0
* Import filesystem-local config plugins
* Fix doc typo

2

index.js

@@ -17,3 +17,5 @@ 'use strict';

function verify(filePath, contents) {
// mimic CLIEngine::processFile
var config = linter.getConfigForFile(filePath);
util.loadPlugins(config.plugins);
var messages = eslint.verify(contents, config, filePath);

@@ -20,0 +22,0 @@ //eslint.reset();

2

package.json
{
"name": "gulp-eslint",
"version": "0.2.2",
"version": "0.3.0",
"description": "A gulp plugin for processing files with eslint",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -59,3 +59,3 @@ # gulp-eslint [![Build Status](https://travis-ci.org/adametry/gulp-eslint.png)](https://travis-ci.org/adametry/gulp-eslint)

*No explicit configuration.* A `.eslintrc` file my be resolved relative to each linted file.
*No explicit configuration.* A `.eslintrc` file may be resolved relative to each linted file.

@@ -62,0 +62,0 @@ ### eslint(options)

@@ -6,3 +6,3 @@ 'use strict';

through = require('through'),
EsLint = require('eslint').CLIEngine,
CLIEngine = require('eslint').CLIEngine,
IgnoredPaths = require('eslint/lib/ignored-paths'),

@@ -58,2 +58,14 @@ FileFinder = require('eslint/lib/file-finder');

/**
* Mimic the CLIEngine::loadPlugins
*/
exports.loadPlugins = function (pluginNames) {
// WARNING: HACK AHEAD!
// We can either process text/file, or create a new CLIEngine instance to make use of the internal plugin cache.
// Creating a new CLIEngine is probably the cheapest approach.
return pluginNames && new CLIEngine({
plugins: pluginNames
}) && void 0;
};
/**
* Create config helper to merge various config sources

@@ -138,3 +150,3 @@ */

// load formatter (module, relative to cwd, eslint formatter)
formatter = (new EsLint()).getFormatter(formatter);
formatter = (new CLIEngine()).getFormatter(formatter);

@@ -141,0 +153,0 @@ if (typeof formatter === 'string') {

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