Skip to content

Commit

Permalink
chore(package): update eslint-config-dustinspecker to version 0.2.5
Browse files Browse the repository at this point in the history
  • Loading branch information
greenkeeperio-bot authored and dustinspecker committed Dec 20, 2015
1 parent 9f0ac9b commit 93f2146
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 31 deletions.
18 changes: 9 additions & 9 deletions gulpfile.babel.js
Expand Up @@ -17,8 +17,8 @@ const configFiles = './gulpfile.babel.js'

gulp.task('clean', () => del(destDir));

gulp.task('lint', ['clean'], () => {
return gulp.src([configFiles, srcFiles, testFiles])
gulp.task('lint', ['clean'], () =>
gulp.src([configFiles, srcFiles, testFiles])
.pipe(eslint())
.pipe(eslint.formatEach('./node_modules/eslint-path-formatter'))
.pipe(eslint.failOnError())
Expand All @@ -27,19 +27,19 @@ gulp.task('lint', ['clean'], () => {
.pipe(jscs.reporter('fail'))
.pipe(jshint())
.pipe(jshint.reporter('default'))
.pipe(jshint.reporter('fail'));
});
.pipe(jshint.reporter('fail'))
);

gulp.task('compile', ['lint'], () => {
return gulp.src(srcFiles)
gulp.task('compile', ['lint'], () =>
gulp.src(srcFiles)
.pipe(babel())
.pipe(gulp.dest(destDir));
});
.pipe(gulp.dest(destDir))
);

gulp.task('build', ['compile']);

gulp.task('test', ['build'], cb => {
gulp.src([destDir + '*.js'])
gulp.src([`${destDir}*.js`])
.pipe(istanbul())
.pipe(istanbul.hookRequire())
.on('finish', () => {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -35,7 +35,7 @@
"chai": "^3.0.0",
"coveralls": "^2.11.2",
"del": "^2.0.0",
"eslint-config-dustinspecker": "^0.1.0",
"eslint-config-dustinspecker": "^0.2.5",
"eslint-path-formatter": "^0.1.1",
"eslint-plugin-new-with-error": "^1.1.0",
"eslint-plugin-no-use-extend-native": "^0.3.1",
Expand Down
3 changes: 2 additions & 1 deletion src/index.js
@@ -1,3 +1,4 @@
/* eslint no-invalid-this: 0 */
'use strict';
import alex from 'alex';
import convertVinylToVfile from 'convert-vinyl-to-vfile';
Expand All @@ -19,7 +20,7 @@ module.exports = function () {
};

module.exports.reporter = function (reporterType) {
let failedFiles = []
const failedFiles = []
, isDefaultReporter = !reporterType
, isFailReporter = reporterType === 'fail'
, isFailImmediatelyReporter = reporterType === 'failImmediately';
Expand Down
24 changes: 4 additions & 20 deletions test/test.js
Expand Up @@ -7,13 +7,15 @@ import {join} from 'path';
import proxyquire from 'proxyquire';

describe('gulp-alex', () => {
let filePath = join('users', 'dustin', 'project', 'awesome.project.md')
, alexProxy, fileWithOneError, reporter, validFile;
const filePath = join('users', 'dustin', 'project', 'awesome.project.md');
let alexProxy, fileWithOneError, reporter, stream, validFile;

beforeEach(() => {
reporter = austin.spy();
alexProxy = proxyquire('../lib', {'vfile-reporter': reporter});

stream = alexProxy();

fileWithOneError = new File({
base: './',
path: filePath,
Expand All @@ -28,8 +30,6 @@ describe('gulp-alex', () => {
});

it('should not report if no files passed', done => {
let stream = alexProxy();

stream
.pipe(alexProxy.reporter())
.on('data', file => {
Expand All @@ -44,8 +44,6 @@ describe('gulp-alex', () => {
});

it('should report if an error is not found', done => {
let stream = alexProxy();

stream
.pipe(alexProxy.reporter())
.on('data', file => {
Expand All @@ -60,8 +58,6 @@ describe('gulp-alex', () => {
});

it('should report if an error is found', done => {
let stream = alexProxy();

stream
.pipe(alexProxy.reporter())
.on('data', file => {
Expand All @@ -76,8 +72,6 @@ describe('gulp-alex', () => {
});

it('should not print if an error is not found', done => {
let stream = alexProxy();

reporter.returns('');
austin.spy(global.console, 'log');

Expand All @@ -95,8 +89,6 @@ describe('gulp-alex', () => {
});

it('should print if an error is found', done => {
let stream = alexProxy();

reporter.returns('error');
austin.spy(global.console, 'log');

Expand All @@ -115,8 +107,6 @@ describe('gulp-alex', () => {

describe('failImmediately reporter', () => {
it('should not emit an error if failImmediately reporter is not being used', done => {
let stream = alexProxy();

stream
.pipe(alexProxy.reporter())
.on('error', () => {
Expand All @@ -131,8 +121,6 @@ describe('gulp-alex', () => {
});

it('should emit an error if using failImmediately reporter', done => {
let stream = alexProxy();

stream
.pipe(alexProxy.reporter('failImmediately'))
.on('error', error => {
Expand All @@ -151,8 +139,6 @@ describe('gulp-alex', () => {

describe('fail reporter', () => {
it('should not emit an error if no issues', done => {
let stream = alexProxy();

stream
.pipe(alexProxy.reporter())
.pipe(alexProxy.reporter('fail'))
Expand All @@ -169,8 +155,6 @@ describe('gulp-alex', () => {
});

it('should emit an error after all files have been processed', done => {
let stream = alexProxy();

stream
.pipe(alexProxy.reporter())
.pipe(alexProxy.reporter('fail'))
Expand Down

0 comments on commit 93f2146

Please sign in to comment.