Skip to content

Commit

Permalink
add XO
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Aug 21, 2015
1 parent 83b219b commit 91c996a
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[package.json]
[{package.json,*.yml}]
indent_style = space
indent_size = 2

Expand Down
13 changes: 0 additions & 13 deletions .jshintrc

This file was deleted.

11 changes: 9 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"node": ">=0.10.0"
},
"scripts": {
"test": "mocha"
"test": "xo && mocha"
},
"files": [
"index.js"
Expand All @@ -35,6 +35,13 @@
"streamfilter": "^1.0.5"
},
"devDependencies": {
"mocha": "*"
"mocha": "*",
"xo": "*"
},
"xo": {
"envs": [
"node",
"mocha"
]
}
}
15 changes: 8 additions & 7 deletions test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
'use strict';
var path = require('path');
var assert = require('assert');
var gutil = require('gulp-util');
var filter = require('./');
Expand All @@ -20,12 +21,12 @@ describe('filter()', function () {

stream.write(new gutil.File({
base: __dirname,
path: __dirname + '/included.js'
path: path.join(__dirname, 'included.js')
}));

stream.write(new gutil.File({
base: __dirname,
path: __dirname + '/ignored.js'
path: path.join(__dirname, 'ignored.js')
}));

stream.end();
Expand All @@ -48,12 +49,12 @@ describe('filter()', function () {

stream.write(new gutil.File({
base: __dirname,
path: __dirname + '/included.js'
path: path.join(__dirname, 'included.js')
}));

stream.write(new gutil.File({
base: __dirname,
path: __dirname + '/ignored.js'
path: path.join(__dirname, 'ignored.js')
}));

stream.end();
Expand All @@ -76,12 +77,12 @@ describe('filter()', function () {

stream.write(new gutil.File({
base: __dirname,
path: __dirname + '/nested/resource.js'
path: path.join(__dirname, 'nested', 'resource.js')
}));

stream.write(new gutil.File({
base: __dirname,
path: __dirname + '/nested/resource.css'
path: path.join(__dirname, 'nested', 'resource.css')
}));

stream.end();
Expand Down Expand Up @@ -260,7 +261,7 @@ describe('filter.restore', function () {
});

restoreStream.on('end', function () {
done(new Error('Not expected to end!'));
cb(new Error('Not expected to end!'));
});

stream.pipe(restoreStream);
Expand Down

0 comments on commit 91c996a

Please sign in to comment.