Skip to content

Commit

Permalink
remove deprecated gulp-util dependency (#213)
Browse files Browse the repository at this point in the history
  • Loading branch information
mjeanroy authored and shinnn committed Jan 5, 2018
1 parent 35eae57 commit b48a04a
Show file tree
Hide file tree
Showing 7 changed files with 171 additions and 66 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,9 @@
# Changelog

## 4.0.2

* Remove deprecated [`gulp-util`](https://github.com/gulpjs/gulp-util) dependency and use individual modules instead

## 4.0.1

* Make `fix` option work even if `quiet` option is also enabled
Expand Down
4 changes: 2 additions & 2 deletions example/fail.js
Expand Up @@ -3,7 +3,7 @@
// npm install gulp gulp-eslint

const gulp = require('gulp');
const gulpUtil = require('gulp-util');
const fancyLog = require('fancy-log');
const eslint = require('../');

gulp.task('fail-immediately', () => {
Expand All @@ -15,7 +15,7 @@ gulp.task('fail-immediately', () => {
.pipe(eslint.failOnError())
// need to do something before the process exits? Try this:
.on('error', error => {
gulpUtil.log('Stream Exiting With Error: ' + error.message);
fancyLog('Stream Exiting With Error: ' + error.message);
});
});

Expand Down
6 changes: 3 additions & 3 deletions index.js
@@ -1,6 +1,6 @@
'use strict';

const PluginError = require('gulp-util').PluginError;
const PluginError = require('plugin-error');
const CLIEngine = require('eslint').CLIEngine;
const util = require('./util');
const path = require('path');
Expand Down Expand Up @@ -164,7 +164,7 @@ gulpEslint.failAfterError = () => {
* Format the results of each file individually.
*
* @param {(String|Function)} [formatter=stylish] - The name or function for a ESLint result formatter
* @param {(Function|Stream)} [writable=gulp-util.log] - A funtion or stream to write the formatted ESLint results.
* @param {(Function|Stream)} [writable=fancy-log] - A funtion or stream to write the formatted ESLint results.
* @returns {stream} gulp file stream
*/
gulpEslint.formatEach = (formatter, writable) => {
Expand All @@ -178,7 +178,7 @@ gulpEslint.formatEach = (formatter, writable) => {
* Wait until all files have been linted and format all results at once.
*
* @param {(String|Function)} [formatter=stylish] - The name or function for a ESLint result formatter
* @param {(Function|stream)} [writable=gulp-util.log] - A funtion or stream to write the formatted ESLint results.
* @param {(Function|stream)} [writable=fancy-log] - A funtion or stream to write the formatted ESLint results.
* @returns {stream} gulp file stream
*/
gulpEslint.format = (formatter, writable) => {
Expand Down

0 comments on commit b48a04a

Please sign in to comment.