Skip to content

Commit 91c996a

Browse files
committed
add XO
1 parent 83b219b commit 91c996a

File tree

4 files changed

+18
-23
lines changed

4 files changed

+18
-23
lines changed

.editorconfig

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ charset = utf-8
77
trim_trailing_whitespace = true
88
insert_final_newline = true
99

10-
[package.json]
10+
[{package.json,*.yml}]
1111
indent_style = space
1212
indent_size = 2
1313

.jshintrc

-13
This file was deleted.

package.json

+9-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"node": ">=0.10.0"
1414
},
1515
"scripts": {
16-
"test": "mocha"
16+
"test": "xo && mocha"
1717
},
1818
"files": [
1919
"index.js"
@@ -35,6 +35,13 @@
3535
"streamfilter": "^1.0.5"
3636
},
3737
"devDependencies": {
38-
"mocha": "*"
38+
"mocha": "*",
39+
"xo": "*"
40+
},
41+
"xo": {
42+
"envs": [
43+
"node",
44+
"mocha"
45+
]
3946
}
4047
}

test.js

+8-7
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
'use strict';
2+
var path = require('path');
23
var assert = require('assert');
34
var gutil = require('gulp-util');
45
var filter = require('./');
@@ -20,12 +21,12 @@ describe('filter()', function () {
2021

2122
stream.write(new gutil.File({
2223
base: __dirname,
23-
path: __dirname + '/included.js'
24+
path: path.join(__dirname, 'included.js')
2425
}));
2526

2627
stream.write(new gutil.File({
2728
base: __dirname,
28-
path: __dirname + '/ignored.js'
29+
path: path.join(__dirname, 'ignored.js')
2930
}));
3031

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

4950
stream.write(new gutil.File({
5051
base: __dirname,
51-
path: __dirname + '/included.js'
52+
path: path.join(__dirname, 'included.js')
5253
}));
5354

5455
stream.write(new gutil.File({
5556
base: __dirname,
56-
path: __dirname + '/ignored.js'
57+
path: path.join(__dirname, 'ignored.js')
5758
}));
5859

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

7778
stream.write(new gutil.File({
7879
base: __dirname,
79-
path: __dirname + '/nested/resource.js'
80+
path: path.join(__dirname, 'nested', 'resource.js')
8081
}));
8182

8283
stream.write(new gutil.File({
8384
base: __dirname,
84-
path: __dirname + '/nested/resource.css'
85+
path: path.join(__dirname, 'nested', 'resource.css')
8586
}));
8687

8788
stream.end();
@@ -260,7 +261,7 @@ describe('filter.restore', function () {
260261
});
261262

262263
restoreStream.on('end', function () {
263-
done(new Error('Not expected to end!'));
264+
cb(new Error('Not expected to end!'));
264265
});
265266

266267
stream.pipe(restoreStream);

0 commit comments

Comments
 (0)